Skip to content
Code Generation
Skill

/ripwire-write-tests

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

From plugin
ripwire
2.6k19 skills5 hooks1 MCP

Claude Code

$ npx -y skills add redhat-et/ripwire --skill ripwire-write-tests --agent claude-code

SKILL.md

ripwire-write-tests.SKILL.md
name: ripwire-write-tests
description: >
  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.
allowed-tools: Bash, Read

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** · unsure → **ripwire-router**.

`<dir>` = repo root (or a subsystem, to focus the list). This skill answers "what should I write a test for, and what does it need to cover" — not "is my diff safe".

The recipe

1. **Find the gap** — `ripwire <dir> --seams --legend=compact` lists cross-module call edges no test reaches: the highest-value targets (one test per seam buys the most coverage per line). Prefer a seam over a lone symbol; a widely relied-on symbol with no `tested="1"` beats an uncovered leaf (`--metrics` shows the lens, `in=` the fan-in). 2. **The contract from OUTSIDE** — `ripwire <dir> --callers=SYM --legend=compact`: the preconditions and argument shapes callers actually rely on. Then `ripwire <dir> --expand=SYM --legend=compact` to see which branches exist — cover them, not only the happy path. 3. **Verify it registers** — `ripwire <dir> --affected=<the file you just changed> --legend=compact` must now list your new test file. If it doesn't, the harness is not discovering it (naming, registration) — fix that first. To see what an existing test already covers (or the first call when a test fails and you only have its name): `ripwire <dir> --exercises=test/<harness> --legend=compact`. 4. **Close the loop** — `ripwire <dir> --test-gate --legend=compact` on the symbol's file goes green once the symbol leaves the untested blast radius.

Stop rule and trust

For one target, one `--seams` or `--callers` pass suffices — then write the test. `tested` is omitted, never a fabricated zero, when no indexed test reaches a symbol; shell/subprocess tests sit outside the call graph, so an absence is a structural finding, not proof that no test exists.

Reference file

`write-tests-reference.md` — each step in full, the `tested=1` lens, `--exercises`, and the Output shape.

Read more
@redhat-et
Ships withripwire

The ripgrep of AI context. A map before your agent reads the repo — and a check on what it writes. Ranked, deterministic call graph: what to touch, what it breaks, which tests to run.

2.6k19 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.6k
Star history of redhat-et/ripwire on GitHub, a chart by star-history.com

Other skills on ripwire.

emitting-output

emitting-output

Writing or converting formatted output in ripwire's C++ source — std::print/std::format via rw::emitTo, emitRaw and formatTo,…

@redhat-et@redhat-etInstall Skill
ripwire-before-you-build

ripwire-before-you-bui…

Starting a FEATURE (multi-symbol work): the plan, the API boundary, the scope — how big does this change get — from the…

@redhat-et@redhat-etInstall Skill
ripwire-change-check

ripwire-change-check

Merge-SAFETY of an existing diff — yours before you push, or a PR you review: blast radius, tests to run, a broken contract…

@redhat-et@redhat-etInstall Skill
ripwire-find-bug

ripwire-find-bug

You have a SYMPTOM — crash, exception, wrong output, failing test, error string — and don't know which code is responsible. Ranks…

@redhat-et@redhat-etInstall Skill
ripwire-fresh-eyes

ripwire-fresh-eyes

Maintenance risk in code you did NOT write — inheriting a module, planning a refactor, a suspected god object, 'what's gnarly /…

@redhat-et@redhat-etInstall Skill

More skills from other plugins.

orval

orval

Generate type-safe API clients, TanStack Query/SWR hooks, Zod schemas, MSW mocks, Hono server handlers, MCP servers, and…

orval1d6.6k
@orval-labs@orval-labsInstall Skill
claude-api

claude-api

Use this skill when the user is building against Anthropic APIs or SDKs, including `@anthropic-ai/sdk`, `anthropic`, or Agent SDK…

@oboard@oboardInstall Skill
paper2code

paper2code

Converts an arxiv paper into a minimal, citation-anchored Python implementation. Trigger when user runs /paper2code with an arxiv…

paper2code13d1.5k

Questions about ripwire-write-tests.

Which coding agents can use ripwire-write-tests?
ripwire-write-tests installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.