Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/rjwalters/kicad-toolsnpx agentmods add commands/rjwalters/kicad-tools/optimize-ciWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/rjwalters/kicad-tools/optimize-ci)<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/optimize-ci"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/optimize-ci/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/optimize-ci"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/optimize-ci.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.05530 |
| Opus 5.5 | $0.00020 | $0.02212 |
| Sonnet 5.5 | $0.00010 | $0.01106 |
| Haiku 4.5 | $0.00005 | $0.00553 |
Grade A, and why
optimize-ci scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 430 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/repo:optimize-ci — Stop CI Doing Work That Cannot Matter
Find the four ways CI routinely wastes runner minutes, prove how much each one costs from real run history, and propose the fix:
- No change-relevance filtering — full suites on documentation-only PRs,
heavy jobs on changes that cannot affect them. And the opposite hazard: an
existing
paths:filter that omits a real input (a lockfile, the workflow file itself, a local action), which lets a breaking change merge green. - Weak or missing caching — no toolchain cache at all, or a cache keyed so
it never hits (
github.shain the key) or never invalidates (no lockfile hash in the key). - Superseded runs — no
concurrency:/cancel-in-progress, so every push to a PR leaves the previous run burning minutes; or duplicatepush+pull_requesttriggers running the same commit twice. - Default-branch cost — push-only workflows (deploys, main-only suites)
with no ref-scoped group or an unconditional
cancel-in-progress: true, and heavy suites that re-run on every merge although the PR already ran them.
Modeled on [[deps]]: a report-first audit of repo configuration that proposes
changes and gates writes. The default mode and --check never write. --apply
writes proposed workflow edits on a branch and opens a PR, under the same
authorization convention as [[deps]] and [[release]]: apply existing
authorization when it covers the concrete edits, otherwise show the diff and
confirm first. Never push to the default branch.
The deterministic half — workflow parsing, trigger/paths/cache/concurrency
extraction, required-check lookup, run-timing aggregation — is
scripts/repo/repo-optimize-ci.py in the source checkout, installed to
.claude/skills/repo/scripts/repo-optimize-ci.py. Every GitHub call it makes is
a GET. This file is the judgment half: verifying what the helper inferred,
choosing the right fix shape, and writing it.
Usage
/repo:optimize-ci # Report findings for this repo, ranked by estimated savings
/repo:optimize-ci --check # Report only — never writes (same as the default)
/repo:optimize-ci --apply # Write proposed workflow edits on a branch and open a PR — confirm first
/repo:optimize-ci --all-repos [--owner OWNER] # Read-only org survey, repos ranked by wasted CI minutes
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +109 lines · +10 tokens per session f1e78538bcee
- 2mo ago First seen · 321 lines · 40 tokens per session scan A 52486703177e
optimize-ci is a command published in the GitHub repository rjwalters/kicad-tools (77 stars, last pushed 15d ago), licensed MIT. It adds 50 tokens to every session and 5,530 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.
optimize-ci compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| optimize-cirjwalters/kicad-tools | Command | 77 | 15d ago | MIT | A | 50 | Claude Code |
| dart-fix-cidartsim/dart | Command | 1.2k | yesterday | BSD-2-Clause | A | 6 | Claude Code |
| domainsgotempsh/temps | Command | 955 | today | Apache-2.0 | A | 0 | Claude Code |
| check-release-healthopenshift-eng/ai-helpers | Command | 123 | yesterday | Apache-2.0 | A | 22 | Claude Code |
| merge-conflict-analysisrjmurillo/ai-agents | Command | 50 | today | Apache-2.0 | A | 0 | GitHub Copilot |
| ADO: Get Build InfojnPiyush/AgentX | Command | 19 | today | Apache-2.0 | A | 24 | GitHub Copilot |
| release-managerruvnet/agentic-flow | Command | 850 | 20d ago | none | A | 0 | Claude Code |