CI Playbooks
Lessons from software factories
- Implementations
- 299
- Merged PRs
- 276
- Playbooks
- 11
- Last updated
Agent-friendly playbooks for GitHub Actions
Each playbook is based on an analysis of each company's public posts, talks, commits and pull requests, as available.
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookType-check with a native checker
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed
- Read OpenClaw’s playbookSelect only the tests and proofs a change can affect
Find a CI improvement
What’s slowing your CI down?
183 techniques · 299 implementations. Find what fits your CI.
Filter by problemSelect any
183 techniques found 299 implementations
Split long test suites across runners
Distribute a suite across CI jobs while keeping complete test discovery and collecting the results from every shard.7 implementations · 7 companiesAnthropicDoorDashMastraOpenAIShopifySpotifyStripeCache package downloads and dependency stores
Restore package-manager downloads or dependency stores while keeping a locked install that validates the requested dependency graph.7 implementations · 6 companiesDoorDashLinearShopifySpotifyStripeUberSkip jobs whose inputs have not changed
Gate expensive workflows and jobs on the files they consume, keeping required check behavior intact.7 implementations · 6 companiesAnthropicDoorDashMastraOpenAIShopifyStripeRun only the tests a change can affect
Use dependency or observed-file relationships to select affected tests, with a full-suite fallback for changes the selector cannot classify.6 implementations · 5 companiesAnthropicMastraOpenClawRampStripeCancel superseded pull request runs
Free runner capacity by canceling validation that a newer commit has replaced. Keep required default-branch and release runs intact.4 implementations · 4 companiesAnthropicMastraStripeUberBalance test work across shards
Use measured runtimes or smaller test files to reduce the slowest shard, which determines when the suite finishes.4 implementations · 4 companiesLinearOpenAIRampStripeFetch only the repository history a job needs
Limit checkout depth and fetched refs to the comparisons or release history the job actually consumes.4 implementations · 4 companiesLinearMastraOpenAIStripeIsolate state before running tests in parallel
Give concurrent tests independent databases, services, or fixtures so they can share runner capacity without interfering with each other.4 implementations · 4 companiesDoorDashShopifyStripeUberMatch test concurrency to the runner
Measure worker counts against available CPU and memory. More workers help only while the runner has capacity.4 implementations · 4 companiesAnthropicMastraOpenAIStripePut time limits on jobs that can hang
Set job timeouts from normal run history so stalled checks release runners and produce a failure that can be investigated.4 implementations · 4 companiesAnthropicMastraShopifySpotifyRequire verification before an agent hands over a pull request
Have the agent complete the relevant build, test, and review checks before presenting its change for approval.4 implementations · 4 companiesDoorDashOpenAIRampSpotifyShowing 12 of 183 techniques
A skill for faster CI.
Install ci-speedup, an open-source agent skill that finds the CI optimizations that fit your repo.
Top techniques across playbooks
Techniques used by the most companies, with examples from their playbooks.
- Run independent checks in parallelUsed in 7 of 11 playbooks
- Split long test suites across runnersUsed in 7 of 11 playbooks
- Cache package downloads and dependency storesUsed in 6 of 11 playbooks
- Skip jobs whose inputs have not changedUsed in 6 of 11 playbooks
- Run only the tests a change can affectUsed in 5 of 11 playbooks
- Balance test work across shardsUsed in 4 of 11 playbooks
- Cancel superseded pull request runsUsed in 4 of 11 playbooks
- Fetch only the repository history a job needsUsed in 4 of 11 playbooks
- Isolate state before running tests in parallelUsed in 4 of 11 playbooks
- Match test concurrency to the runnerUsed in 4 of 11 playbooks
- Put time limits on jobs that can hangUsed in 4 of 11 playbooks
- Require verification before an agent hands over a pull requestUsed in 4 of 11 playbooks
From StarSling
Self-improving CI
CI optimization is continuous work. StarSling runners make GitHub Actions faster from the first job. On eligible paid plans, teams can turn on StarSling agents that keep finding improvements like these and open pull requests for your team to review.