Measures a project's GitHub Actions CI from its real run history — splitting every job into waiting, setup, and running time at p50 and p95 — and turns the result into an ordered plan to make pull-request feedback fast without letting CI lie: no retries, no skipped tests, no weaker checks. Then, only when asked, carries out one plan item at a time on its own branch and PR with before/after numbers from real runs. Stack-aware for Node/TypeScript, Rails, and Python. Use when asked "our CI is sl...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ci Speed?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/eagerworks-ci-speed)
---
name: ci-speed
description: >-
Measures a project's GitHub Actions CI from its real run history — splitting every job into waiting, setup, and running time at p50 and p95 — and turns the result into an ordered plan to make pull-request feedback fast without letting CI lie: no retries, no skipped tests, no weaker checks. Then, only when asked, carries out one plan item at a time on its own branch and PR with before/after numbers from real runs. Stack-aware for Node/TypeScript, Rails, and Python. Use when asked "our CI is slow", "speed up CI", "why do PRs take so long to go green", "audit our GitHub Actions", "make CI faster", "CI is flaky", "shard our tests", "cache our CI", "cut CI cost", "get PR checks under a minute", or to do a specific item from an earlier ci-speed plan. The audit is printed in chat and saved to docs/ci-speed-audit.md in the project.
metadata:
author: eagerworks
version: "1.0.0"
---
# CI Speed Skill
Makes a project's CI as fast as possible **without letting it lie**. Default target: a PR gets its result in **under 1 minute at the median and under 2 minutes at p95**. The skill measures first, fixes the biggest bucket first, and ships every change as its own small PR with numbers from real runs.
## Three Rules That Outrank Speed
1. **The full suite runs before anything reaches the default branch** — in a merge queue (`merge_group`) or an equivalent required post-PR gate. Test selection only narrows *PR feedback*; it never replaces the full run.
2. **Never hide failures.** No retries, no `continue-on-error`, no wider timeouts, no skipped or quarantined tests to get green. A check that needs a retry has a bug — find it.
3. **Never check less.** Lint rules and required checks only stay or grow. A faster tool that misses a rule the old one caught doesn't replace it until the gap is closed.
When a speed-up conflicts with a rule, the rule wins and the report says what it cost.
## Phases and Mutation Posture
| Phase | What happens | Writes |
|---|---|---|
| **1. Audit** | Discover the stack and CI, pull the last N runs (default 150), compute waiting / setup / running per job at p50 and p95 | Exactly one: the report, printed in chat and saved to `docs/ci-speed-audit.md` (overwritten, never committed) |
| **2. Plan** | Order fixes by the biggest bucket first, each with evidence, expected saving, effort, and which budget it hits; list everything that needs an account, a secret, or a bigger bill, with expected monthly cost | Part of the same report |
| **3. Execute** | **Only when the user asks for a specific item.** One item → one branch → one change → before/after numbers → PR via the `create-pr` skill | One branch and one PR per item |
Never start phase 3 on your own, never bundle two plan items into one PR, and never change repo settings, runner vendors, or billing — those go on the "needs an account / secret / bill" list for a human. See `docs/decision-records/2026-11-30--ci-speed-write-posture.md` in the skills repo for why.
## Discovery — Do This First
**1. Detect the stack(s)** — each has its own tool guide:
| Signal | Stack | Guide |
|---|---|---|
| `package.json`, `tsconfig.json`, `bun.lock`, `pnpm-lock.yaml` | Node / TypeScript | `references/stacks/node-ts.md` |
| `Gemfile`, `config/application.rb` | Rails | `references/stacks/rails.md` |
| `pyproject.toml`, `requirements*.txt`, `uv.lock` | Python | `references/stacks/python.md` |
A monorepo can hold several — audit each package's jobs and the root's orchestration.
**2. Inventory the CI** — read in full, **from the default branch** (`git show origin/<default>:.github/workflows/…`, not the working tree, which may be a stale branch): every workflow (triggers, `concurrency`, `runs-on`, `needs`, matrix, caches, services), required checks from **both rulesets and classic branch protection** (`references/audit-workflow.md` step 1b, ⚪ if both are unreadable), merge queue, local hooks (`hk.pkl`, `lefthook.yml`, `.husky/`, `.pre-commit-config.yaml`), and the lint/format/typecheck/test/build commands they run.
**3. Pull run history** with `gh` — the exact commands, pagination, and bucket math are in `references/audit-workflow.md`. If `gh` isn't authenticated or the repo isn't on GitHub Actions, say so and mark every timing ⚪ — never estimate a number you didn't measure.
## Budgets (defaults — override in `.eagerworks/ci-speed.json`)
| Bucket | Budget |
|---|---|
| PR result, end to end | p50 < 60 s, p95 < 120 s |
| Waiting (queued → started) | < 5 s |
| Setup (checkout, toolchain, deps) | < 15 s |
| Slowest required job | < 35 s, and no required job waits on another |
| Lint | < 1 s |
| Format check | < 1 s |
| Typecheck | < 5 s |
| Tests, per shard | < 30 s |
| Local hooks (pre-commit / pre-push) | < 9 s |
Each budget is then **enforced**: a job that exceeds it fails (`assets/budget-check.yml`). Why each number, and how to enforce without widening anything: `references/rules-and-budgets.md`.
## Reference Files (read these on demand)
| Task | Read |
|---|---|
| Pulling runs, computing waiting/setup/running at p50/p95, flake signals, allowed vs. forbidden commands | `references/audit-workflow.md` |
| The three rules and every budget in depth; how to enforce a budget | `references/rules-and-budgets.md` |
| Waiting: concurrency cancel, runner choice, warm machines | `references/waiting-and-runners.md` |
| Setup: toolchain images, cache seeding from the default branch, blobless clone | `references/setup-and-caching.md` |
| Shape: parallel jobs, one job that reports every small failure, merge queue | `references/pipeline-shape.md` |
| Shards, workers, per-shard databases, diff-based test selection and its red-check | `references/sharding-and-selection.md` |
| Isolation, random order, the two-week evidence log, which tests may never be deleted | `references/test-hygiene.md` |
| Local hooks that match CI | `references/local-hooks.md` |
| Phase 3: doing one item as one PR with before/after numbers and a side-by-side tool check | `references/execution.md` |
| The report and plan format | `references/output-format.md` |
| `.eagerworks/ci-speed.json` | `references/config.md` |
Copyable assets in `assets/`: `ci-speed-audit.md` (report template), `ci-speed.example.json` (config), `budget-check.yml` (fail a job over budget), `pr-numbers.md` (before/after table for each PR).
## Tool Defaults Are Proven, Not Assumed
Each stack guide names fast default tools (e.g. bun, oxlint, TypeScript 7, ruff, uv, `parallel_tests`). A default is adopted only after the old and new tool run **side by side** on the same commit and everything the new one misses is listed. A measured reason — a rule it can't check, a slower result on this repo — keeps the old tool, and the report says so. If a tool only exists as a canary or preview, pin that exact version, never a floating tag.
## Critical Gotchas
1. **Measure before recommending.** Every plan item cites run data (`job`, bucket, p50/p95, N runs). ❌ "Caching would probably help." ✅ "`test` setup p50 41 s across 150 runs; `actions/cache` misses on 88 % of PR runs because nothing on `main` writes the key."
2. **Fix the biggest bucket first.** If waiting is 70 % of PR time, a faster linter is item 9, not item 1.
3. **Never make CI greener by checking less.** ❌ `retry: 3`, `continue-on-error: true`, `timeout-minutes` raised, `.skip`, `xit`, `@pytest.mark.skip`, removing a job from required checks. ✅ Find the flake's cause; quarantine is not a fix. A green test job can still be hiding failures: read the logs of successful runs, and prove a planted failure exits non-zero (`references/test-hygiene.md` → "The test job must fail when a test fails").
4. **Selection must be proven to fail.** A diff-based test selection ships only with a list of inputs that rerun everything and a deliberate red-check: hide a real breaking change from selection on purpose and confirm CI goes red. `references/sharding-and-selection.md`.
5. **Never delete tests on your own.** Change-detector tests are *reported* with evidence from the two-week log; a human deletes them. Tests for authorization, privacy, migrations, or concurrency are never proposed for deletion.
6. **Accounts, secrets, and money go on a list.** New runner vendor, larger runners, merge-queue settings, branch protection, paid cache — never changed by the skill. Each goes in the report's "Needs an account / secret / bill" list with expected monthly cost.
7. **One item, one PR, real numbers.** Before/after come from real CI runs of the base and the PR branch — not from a local stopwatch and not from one lucky run.
8. **Within budget is a valid result.** If PR time already meets the headline budget, say so first; the plan then only tightens bucket budgets and fixes honesty findings. Never recommend a fix for a bucket that's already within budget (e.g. no runner vendor when waiting is 2 s).
9. **Print the whole report in chat, then save the identical text** to `docs/ci-speed-audit.md`. End with total CI time and cost, before and projected after.