Skip to content
Code Generation
Skill

/ripwire-before-you-build

Starting a FEATURE (multi-symbol work): the plan, the API boundary, the scope — how big does this change get — from the codebase's real structure. Implementing an EXISTING interface? --lego=Iface lists its contract and current implementors. ONE standalone symbol → reuse-first. A

From plugin
ripwire
2.6k19 skills5 hooks1 MCP

Claude Code

$ npx -y skills add redhat-et/ripwire --skill ripwire-before-you-build --agent claude-code

SKILL.md

ripwire-before-you-build.SKILL.md
name: ripwire-before-you-build
description: >
  Starting a FEATURE (multi-symbol work): the plan, the API boundary, the scope — how big does
  this change get — from the codebase's real structure. Implementing an EXISTING interface?
  --lego=Iface lists its contract and current implementors. ONE standalone symbol → reuse-first.
  A small feature with an obvious home needs none of this.
allowed-tools: Bash, Read

Before you build — with ripwire

> Routing: > • Writing ONE symbol (fn/class/helper) and want to reuse rather than reinvent → **ripwire-reuse-first**. > • You've already written the change and want the pre-submit check → **ripwire-change-check**. > • You want to judge whether the code you wrote got better/worse → **ripwire-quality-bar**. > • Restructuring EXISTING code (not new work) → **ripwire-fresh-eyes**. > • Not sure which skill? → **ripwire-router**.

`<dir>` = repo root. `FEATURE`/`APPROACH` = your task in 2–4 plain words; `SYM` = a representative symbol. Run only the sections your question needs — they share the same building blocks.

Common first move — recall + reusable blocks

Almost every section starts here; do it once. **One-call shortcut:** `ripwire <dir> --pack-task="FEATURE" --legend=compact` assembles the recall + `--for` ranking + top bodies + caller signatures + notes + `tests_to_run` into ONE bundle under one token budget — reach for it first instead of firing the calls below one at a time; drop to the individual calls only when you need a specific section's full output.

  • **Recall prior decisions** — `ripwire <dir> --recall="FEATURE"` → full bodies of the most relevant

markdown docs (planning/design notes, READMEs) ranked by relevance. **If a doc already covers this, read it fully — the decision may be made.** Look for explicit "rejected" / "future work" language.

  • **Reusable building blocks — the one-call write-mode bundle** — `ripwire <dir> --for="FEATURE"` → `<sigs>`

ranked by task-relevance, each carrying the **quality lens** in the same call: `cx`/`ccx` (complexity), `in`/`amp` (reuse count / change-amplification), `churn` (recent-commits), `clone="1"` (duplicated), `tested="1"`, plus the inline `<doc>` block. That's read-context-and-quality-signal in ONE call — you learn what to reuse AND what's fragile (high-churn, high-amp, cloned, or untested) before you write a line, not after. High-`in` symbols are already widely composed — prefer extending them over reimplementing; treat a high-`churn`/high-`amp` one as something to touch carefully and test around.

  • **The shape to imitate for each new symbol** — `ripwire <dir> --exemplar=fn|method|class|struct|iface|var --legend=compact`

or `--exemplar="<the sub-task in words>"` (top match's kind inferred) → the repo's single best-in-class instance of that shape — cognitive complexity must clear an eligibility ceiling first (a blob can never win no matter how reused/tested), then among eligible candidates it's ranked `tested=1` first, highest fan-in second, lowest cognitive-cx as the final tie-break — full body under `<bodies>`. Run it per new symbol the feature adds so each one **copies a proven shape** (structure, error handling, naming) instead of being invented from memory. (Deep-dive on exemplar-by-ROLE → **ripwire-reuse-first**.)

  • **Implementing against an interface?** — `ripwire <dir> --lego=I --legend=compact` (or `--lego=file:I` to disambiguate a

same-named type) → the interface's method contract (the exact signatures you must satisfy) **plus every existing implementor**, own-language only. Read one existing impl as the template so your new one matches the house pattern (method order, error handling, registration) instead of guessing the shape from the interface alone. The single highest-value call when the thing you're building has to satisfy an `I`.

Feasibility spike — "is this approach even viable?"

After the recall + `--for` above: 1. If highly-relevant symbols already exist with `in > 0`, the approach is **partially implemented** — build on it. If `--recall` shows it was decided against, stop. 2. **Integration seams** — `ripwire <dir> --seams --legend=compact` → `<seams>` (untested cross-module edges). If your approach must connect two modules with no test-covered seam between them, that's an integration cost. 3. **Coupling cost** — `ripwire <dir> --deps --legend=compact` (skim `<godfiles>` + `shape=`). Adding a dependency on a god-file adds coupling cost for every future change — flag it. → **Verdict:** "build on existing" / "greenfield but seams exist" / "needs new seam, flag risk".

Plan — "give me the ordered implementation steps"

1. Recall + `--for` (above) — check whether any existing symbol already solves part of the problem. Low `in=` = an underused candidate to extend or replace; high `in=` = load-bearing, extend cautiously. 2. **Integration seams** — `ripwire <dir> --seams --legend=compact`. Each seam is a wiring point; your plan should name which seam(s) the new code wires through, and add a test at each new seam it creates. 3. **Impact of anything you'll modify** — `ripwire <dir> --impact=SYM --legend=compact`. Large `reaches=` → plan a staged rollout or a compatibility shim. → **Plan:** ordered steps (recall → design → wire seams → write tests → implement), each naming the specific file+symbol to touch, the blast radius of any modification, and its test gate (from `--affected`). Flag any step that creates a new seam without a test.

Interface — "what should the boundary / API look like?"

1. **Neighborhood of the subsystem** — `ripwire <dir> --around=SYM --legend=compact --metrics [--around-depth=2]` → the ego graph with ranks + call edges. `--metrics` is what adds the `in=` fan-in annotation (bare `--around` emits none); **high-`in=` symbols are already acting as the de-facto API surface.** 2. **The seam it lives on** — `ripwire <dir> --seams --legend=compact`. If your subsystem straddl

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-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
ripwire-graph-query

ripwire-graph-query

A call-graph question the fixed verbs can't phrase — 'which high-complexity functions can reach X?', 'what has 10+ callers in…

@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-before-you-build.

Which coding agents can use ripwire-before-you-build?
ripwire-before-you-build 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.