codecovlisted
Install: claude install-skill alunduil/alunduil-chezmoi
# Codecov
Auth is already in env — `dot_bashrc` exports `CODECOV_API_TOKEN`. The
`codecov-api` wrapper in `~/.local/bin/` injects auth + the
`https://api.codecov.io` base. Don't shell out to `curl` directly.
## Triggers
- "Is `<test>` flaky?" / "What's its failure rate?"
- "Show failed tests on `<branch>` recently."
- "Why is `<test>` failing?" (stack trace lookup)
- "What's the coverage delta on this PR / file / branch?"
- Any Codecov UI URL behind the login wall.
## Repo coordinates
Most paths take `{service}/{owner}/{repo}` where `service` is one of
`github`, `gitlab`, `bitbucket` (no `.com`). Derive from the current
checkout via `git remote get-url origin`.
## REST — flaky / failed tests
`GET /api/v2/{service}/{owner}/repos/{repo}/test-results/`
Verified query parameters:
- `branch` — filter by branch name
- `commit_id` — filter by commit SHA
- `outcome` — `pass` | `failure` | `skip` | `error`
- `duration_min` / `duration_max` — seconds
- `page` / `page_size` — pagination
```sh
codecov-api "/api/v2/github/<owner>/repos/<repo>/test-results/?branch=main&outcome=failure&page_size=100"
```
Detail (stack trace, etc.):
```sh
codecov-api "/api/v2/github/<owner>/repos/<repo>/test-results/<id>/"
```
REST has **no `flake_rate` filter and no test-name filter**. For a
ranked flake answer, paginate `outcome=failure`, group by name,
divide by total runs of that name (separate call without `outcome`),
or use GraphQL.
## GraphQL — ranked flake aggregates
`POST /graphql/` i