ripwire-perf-target
Skill2.4k starsChanged 3 months agoApache-2.0View on GitHub
A MEASURED performance problem: start from a benchmark, flame graph, perf sample or profiler run, locate the hot symbol the profile names, test structural hypotheses (memory-bound → cache-line data layout). Static metrics are change-risk signals, not runtime heat. Inspect only the symbols the profile names.
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-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
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Use cbo/nest/loc to form code-reading hypotheses inside the already-measured surface: coupling may constrain a rewrite, nesting may hide …
- Distinctive: line 92
Reordering, packing, padding: No rewrite mode, no "sort by size", no hole report.
- Distinctive: line 93
AoS vs SoA: Not modeled at all — there is no verdict here on changing a container's shape.
- Very specific: line 94
Which instance, or what a pointer points at: No points-to analysis: an access is approximated by <function, struct type>.
≈ “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
Performance targeting with ripwire
Nearest neighbours: • Repo-wide quality/health sweep (not perf-specific) → ripwire-fresh-eyes (also uses --hotspots). • Finding a specific BUG, not a slow path → ripwire-find-bug.
Trigger: a representative benchmark, flame graph, trace, or profiler has identified a slow operation, file, stack, or symbol and you need to understand where a safe optimization belongs. If you have no measurement yet, create the smallest representative benchmark/profile first; ripwire cannot infer runtime cost from source shape.
<dir> = repo root.
- Pin the measured evidence — record the workload, baseline, profiler/trace result, and the symbol or subsystem it implicates. Keep the same workload for the after measurement.
- Navigate the measured surface —
ripwire <dir> --for="measured operation or symbol" --detail=3, then--callers=SYM,--callees=SYM, or--around=SYMas needed. This turns runtime evidence into a bounded source-reading set without pretending the graph measured execution. - Maintenance/change-risk context —
ripwire <dir> --hotspots --legend=compactOutput:<hotspots>ranked byscore = churn × ccx(churn = git commit frequency over 12mo; ccx = cognitive complexity). Thetop=attribute names the highest-complexity function in each file. High-score files are frequently changed and structurally complex: useful evidence about optimization risk and validation scope, but structural evidence, not runtime heat. A slowdown/regression traced to a specific change, not an all-time read — use the recent-churn lens:ripwire <dir> --hotspots --legend=compact --since="2 weeks ago"(or--since=HEAD~20for a deterministic rev) ranks by commits after that point instead of all-history, which is the right lens for "this got slower after X" rather than a static hot-function scan. - Static dependency + shape hypotheses —
ripwire <dir> --metrics --legend=compact --top-k=50Output: the ranked map within=(fan-in),cx=/ccx=(complexity),cbo=(coupling between objects — how many other types this symbol touches),loc=(body size), andnest=(max nesting depth) on each symbol.in=is static dependency fan-in, not execution frequency. Usecbo/nest/locto form code-reading hypotheses inside the already-measured surface: coupling may constrain a rewrite, nesting may hide branchy or quadratic work, and large bodies may combine unrelated work. Readnest=with its profile, never alone — it is a max, sohumps=(regions reaching the nesting bar) anddeep=(lines inside them, a floor) on the same row are what separate a body that sustains depth from a long flat one whose max is a single inner loop;deep/locis the discriminator (→ ripwire-quality-bar). Confirm every suspected bottleneck with the benchmark/profile. On C-family/C# code, discount appalt=-carrying body:cx=/ccx=/nest=/loc=/locals=sum ALL#else/#ifdefbranches, not just the one your build compiles, so a hot function that also happens to be preprocessor-heavy can look structurally worse than the code path actually executing.
4a2. Join the measured heat onto the static findings — ripwire <dir> --lint --legend=compact --with-profile=REPORT
REPORT is a RIPWIRE_PROFILE build's own stderr report (its #PROF_TSV block, verbatim). Every --lint
finding whose enclosing symbol contains a PROFILE_SCOPE site gains heat_* attributes — the scope's
measured calls, total_ms, and whichever counter columns that run armed (heat_l1d_mpki etc.; an ABSENT
column was not measured, never zero). This is the one-command answer to "which of these cache-* rows are
actually HOT": static shape × PMU weight (SYZYGY's advice mode, Hundt CGO 2006). heat_joined="0" on
the root is honest — no finding sits inside a profiled scope — never an error.
4b. If the profile points at MEMORY, not compute — cheapest first, ripwire <dir> --lint --legend=compact runs the
built-in cache-* pack (8 static data-layout checks, e.g. cache-gather-subscript,
cache-vector-of-indirect, cache-pointer-chase-loop) as part of an ordinary lint pass — no profile
required, so it is worth a look before reaching for the heavier lens below. When a specific struct is
already implicated, --field-affinity[=STRUCT]
When to reach for it. The measurement already implicates a struct-heavy path and the shape of the
evidence says data layout, not algorithm: cache-miss or memory-stall counters dominating the profile,
a loop whose cost does not track its instruction count, a hot/cold field mix (a couple of fields read on
every pass, a dozen touched only on cold paths), or a wide struct threaded through many callers. Bare =
every aggregate in the repo ranked by separation cost; =STRUCT narrows to the one the profile named —
prefer the narrow form, per this skill's stop rule.
Output: per struct, which fields the indexed C/C++/ObjC functions access TOGETHER, diffed against the
declared field order and 64-byte cache-line geometry (Chilimbi's separation weight, PLDI 1999 — cited,
not invented here). Exactly two findings fire, both with a direction defensible in one sentence:
split-line (a co-accessed pair at wt="0.00", i.e. ≥64 bytes apart — no field order can put them
on one line) and straddle (one co-accessed field crossing a line boundary, so every access to that ONE
field touches two lines).
What it does NOT detect — the boundary matters more than the findings, because a layout change made on the wrong evidence is expensive and hard to unwind:
- Runtime frequency.
fns=counts distinct indexed functions (counts_floor="1") andw=is a static call-graph reachability proxy (weighting="fanin-floor") — a struct can top the ranking and cost nothing because it is constructed once. - False sharing. That is the inverse question (which fields to SEPARATE), and this lens has no opinion on it. It is also why no packing advice is emitted: tight packing co-locates independently written fields and can induce false sharing, so the axis is not monotonic.
- Reordering, packing, padding. No rewrite mode, no "sort by size", no hole report. Advice only.
- AoS vs SoA. Not modeled at all — there is no verdict here on changing a container's shape.
- Which instance, or what a pointer points at. No points-to analysis: an access is approximated by
<function, struct type>. Only dot/arrow syntax counts, so a bare field name inside its own method is invisible, and a field name declared by two aggregates is REFUSED intoamb_skipped=rather than guessed. - True
sizeof/alignment under templates, virtuals, bases and your target ABI. All geometry is an LP64 model (model="lp64-approx"); a definition the layout model refuses (modeled="0") contributes its co-access graph and no geometry finding. - Pointer-chasing stalls — with one narrow exception, in the other direction: the same verb also
classifies each C-style
forloop's advance asindex/chase/mixed/unknownand can flag a declared field as the traversal's chase pointer (chase="1" loops="N"). It is purely syntactic, C-family only, and range-for/while/recursion always readunknown(as_unknown=), so a zero there means "not classified", never "no chases." It ships report-only — it does not move the ranking.
This is a HYPOTHESIS GENERATOR, not a measurement — same rule as every static signal on this page.
For runtime truth, go back to the counters: <validate> names the instrumented PROFILE_SCOPE whose
hardware counters would confirm or refute the hypothesis (the PMC backend is src/infra/profilePmc.h —
kpep on macOS, perf_event_open on Linux), bench/bench_field_ab.cpp is the A/B harness, and
docs/FIELDAFFINITY.md records a worked example in which the static hypothesis was refuted under one
access pattern. Confirm on hardware before changing a layout, exactly as with every other item on this
list. Exit is always 0: a report, not a gate.
- Expand measured candidates —
ripwire <dir> --expand=SYM --legend=compactfor the implicated symbols. Output: full body + callee signatures. Look for inner-loop allocations, redundant work, or O(N²) patterns that profiler data would confirm. - Re-measure — make one bounded change, rerun the same workload, and report latency/throughput plus any correctness/determinism gate. A structurally attractive refactor with no measured improvement is not a performance win.
Output
Measured baseline and workload; the profiler/trace evidence; the bounded symbol/caller/callee surface; structural hypotheses clearly labeled as non-runtime evidence; the change; and the same after measurement.
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.

