agentleFS
redhat-etredhat-et/ripwire/skills/ripwire-write-tests/SKILL.md

ripwire-write-tests

Skill2.4k starsChanged 3 months agoApache-2.0View on GitHub

Write tests for EXISTING code that has none — 'this is untested, add coverage', 'add a safety net first'; also verify a new test reaches its intended code. Finds what no test reaches: --seams ranks untested cross-module edges, --callers gives the outside contract. Diff test selection → change-check. For one target one --seams or --callers pass suffices.

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 12 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the redhat-et/ripwire repository that our weekly crawl found: only 14 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about redhat-et/ripwire

The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 14

Talked about on GitHub, Bluesky and Hacker News (14 times).

On GitHub · 9

4 more on GitHub

On Hacker News · 2

The file

Files
SKILL.md

Writing tests with ripwire

Routing: • Vetting a diff you already wrote (does it have test cover) → ripwire-change-check. • Judging whether your OWN code got better/worse → ripwire-quality-bar. • Don't know which symbol is even the bug → ripwire-find-bug. • Not sure which skill? → ripwire-router.

<dir> = repo root. This skill answers "what should I write a test for, and what does it need to cover" — not "is my diff safe" (that's change-check).

Find the gap

  1. Untested integration seams — ripwire <dir> --seams --legend=compact → <seams> lists cross-module call edges no test reaches. These are the highest-value targets: a bug here crosses a boundary silently, and one test per seam buys the most coverage per line written. Scope with <dir> = a subsystem to focus the seam list.
  2. The tested=1 coverage lens — ripwire <dir> --metrics --legend=compact --top-k=50 (or --for="<area>", which carries the same lens inline) → tested="1" means an indexed test-path symbol transitively reaches this production symbol. On these explicit metric surfaces the attribute is omitted when no indexed test reaches it; the binary never prints a fabricated zero. Cross an omitted tested with in= (fan-in): a widely-relied-on function with no indexed safety net is a sharper priority than an uncovered leaf. Shell/subprocess test coverage remains outside the call graph, so absence is a structural finding, not proof that no external test exists.
  3. Pick the target — prefer a seam over a symbol lacking tested=1 when both are candidates; a seam test proves two modules cooperate correctly, a unit test on one function does not.

Write it with the right contract

  1. The contract from OUTSIDE — ripwire <dir> --callers=SYM --legend=compact for the symbol you're testing. Callers show the preconditions and argument shapes callers actually rely on — write the test against that observed contract, not just the signature.
  2. The body, to know what branches exist — ripwire <dir> --expand=SYM --legend=compact → full source + callee signatures. Cover the branches; don't just re-assert the happy path the caller already exercises.

Verify the test actually registers

  1. Confirm it's wired in — ripwire <dir> --affected=<the file you just changed> --legend=compact should now list your new test file among the tests that transitively reach the changed code. If it doesn't show up, the test harness isn't discovering the new file (wrong naming convention, missing registration) — fix that before trusting the coverage. 6b. Read what an existing test already covers — ripwire <dir> --exercises=test/<harness> --legend=compact lists the non-test symbols that test transitively calls into, ranked. Use it before writing anything to avoid re-covering ground a neighbouring harness already holds, and use it as the first call when an existing test FAILS and you only have its name. (A non-test path refuses — the verb is the test/non-test partition; for "what does this file call", use --callees.)
  2. Close the loop with the gate — once --affected proves the test registers, ripwire <dir> --test-gate --legend=compact on the symbol's file should now go green (the symbol drops out of the untested-blast-radius list). This is the same TDAD-parity gate ripwire-change-check runs before merge — writing the test here is what makes it pass there.

Output

Name the seam or symbol lacking tested=1 chosen and why (seam > high-fan-in symbol > leaf), the contract drawn from --callers, and confirmation from --affected that the new test registers. Re-run --seams/--metrics afterward — the gap you targeted should be gone.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.