ripwire-graph-query
Skill2.4k starsChanged 3 months agoApache-2.0View on GitHub
A call-graph question the fixed verbs can't phrase — 'which high-complexity functions can reach X?', 'what has 10+ callers in src/?', 'untested symbols within one hop of main'. --graph-query: a small closed expression language — kind, complexity, fan-in, tested filters; a file or cluster; bounded hops; and/or/not.
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-handoffSkill
- ripwire-layersSkill
- ripwire-mcpSkill
- ripwire-navigateSkill
- ripwire-opt-remarksSkill
- ripwire-orientSkill
- ripwire-perf-targetSkill
- ripwire-quality-barSkill
- ripwire-reuse-firstSkill
- ripwire-routerSkill
- ripwire-security-scanSkill
- ripwire-write-testsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Run the first to size the cluster, the second to size the risk — a small high-cx cluster with a huge callers() closure is a refactor that …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Graph queries with ripwire
One-hop questions have cheaper verbs — ripwire-navigate (
--callers,--callees,--uses,--path,--impact). Reach for--graph-queryonly when you need to COMBINE conditions. Repo-wide architecture health (not one query) → ripwire-layers.
Planning a refactor: find the cluster AND its blast radius
The refactor-planning question is always two conditions at once — "what's messy" AND "what would touching it affect" — which is exactly what a single fixed verb can't phrase:
# the refactor short-list: high-complexity functions in the target area
ripwire <dir> --graph-query='and(cx(all,15),file(all,"src/"))' --legend=compact
# now the blast radius: everyone who transitively calls into that cluster (≤3 hops)
ripwire <dir> --graph-query='callers(and(cx(all,15),file(all,"src/")),3)' --legend=compact(Verified on this repo's shape, not its exact numbers — count= drifts every commit: the first query returns
the high-cx symbols under src/, each <s t= n= p=> (kind/name/path); the second returns the transitive
caller set, typically smaller than the cluster itself because many hits are leaf-ish or call each other. Read
the header's own count=/shown= on your run, don't trust a number pasted here. Narrow file(...) to your
actual target directory before trusting the numbers.)
Run the first to size the cluster, the second to size the risk — a small high-cx cluster with a huge
callers() closure is a refactor that needs a compatibility shim or a staged rollout, not a rewrite in
place; a small cluster with a small closure is safe to just rewrite.
ripwire <dir> --graph-query='EXPR' --legend=compact evaluates a small functional expression to a deterministic,
ranked node set (capped at --top-k, default 200). It is a fixed, closed operator set — not
Datalog: no user rules, no unbounded recursion.
The operators
| Kind | Form | Meaning |
| source | name("X") | symbols named X (unions same-name defs) |
| source | all | every INDEXED symbol |
| filter | kind(EXPR, K) | keep kind K: fn method cls struct iface var sec |
| filter | cx(EXPR, N) | keep cyclomatic complexity ≥ N |
| filter | fanin(EXPR, N) | keep in-degree (caller count) ≥ N |
| filter | file(EXPR, "RE") | keep symbols whose file path matches the ECMAScript regex RE |
| closure | callers(EXPR [, D=1]) | nodes that transitively (≤ D hops) CALL anything in EXPR |
| closure | callees(EXPR [, D=1]) | nodes transitively (≤ D hops) CALLED BY anything in EXPR |
| join | and(A, B) / or(A, B) | intersection / union |
| join | not(A, B) | difference (A minus B) |
Verified examples (single-quote the whole expression for the shell)
# the functions that transitively (≤2 hops) call buildGraph
ripwire <dir> --graph-query='and(callers(name("buildGraph"),2),kind(all,fn))' --legend=compact
# high-complexity symbols in src/ (the refactor short-list)
ripwire <dir> --graph-query='and(cx(all,15),file(all,"src/"))' --legend=compact
# heavily-depended-on symbols (10+ callers) — the de-facto API surface
ripwire <dir> --graph-query='fanin(all,10)' --legend=compact
# everything main can reach within 2 hops
ripwire <dir> --graph-query='callees(name("main"),2)' --legend=compact
# functions NOT reachable from main's callers (difference)
ripwire <dir> --graph-query='not(kind(all,fn),callers(name("main")))' --legend=compact
# a two-symbol watchlist
ripwire <dir> --graph-query='or(name("buildGraph"),name("rankGraph"))' --legend=compactCalibration
- Results come back importance-ranked and capped at top-k —
count=vsshown=in the header tells you if the cap bit; narrow the query or raise--top-k. - Closures walk the same name-based edges as
--callers— dynamic dispatch / callbacks / macros can be missing, andambedges were guessed. Verify in source when which-target matters. - A malformed expression (unknown operator, bad
file()regex) reports the parse error and yields nothing — it never half-answers.
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.

