- All playbooks
- Agent PR volume
- Skip jobs whose inputs have not changed
Skip jobs whose inputs have not changed
Gate expensive workflows and jobs on the files they consume, keeping required check behavior intact.
How companies used this technique
Read what each company changed and follow the original sources.
Skip workflows a change cannot affect
Translated to GitHub Actions
- What Anthropic built
- Anthropic runs a selected set of tests on each pull request.
- Your GitHub Actions version
- Path and job-level filters that keep expensive workflows to changes in the files they depend on.
Anthropic runs a selected set of tests on each pull request. In GitHub Actions, path and job-level filters keep expensive workflows to changes in the files they depend on.
- Use it when
- An expensive workflow runs for unrelated files, or app-specific jobs ignore the dependency graph.
- Before applying it
- Required checks stay reachable: a changes job with job-level conditions keeps a skipped job reporting success.
- GitHub Actions adaptation
- Compare the source system with your own workflow before applying this translation.
Start the native matrix when its inputs change
The self-update PR added native updater journeys on macOS arm64, macOS Intel and Linux arm64. A step in the test job diffs the change against its base and sets an output; the native matrix runs when that output is true. When the checkout lacks the base commit, or the run is a manual dispatch, the matrix runs. Linux amd64 runs the complete process suite on every change.
- Use it when
- An expensive matrix verifies one subsystem and runs on every change to the repository.
- Before applying it
- The path list must cover every input: source, shared packages, lockfiles and the workflow file itself. Required checks must still report when the matrix skips.
Skip whole jobs only when their inputs are unchanged
Mastra gated AGENTS and peer-dependency validation by relevant inputs and generated workspace matrices from affected packages. Job-level conditions and validated matrices sit on top of trigger-level paths filters.
- Use it when
- A workflow serves several independent packages or checks with distinct inputs.
- Before applying it
- Workflow files, shared config, dependency changes and routing-tool changes can affect every target. Keep required status reporting and treat invalid routing artifacts as full coverage.
Skip independent jobs only for proven narrow edits
For modifications to existing top-level pytest modules, Codex Security keeps all five Python jobs and the checks that depend on them, and skips the independent SDK, Windows install, Action and eval jobs. A related change also skips container jobs once it proved those modules sit outside the image's build context.
Across seven earlier PRs that only edited existing pytest modules, the jobs this route skips used 17h29m53s of runner time (139 jobs) Source
- Use it when
- Edits to existing test modules launch unrelated SDK, packaging or container work.
- Before applying it
- Independence needs more than path names: added, deleted, renamed, shared-helper and mixed changes run the full set.
Run the platform checks a binding change affects
Checkout Kit replaced its single protocol signal with language-specific binding signals and a shared-input signal. A Kotlin-only binding change now starts the Android consumers, and a schema or generator change still starts every platform.
Merged 2026-08-03; the per-binding signals are on the default branch. Source
- Use it when
- A monorepo starts every platform job for changes confined to one generated binding.
- Before applying it
- Shared schemas, generators and lockfiles reach several languages, so they map to every consumer.
Skip platform jobs for documentation-only changes
Checkout Kit keeps one shared filter file with per-platform filters that exclude Markdown files and docs directories, so a docs-only pull request starts none of the platform suites while workflow and filter changes still trigger validation. The same exclusions now live in .ci/changed-file-filters.yml on the default branch. Shopify CLI tried the workflow-level form and restored the tests, because they are required to merge.
Merged 2026-06-26; the exclusions are on the default branch. Source
- Use it when
- Documentation edits start expensive platform suites that build and test only source code.
- Before applying it
- A workflow skipped at the trigger never reports its required checks; filter at the job level so the checks still report.
Company Playbooks
- 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 playbookMove a CPU-bound test suite to a faster CPU
- 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