ci-cost-and-cadence
Skill2 starsChanged 24 days agoMITView on GitHub
Decide how much CI to run and when, weighing minutes, money and waiting time against what each check has caught, then build the choice with safeguards. Use when the user says 'run tests once per PR', 'move tests to a nightly run', or when CI minutes or the bill run out, PR feedback is slow, someone asks if every push needs the full suite or E2E could run nightly, or a new project needs CI.
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arenaSkill
- codebase-oracleSkill
- geppettoSkill
- lean-subagent-devSkill
- methodologySkill
- overnight-runSkill
- parallel-worktreesSkill
- dependency-security-auditSkill
- dependency-upgradeSkill
- rule-to-hookSkill
- safe-mergeSkill
- agent-friendly-auditSkill
- architectSkill
- brainstormSkill
- engineering-principlesSkill
- grill-meSkill
- improve-codebase-architectureSkill
- sharpenSkill
- to-issuesSkill
- to-prdSkill
- handoffSkill
- instructions-auditSkill
- project-setupSkill
- retrospectiveSkill
- session-closeSkill
- which-skillSkill
- bug-fixSkill
- evaluatorSkill
- flaky-test-huntSkill
- hillclimbSkill
- launch-readinessSkill
- migration-reviewSkill
- mutation-testSkill
- review-triageSkill
- skill-evalSkill
- tddSkill
- verify-appSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Do not propose anything until these are answered or explicitly left open.
- Very specific: line 41
Follow MEASURE.md. Two numbers decide most of the design:
- Very specific: line 66
If the choice is the nightly model, NIGHTLY.md is the design and templates/ the skeletons.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CI cost and cadence
A method, not an answer. Every option trades something: money, waiting time, or a guarantee about what can reach a shared environment broken. Your job is to make that trade visible with numbers from this repository, recommend one option, and then build it so that no shortcut can turn a skipped check into a green one.
Context from the user: $ARGUMENTS
Reference files, read when you reach their step:
${CLAUDE_SKILL_DIR}/MEASURE.md: where the minutes go, and what the suite has caught${CLAUDE_SKILL_DIR}/OPTIONS.md: the five options and the comparison table${CLAUDE_SKILL_DIR}/NIGHTLY.md: the nightly-with-safeguards design in detail${CLAUDE_SKILL_DIR}/TRAPS.md: platform traps, each with what to do${CLAUDE_SKILL_DIR}/templates/: workflow skeletons and pseudocode, starting points only${CLAUDE_SKILL_DIR}/measure-minutes.mjs: estimates billed minutes by workflow and job
1. Ask first, but read before asking
Answer from the repository and the CI provider whatever they can answer (workflow files, branch protection, run history, scripts). Ask the user only what they cannot, one question at a time, each with your recommended answer:
- Monthly allowance, spending limit, and current usage. Who can read the official billing page.
- How many pushes a typical PR gets, and who pushes: humans, coding agents, or both.
- How long the full suite takes in CI and locally, and whether a full local run is practical on the machines in use.
- Which checks branch protection requires, on which branches, and whether admins can bypass them.
- How a release reaches production, and what must never reach it untested.
- How much risk the shared staging environment can carry for a few hours, and whether anyone demos from it.
- Whether anyone needs an alert that actually reaches a phone, and through what (an assigned issue, a heartbeat monitor, chat).
Do not propose anything until these are answered or explicitly left open.
2. Measure before designing
Follow MEASURE.md. Two numbers decide most of the design:
- Where the minutes go: by event, workflow, job and PR, counting cancelled and failed runs (they bill) and the per-job round-up to a whole minute. Project the month at the current rate.
- What the expensive suite has caught: classify every red run since a date into (a) real defects a local run would not have seen, (b) defects a full local run would have seen, (c) flaky tests or infrastructure, (d) mistakes in the workflow itself. If (a) is near zero and (c) plus (d) dominate, the suite on every push mostly buys waiting.
Label every figure as measured or estimated. The official billing figure often needs a token scope the CLI does not have; say so instead of presenting an estimate as the bill.
3. Lay out the options, then recommend
Fill the comparison table in OPTIONS.md with this project's numbers: cost per month, wait per push, what can reach
staging and production broken, the guarantee lost, complexity. Then recommend one, with the measured reason first and
the estimated reason second, and state plainly what the user gives up. Get an explicit decision before building.
Two findings that usually matter:
- "Full suite once per PR" pays off only if PRs really get one full run. Review-round pushes after the first green run are what make it fail; count how many runs came after the first green one before trusting it.
- A nightly model is the only one whose cost does not grow with the number of pushes per PR. It trades the guarantee "every merge passed the suite in CI" for "a recorded local run prevents it, the nightly detects it, nothing reaches production without a full run". That is a real loss; say it in those words.
4. Build with safeguards
If the choice is the nightly model, NIGHTLY.md is the design and templates/ the skeletons. For any option, read
TRAPS.md before writing a workflow: most of the traps produce a green check that ran nothing.
- Read-only investigation first: current workflows, protection settings (read with the API, not from memory),
run history. Verify each platform fact in
TRAPS.mdagainst the provider's current documentation. - Write the design down and have it reviewed adversarially by someone or some agent that did not write it, before building. Ask the reviewer what a skipped job, an empty green run and a second job with the same name would do.
- Cap CI runs while building (for example three planned, six at most) and never push while a run is in progress: a cancelled run still bills.
- Plan the landing order (protection change, merge, first run) as in
NIGHTLY.md, so there is neither an unguarded window nor a PR that can never merge. - After merging, run the post-merge checklist in
NIGHTLY.md: a forced first run, a "no changes" run, an alert test, a real red run on a throwaway branch, the first scheduled run, and a before/after measurement over a week.
Be honest about effort: the nightly model with its safeguards takes a few hours to build and review, plus a week to confirm the savings. Until that week is measured, savings are a projection.
When NOT to do this
- The full suite takes a few minutes: the machinery costs more than it saves.
- A public repository on free hosted runners: minutes are not the constraint; only waiting time is.
- A full local run is impractical (hardware, licensed services, platform-specific runners): without it, the nightly model has no gate before the shared branch.
- Regulated settings that require CI evidence on every change: keep the suite on every PR and work on its speed instead (sharding, caching, test selection on top of a full run).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

