gh-metricslisted
Install: claude install-skill fadymondy/gh-pms
# gh-metrics
Aggregate the per-issue state-file timestamps and GitHub close-times into the metrics teams ask for during retros and planning.
## When to use
- Retro / planning: "how did we do last sprint", "what's our throughput"
- Investigating bottlenecks: "why are issues piling up in `in-review`"
- Forecasting: "if we keep this velocity, when do we ship the milestone"
## Inputs
```
gh-metrics [--days <n>] [--format text|json] [--milestone <number>]
```
| Flag | Default | Effect |
|---|---|---|
| `--days` | `30` | Lookback window for closed-issue + transition data. |
| `--format` | `text` | `text` for human reading, `json` for piping (one record per issue). |
| `--milestone` | none | Restrict to issues attached to a specific milestone. |
## What it computes
### 1. Time-in-status (median + p90)
For each gate transition, read the per-issue state file (`~/.cache/gh-pms/state/<owner>-<repo>.json`) for `last_transition_at` per status. Compute time-in-status per issue, then aggregate:
```
Status Median p90
todo 3.2 d 14.0 d
in-progress 1.8 d 5.5 d
ready-for-testing 0.4 d 1.2 d
in-testing 0.6 d 2.1 d
ready-for-docs 0.2 d 0.8 d
in-docs 0.5 d 1.4 d
documented 0.3 d 0.9 d
in-review 0.8 d 2.5 d
```
### 2. Gate failure rate
A "gate failure" = a transition that bounced back to a prior status (e.g. `in-review → in-progress` after `Needs Edits`