ripwire-reuse-first
Skill2.4k starsChanged 3 months agoApache-2.0View on GitHub
About to write ONE symbol (even a 'quick' one-liner) or add a dependency: reuse before you reinvent. Finds the building block that already exists, the house pattern to imitate, the duplicate you'd recreate, a vendored dependency. An interface or whole feature → before-you-build. One --exemplar or --grep call at most.
Trending
More talk lately.thin dataabout the whole repository
Who's talking about redhat-et/ripwire
- A Hacker News story“ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo”Hacker News · Sep 7, 2026 · 19 points
- @icecodenew.bsky.social“#TIL github.com/redhat-et/ri... > Point it at any repository and your agent gets a ranked, deterministic …”Bluesky · Sep 6, 2026 · 3 likes
- A Hacker News story“The Ripgrep of AI Context”Hacker News · Sep 8, 2026 · 2 points
- @akanoa.bsky.social“On se débarrasse enfin du code! On descend à l'AST et bientôt plus bas. Ce n'est qu'une question de temps. …”Bluesky · Sep 8, 2026 · 1 likes
- @hn100.bsky.social“ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo Discussion”Bluesky · Sep 7, 2026 · 1 likes
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
- Oct 3, 2026agent-skills.github.redhat-et.ripwire: 0.6.2 → 0.6.5 — sudosubin/agents.nix0 reactions
- Oct 1, 2026agent-skills.github.redhat-et.ripwire: init at 0.6.2 — sudosubin/agents.nix0 reactions
- Sep 29, 2026ripwire: 0.6.1 -> 0.6.5 — NixOS/nixpkgs0 reactions · 1 comment
- Sep 24, 2026docs(non-cc): screenshot-lead research batch 13 (plan 0008 row 20) — qte77/ai-agents-research0 reactions
- Sep 21, 2026feat(setup): the ripwire hint names the upstream repository, in setup and both installers (D178) — dimitritholen/tasqx0 reactions · 3 comments
4 more on GitHub
- Sep 20, 2026Candidate: ripwire, a repo map for coding agents — cinjoff/firehorse0 reactions
- Sep 19, 2026ripwire: 0.5.0 -> 0.6.1 — NixOS/nixpkgs0 reactions · 4 comments
- Sep 10, 2026Static analyzer flags prompt-injection example text inside fenced code blocks as CRITICAL — runkids/skillshare0 reactions · 2 comments
- Sep 7, 2026Qualify ripwire as local code-intelligence/context source candidate — TheHalfMoon/Golam0 reactions
On Bluesky · 3
- Sep 6, 2026#TIL github.com/redhat-et/ri... > Point it at any repository and your agent gets a ranked, deterministic call graph — what to touch, what… — @icecodenew.bsky.social3 likes and reposts · 1 reply
- Sep 8, 2026On se débarrasse enfin du code! On descend à l'AST et bientôt plus bas. Ce n'est qu'une question de temps. github.com/redhat-et/ri... — @akanoa.bsky.social1 likes and repost · 1 reply
- Sep 7, 2026ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo Discussion — @hn100.bsky.social1 likes and repost
On Hacker News · 2
- Sep 7, 2026ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo19 points · 14 comments
- Sep 8, 2026The Ripgrep of AI Context2 points
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- emitting-outputSkill
- ripwire-repo-mapSkill
- ripwire-before-you-buildSkill
- ripwire-change-checkSkill
- ripwire-find-bugSkill
- ripwire-fresh-eyesSkill
- ripwire-graph-querySkill
- ripwire-handoffSkill
- ripwire-layersSkill
- ripwire-mcpSkill
- ripwire-navigateSkill
- ripwire-opt-remarksSkill
- ripwire-orientSkill
- ripwire-perf-targetSkill
- ripwire-quality-barSkill
- ripwire-routerSkill
- ripwire-security-scanSkill
- ripwire-write-testsSkill
The file
Files
Reuse before you write
Routing — pick the right door: • Starting a whole FEATURE (multi-symbol, needs a plan / interface / sizing) → ripwire-before-you-build. • The cross-cutting map-before-you-read token discipline for any read → ripwire-orient (
map-before-you-read.md). • Judging whether what you wrote got better or worse before "done" → ripwire-quality-bar. • Not sure which skill? → ripwire-router.
The cheapest, simplest, most readable code is the code you don't write. Before authoring anything
non-trivial, spend one ripwire call (on PATH) to find what already exists.
Retrieve by ROLE, never by raw similarity
This is the load-bearing rule, not a style preference: similarity-retrieved "here's similar code, paste it" measurably HURTS — up to −15% Pass@1 (arXiv:2503.20589). What helps is API/type-signature context (+17-20%) and dependency-graph-structured retrieval (+6 EM; enabled 5/6 multi-file edits vs 0/6 without a graph). ripwire's shape — signatures + call-graph + role-ranked exemplars — is the validated retrieval shape; "find me a similar-looking snippet" is the anti-pattern to avoid, even though it's the tempting first instinct.
Before you write a function / class / util
- Find the building block first —
ripwire <dir> --for="<what you're about to build>"→ ranked existing signatures (plus, when the code has them, the<lego>/<compose>HAS-A blocks — what a class already owns; a block that would cost more than its count arrives as a counted stub,shown="0"with anext=, and--sections=lego,composerestores both in full). If you can name the helper you suspect exists, query it verbatim (--for="parseByteSize") —--forauto-routes to name-exact retrieval and lands it at recall@1 ~99%. It also carries the quality lens (cx/ccx/in/churn/amp/tested) so you see which candidates are safe to extend. Often the thing exists — compose from it. - Optionally get a style/shape exemplar — if the retrieval result leaves a local-idiom question,
ripwire <dir> --exemplar=fn|method|class|struct|iface|var --legend=compact(a kind) or--exemplar="<task in words>"(the top match's kind is inferred) returns the repo's single best-in-class instance of that shape: highest fan-in, lowest cognitive complexity,tested=1where possible — selected by ROLE, not text similarity. It returns the full body under<bodies>. Copy its shape (structure, error handling, naming), not its text — it is a model to imitate, not a relevant-code search. - Find candidates by behavior/shape —
ripwire <dir> --grep="<a word from the behavior>" --legend=compact, or a NARROWED graph query:--graph-query='and(file(all,"<area>"),kind(all,fn))'. (Barekind(all,fn)is ranked by importance + capped at--top-k, so it's safe — but narrowing byfile()/name()/callers()finds the relevant building block, not just the globally-important one.) → implementations to reuse or extend. - Don't duplicate —
ripwire <dir> --clones --legend=compact→ if your intended body matches an existing one, call it instead. Rule of Three: extract a shared helper on the third occurrence, not the second — and prefer a little duplication over the wrong abstraction (a helper you bend with boolean flags is worse than two honest copies).
Before you add a dependency
- Is it already here? —
ripwire <dir> --external-surface --legend=compact(what the tree already depends on; the default is a 100-row window with the sh builtins dropped and counted asbuiltins_excluded=—--include-builtinskeeps them) and--uses=NAME(the import role). Reuse an in-tree dependency before adding a new one: a new dep is build weight, supply-chain surface, and one more thing every reader must learn — it has to earn its place. - Before adding/vendoring a NEW dependency, map the candidate repo first —
ripwire <git-url>(https:// or git@; shallow-clones to a temp cache dir, then maps it like any local tree —--refetchforces a fresh clone instead of reusing the cached one). Run--report/--hotspots/--depson it before you commit to the dependency: is it actually small and well-factored, or a god-file waiting to become your problem?
When you do write
- Match the local idiom —
ripwire <dir> --for="<the area>"shows the surrounding naming, layout, and error-handling style. Mirror it so your diff reads like the file, not like a graft (cache-friendly for the reader and for KV-cache reuse). - Less code wins on every metric at once: lower complexity, fewer call edges, smaller blast radius, less to test, less to read. When in doubt, delete a parameter before adding one.
Then hand off to ripwire-quality-bar before you call it done.
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.

