[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F44X60PFCAMC173WSJW4KS":3,"skill-same:01M7F44X60PFCAMC173WSJW4KS":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7F44X60PFCAMC173WSJW4KS","ripwire-mcp",null,"Wire ripwire into an agent as an MCP server — `ripwire wrap AGENT` (Claude Code, Cursor, Codex, Gemini…) — and choose the server verb mid-task. Also tool HEALTH: a symbol you expected is missing from the ranked output, the index feels stale after a rebase, 'is my ripwire setup broken?'","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fripwire-mcp-ripwire\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: ripwire-mcp\ndescription: >\n  Wire ripwire into an agent as an MCP server — `ripwire wrap AGENT` (Claude Code, Cursor, Codex,\n  Gemini…) — and choose the server verb mid-task. Also tool HEALTH: a symbol you expected is missing\n  from the ranked output, the index feels stale after a rebase, 'is my ripwire setup broken?'\nallowed-tools: Bash, Read\n---\n\n# ripwire as an MCP server\n\n> Auditing somebody's `.mcp.json` for safety instead → **ripwire-security-scan**.\n\nTrigger: \"wire ripwire into my agent\", \"set up the ripwire MCP server\", or \"which ripwire MCP verb\nanswers this?\".\n\n**The 31 verbs, at a glance**: 16 read verbs (`analyze`, `for`, `find_symbol`,\n`find_referencing_symbols`, `grep`, `cochange`, `memory_recall`, `situational_awareness`, `mentions`,\n`owners`, `lego`, `batch` — N read sub-queries in ONE call — `fetch_body`, and `flags` — what is BUILT but\nDARK here: every compile \u002F CMake `option()` \u002F `getenv` gate with its default and the size of the code it\nguards, the answer to \"why don't I see feature X?\", and `doc_drift` — which of the repo's markdown claims\nare now FALSE: dead `file:line` anchors, deleted symbols, `= N` constants and `[N]` extents the code has\nsince changed; call it before trusting a design doc or audit you did not just write, and `slice` — per-line\ndef-use rows of ONE variable inside ONE definition, `flow=back|fwd|both` for the transitive data-flow\nslice, `@FILE:LINE` seeds by location and pre-picks the variable the seed line names) + 12 flagship-reflex verbs\n(`exemplar`, `quality_delta`, `quality_baseline`, `impact`, `uses`, `path_between`, `connect` — the\nminimal joining subgraph over N task symbols — the L4 one-call\u002FB11-parity trio `explore`, `from_trace`,\n`edit_check` — so an MCP-only agent gets the same write & done reflexes as the CLI — and the CROSS-BRANCH\npair `whereis` \u002F `stray_content`, which answer \"where does this content live?\" across every branch: the\nquestion `git cherry` cannot, since it compares commit ancestry and every other verb indexes one worktree.\n`stray_content` marks a branch `superseded` when the live line re-implemented its work, which is exactly\nthe case `git cherry` calls unmerged forever) + the 3 span-addressed\nedit verbs (`replace_symbol_body`, `insert_before_symbol`, `insert_after_symbol`). Only `find_symbol` and\n`find_referencing_symbols` attach a stable `handle=` instead of the body (fetch it only when you need it,\nvia `fetch_body`); the edit verbs enforce a safety contract (staleness refusal, ambiguity refusal, atomic\nwrites) detailed below and in full in [`mcp-reference.md`](mcp-reference.md).\n\nThe server exposes **31 MCP verbs**: 16 read verbs (incl. `fetch_body`\u002F`flags`\u002F`slice`), 12 flagship-reflex\nverbs (`connect`\u002F`explore`\u002F`from_trace`\u002F`edit_check` and the cross-branch pair `whereis`\u002F`stray_content`) and\n3 edit verbs — `ripwire wrap codex --force` prints the live count.\n\n## Wiring — `ripwire wrap \u003Cagent>` prints the recipe\n\n```\nripwire wrap claude      # → claude mcp add ripwire -- ripwire --mcp\nripwire wrap cursor      # → JSON mcpServers stanza for .cursor\u002Fmcp.json (also: windsurf, gemini)\nripwire wrap codex       # → TOML stanza for ~\u002F.codex\u002Fconfig.toml\nripwire wrap opencode    # → CLI first (AGENTS.md is read automatically); its config key is \"mcp\", NOT mcpServers\nripwire wrap aider       # → no MCP: ripwire . --for=\"\u003Ctask>\" > .ripwire-map.txt; aider --read .ripwire-map.txt\nripwire wrap --all       # → auto-detect installed agents, emit each one's config in one run\n```\n\n`wrap` never edits config itself — it prints; you review and run. Before printing it security-scans\n`.\u002Fskills` and `.agents\u002Fskills`: a CRITICAL finding blocks the recipe (exit 1) unless you pass\n`--force`; WARNs print and continue. Bare `ripwire wrap` lists the supported agents.\n\n### Audit the active Codex surface\n\nRun `ripwire \u003Crepo> --doctor --agent=codex` after install\u002Fupdate or when Codex appears to be using a stale\nbinary, missing a skill, skipping the advisory CLI-first hooks, or starting the wrong MCP executable. This\nextends the ordinary six-check doctor with four read-only checks over the LIVE environment: PATH binary\nagreement, exact parity between the installed skills and `.ripwire-manifest-v1`, executability of all three\nCodex hook roles, and the configured `mcp_servers.ripwire` command plus `--mcp` argument. Failing rows give\nthe exact installer\u002Fwrap repair command. The report deliberately emits no config contents or full shell\ncommands, so it is safe to paste for diagnosis; `--agent=codex` alone refuses because it modifies doctor.\n\n## The read verbs + fetch_body (and when each beats the CLI form)\n\nEvery verb takes `path` (the repo root; `memory_recall` takes the docs\u002Fmemory dir). For a split\nservice+client checkout, pass `paths: [dir1, dir2, ...]` instead — the additive multi-root array (`path` and\n`paths` together is a usage error; the 3 edit verbs accept it too, and land a write in the correct root's\nreal file via its label). The server keeps ONE cached workspace per canonical root set: a `paths` list is\ndeduped and ordered before it's used as the cache key, so calling with the same roots in a different order\nstill hits the warm cache instead of re-parsing; a genuinely different root set gets its own cache entry, not\na shared\u002Fstale one.\n\n**Line-seeded addressing — `@FILE:LINE` in any resolver-backed selector.** Holding a LOCATION (a diff hunk,\na compiler error, a stack frame) instead of a name? Pass `@src\u002Ffoo.cpp:120` (1-based line) as the selector\nand it resolves to the innermost definition enclosing that line — accepted by `find_symbol` \u002F\n`find_referencing_symbols` \u002F `impact` \u002F `edit_check` \u002F `path_between` (`from`\u002F`to`) \u002F `connect` (each entry) \u002F\n`lego` (`type`) \u002F `fetch_body` (`handle`), and by `uses` (which serves the enclosing definition's NAME —\nits sites stay name-matched, `of=` echoes the seed as typed). A bad seed — malformed spec, unmatched or\nambiguous path, line past EOF, a line no definition spans, two definitions sharing the line — is **refused\nwith the same specific diagnosis the CLI's `--at`\u002Fselector arms speak**, never guessed. The NAME-matching\nscan verbs (`owners`, `mentions`) do not resolve seeds; a resolvable seed there refuses by naming the\ndefinition it resolves to, so the retry is in the message. CLI twin: `--at=FILE:LINE` (the bare\nenclosing-chain report) and `@FILE:LINE` in any SYM selector; contract gate: `test\u002Fatcheck.sh` +\n`test\u002Fmcpverbscheck.sh` §7.\n\n| Verb | CLI twin | Ask it for |\n|---|---|---|\n| `analyze` | `ripwire \u003Cdir>` | the ranked XML map |\n| `for` (`task`) | `--for=TASK` | the task lens: signatures + cx\u002Fin metrics framed for reuse. **Auto-routes** the ranker — pass a symbol NAME verbatim as `task` to get name-exact retrieval (recall@1 ~99%); a conceptual phrase uses subtoken+body. Header prints `[routed: …]`. |\n| `find_symbol` (`symbol`) | `--callers` + `--callees` | locate a symbol with its callers AND callees in one call — each symbol carries a `handle` |\n| `find_referencing_symbols` (`symbol`) | `--callers=SYM` | just who references\u002Fcalls it — also handle-bearing |\n| `grep` (`pattern`) | `--grep=STR` | parallel literal scan + enclosing symbol + matched line |\n| `cochange` (`file`) | `--cochange=FILE` | the lockstep git partners of one file |\n| `memory_recall` (`task`, `top_k` + `budget_tokens` optional) | `--recall=TASK [--top-k=N] [--max-tokens=N]` | full bodies of the few relevant docs\u002Fmemory notes, bounded by the SAME default 8000-token body ceiling as the CLI (the header discloses `max_tokens=` and every cut). `budget_tokens` raises the ceiling explicitly when you want everything; `top_k` (default 8) shapes how many docs |\n| `situational_awareness` (`diff`\u002F`files` optional) | `--situ` | blast radius, tests_to_run, forgotten co-change partners, hotspot alert — as JSON; defaults to `git diff HEAD` |\n| `mentions` (`symbol`) | `--mentions=SYM` | which markdown plans\u002Fdesigns discuss a symbol |\n| `owners` (`symbol` optional) | `--owners[=SYM]` | bus-factor: recency-weighted author ownership |\n| `lego` (`type`) | `--lego=TYPE` | an interface's method contract + every implementor (own-language) |\n| `fetch_body` (`handle`) | `--expand=SYM` | the FULL source of one symbol's definition, addressed by a `handle` from a prior read verb |\n| `batch` (`queries`) | `--batch=FILE` | a one-turn context sweep: up to 16 heterogeneous read sub-queries (`for`\u002F`grep`\u002F`impact`\u002F`uses`\u002F`callers`\u002F`callees`\u002F`mentions`\u002F…) answered in ONE round-trip, merged in order and deduped (`\u003Cdup-of q=\"i\"\u002F>`); a failing sub-query is an inline `ok=\"0\"` entry, never a whole-batch failure. Reach for it when a task needs several lookups at once. |\n\n**The flagship-reflex verbs** (added 2026-07 so an MCP-only agent gets the same reflexes as the CLI) — these are the moments an agent most often skips the tool for; reach for the verb, not a grep:\n\n| Verb | CLI twin | The moment |\n|---|---|---|\n| `exemplar` (`kind` or `task`) | `--exemplar` | BEFORE you write a fn\u002Fclass\u002F… — the repo's best-in-class instance to imitate, chosen by ROLE (fan-in \u002F cognitive-cx \u002F tested), with its body |\n| `quality_delta` (`path`) | `--quality-delta` | BEFORE you call it DONE — only what the working tree made WORSE vs the baseline (auto-compares vs git-HEAD; a non-empty `regressions` array is the exit-2-equivalent) |\n| `quality_baseline` (`path`) | `--quality-baseline` | pin the quality floor (writes the HEAD-stamped `.ripwire_quality_baseline`) — a side-effect verb |\n| `impact` (`symbol`, `limit`\u002F`offset` optional) | `--impact=SYM [--limit=N --offset=M]` | \"is it safe to change X\" — the TRANSITIVE blast radius (beats `find_referencing_symbols`, which is 1-hop). `reaches=` is the true radius; the listing shows 40 by rank unless you raise it, and a paged answer carries `has_more`\u002F`next_offset` so a loop can terminate |\n| `uses` (`symbol`) | `--uses=SYM` | the resolvable USE-SITES — call\u002Fread\u002Fwrite\u002Fimport\u002Fextends, not just calls (`count=0` is a real answer; `counts_floor=\"1\"` — a floor, never a total) |\n| `path_between` (`from`, `to`) | `--path=A,B` | does A reach B, and the shortest call path (named `path_between` — `path` is the root-arg key) |\n| `connect` (`symbols`) | `--connect=A,B,C` | the minimal subgraph joining N (>2) task symbols — the shared-caller join a directed `path_between` can't see |\n| `explore` (`task`, `budget_tokens` + `partition` optional) | `--pack-task=TASK [--partition=N]` | ONE-call task orientation — routed ranking + full bodies + 1-hop callers + field notes + tests_to_run, ALL under one deterministic byte budget (default 6000 tokens). Replaces the `for` → `fetch_body` → `find_referencing_symbols` → `memory_recall` dance. Also dispatchable as `pack_task` (same handler; `explore` is the one advertised in `tools\u002Flist` — the discovery-friendly name). **`partition: 2..16`** turns it into the FAN-OUT form for a multi-agent orchestrator: a shared common core plus N minimally-overlapping per-agent slices carved along the call graph's communities, so N sub-agents stop re-deriving one map — `budget_tokens` then means ONE agent's budget (core + its slice). Read `overlap_max` \u002F `split` \u002F `partitions` vs `requested` on the wrapper before trusting the slices |\n| `from_trace` (`trace`, `budget_tokens` optional) | `--from-trace=FILE` | paste a stack trace \u002F sanitizer report \u002F compiler error → the frames mapped onto indexed symbols, ranked INNERMOST-first, with the innermost in-corpus symbol's FULL body. `trace` = the raw trace TEXT (no stdin\u002Ffile arg over MCP — paste it, don't hand-translate it into a query) |\n| `edit_check` (`symbol`) | `--edit-check=SYM` | just edited a symbol? did its CONTRACT (params\u002Fpublicness) change vs git HEAD, and which 1-hop callers are now PROVABLY incompatible? Fast targeted check — for the same question over a whole diff use `quality_delta` instead |\n\n**MCP beats the CLI when you're mid-task and will ask more than once**: the server keeps the parsed\n{ingest, graph, rank} in memory, so after the first parse every verb answers warm (~ms, no shell\nround-trip). **The CLI still wins for what no verb exposes** — `--expand`\u002F`--outline`, `--around`,\n`--deps`\u002F`--hotspots`\u002F`--clones`, `--graph-query`, `--arch`, `--pr-context`, `--scip`, `--lint-rules`,\n`--export`, and the two remaining B11 verbs with no MCP twin — `--merge-scout` (multi-ref UX doesn't map\ncleanly onto a single JSON-RPC call) and `--note-add`\u002F`--notes` (a write verb; adding it needs the same\nsafety-contract thinking the 3 edit verbs got) — shell out for all of these even with the server running;\nthe on-disk warm cache keeps them fast too.\n\n**Team\u002FCI: commit the warm cache as an index artifact.** `ripwire \u003Cdir> --index-out=BASE` cold-parses once,\nwrites `BASE.lean.ripwirecache` + `BASE.rich.ripwirecache` (`--for`\u002F`--exemplar`\u002F`--metrics` need RICH), then\nexits with no map. Generate on main, commit or CI-cache it, restore with `--cache=BASE.lean.ripwirecache` (or\n`.rich.`) in PR jobs so only changed files re-parse — a same-arch SPEED cache that self-heals to a cold parse\nif stale or cross-arch (correct, slower). See README \"The committable index artifact\".\n\n## Remote transport: `--listen` (Streamable HTTP) — opt-in, security posture is the feature\n\nBy default `--mcp` speaks JSON-RPC over **stdio** (one co-located agent). For a team sharing one warm\nindex, `--listen=HOST:PORT` serves the *same verbs* over **Streamable HTTP** (protocol `2025-11-25`)\ninstead — byte-identical JSON-RPC, only the transport differs, single-threaded against one warm index.\n\n**The security posture is the whole point** (a 2026 survey found ~200K MCP servers naively bridged to the\nopen internet with no auth — ripwire is built so it cannot become one by default): loopback-only by\ndefault; a routable host needs *both* the explicit host flag *and* a bearer token or the server **refuses\nto start**; no TLS built in (reverse-proxy it); one listener pins to ONE workspace at startup; and the 3\nedit verbs are refused over remote unless you pass `--allow-remote-edits` (which also forces the token).\nFull flag\u002Fenv reference, the `curl` recipe, and each refusal's exact wire behavior →\n[`mcp-reference.md`](mcp-reference.md#remote-transport).\n\n## The lazy-body posture: names\u002Fsignatures by default, bodies by handle on request\n\n`find_symbol` and `find_referencing_symbols` attach a stable `handle` to every symbol object they return\n(the focus symbol, each caller, each callee) — but **not the body**. Call `fetch_body{path, handle}` only\nwhen you actually need to read the source, instead of the server sending bodies you didn't ask for. This is\nthe kit-style default-lean posture (measured ~90% cut on comparable extract-symbol calls) and matches the\n`2025-11-25` MCP spec's move to stateless HANDLE semantics.\n\n- **Handle format**: `sym#\u003CidHash>@\u003CcontentHash>`, both 16 lowercase hex (FNV-1a-64) — `idHash` from the\n  symbol's STABLE canonical id (`path::scope::name`, never the per-run `NodeId`), `contentHash` pinning the\n  file's bytes at mint time.\n- **Fetch when you're about to reason about the logic**, not just to confirm the symbol exists — the\n  name\u002Fkind\u002Ffile\u002Fline a read verb already gives you is often enough to decide relevance or pick a call site.\n- **Staleness is automatic and free**: a content-hash mismatch (file changed since mint) makes `fetch_body`\n  refuse rather than serve a body against shifted byte offsets — call a read verb again for a fresh handle.\n  A malformed\u002Funresolvable handle refuses the same way, never a silent wrong-symbol body.\n- **Handles are content-addressed, not pinned literals**: both halves are derived hashes, so a handle you\n  copied out of a prior session or a doc is almost certainly stale — call `find_symbol`\u002F\n  `find_referencing_symbols` fresh each session and read the `handle` it hands back.\n\n## The 3 MCP edit verbs — the warm-server counterpart to the preferred CLI\n\n`replace_symbol_body`, `insert_before_symbol`, `insert_after_symbol` — the last 3 of the 30 (see above),\nripwire's MCP WRITE verbs. The preferred shell front door is\n`ripwire ROOT --replace-symbol-body=SYM --edit-payload=FILE|-` (or the matching insert flag); use MCP when\nthe server is already warm or a client has no shell. Both fronts call the same safety engine. Each locates\na symbol's definition in the parsed index and splices text at its byte span: `replace_symbol_body`\nswaps signature-through-closing-brace verbatim, `insert_before_symbol`\u002F`insert_after_symbol` splice text at\nthe def's first\u002Ffinal byte (auto-adding the separating newline so you don't have to guess).\n\n**The receipt already answers \"what now?\"** — it carries `lines={start,end}` for the applied text,\n`edit_check` (status \u002F callers \u002F incompatible \u002F each broken caller's call lines) and `tests_to_run` with the\nrun recipe: the same answers a separate `edit_check` verb and `--affected` would give, computed on the index\nthe edit just refreshed. Do not spend two more calls on them. `post_check:false` (CLI `--no-post-check`)\nopts out — reach for it only when the next thing you do is another edit to the same tree.\n\nRead **[`mcp-reference.md`](mcp-reference.md)** before calling one of these 3 (full args table + the exact\nnewline rule + the safety contract for not-found \u002F ambiguous \u002F stale-index \u002F insane-span failures + the\natomic-write guarantee) or when you need server internals (`--mcp` implies `--stable`, `_index` staleness\nstamps, warm content-hash rebuilds, working-set PageRank personalization, the background `qsnap` HEAD-warm on\nlarge workspaces). Short version: every edit-verb failure leaves the file byte-for-byte unchanged, writes are\natomic (`tmp` + `rename(2)`), and the server never goes stale silently — it rebuilds warm from mtime checks\nbefore every verb call. **Lead with this MCP form when the body already came from `fetch_body` this\nsession**; after a CLI `--expand`, keep the zero-standing-schema CLI path and use `--edit-payload=-`.\nSeveral harnesses' native Edit tool\nneeds a fresh Read of the file immediately before the edit, even when you already have the body from\nelsewhere in the session — these verbs check their own staleness hash instead of requiring one, so under any\nharness the file gets read at most once, never twice.\n\n**Workspace pin (stdio, D3\u002FD4):** when the server was started `ripwire \u003Croot> --mcp`, an omitted\n`path` on ANY verb (read or edit) defaults to that startup root; the 3 edit verbs above additionally\nREFUSE (file byte-identical, same contract as every other refusal above) if an explicit `path` resolves\noutside it — `path outside workspace; start the server on that root or pass an absolute in-root path`.\nRead verbs stay unrestricted at any `path`. A bare `ripwire --mcp` with no startup root is unchanged: every\nverb still requires its own `path`.\n","# ripwire as an MCP server\n\n> Auditing somebody's `.mcp.json` for safety instead → **ripwire-security-scan**.\n\nTrigger: \"wire ripwire into my agent\", \"set up the ripwire MCP server\", or \"which ripwire MCP verb\nanswers this?\".\n\n**The 31 verbs, at a glance**: 16 read verbs (`analyze`, `for`, `find_symbol`,\n`find_referencing_symbols`, `grep`, `cochange`, `memory_recall`, `situational_awareness`, `mentions`,\n`owners`, `lego`, `batch` — N read sub-queries in ONE call — `fetch_body`, and `flags` — what is BUILT but\nDARK here: every compile \u002F CMake `option()` \u002F `getenv` gate with its default and the size of the code it\nguards, the answer to \"why don't I see feature X?\", and `doc_drift` — which of the repo's markdown claims\nare now FALSE: dead `file:line` anchors, deleted symbols, `= N` constants and `[N]` extents the code has\nsince changed; call it before trusting a design doc or audit you did not just write, and `slice` — per-line\ndef-use rows of ONE variable inside ONE definition, `flow=back|fwd|both` for the transitive data-flow\nslice, `@FILE:LINE` seeds by location and pre-picks the variable the seed line names) + 12 flagship-reflex verbs\n(`exemplar`, `quality_delta`, `quality_baseline`, `impact`, `uses`, `path_between`, `connect` — the\nminimal joining subgraph over N task symbols — the L4 one-call\u002FB11-parity trio `explore`, `from_trace`,\n`edit_check` — so an MCP-only agent gets the same write & done reflexes as the CLI — and the CROSS-BRANCH\npair `whereis` \u002F `stray_content`, which answer \"where does this content live?\" across every branch: the\nquestion `git cherry` cannot, since it compares commit ancestry and every other verb indexes one worktree.\n`stray_content` marks a branch `superseded` when the live line re-implemented its work, which is exactly\nthe case `git cherry` calls unmerged forever) + the 3 span-addressed\nedit verbs (`replace_symbol_body`, `insert_before_symbol`, `insert_after_symbol`). Only `find_symbol` and\n`find_referencing_symbols` attach a stable `handle=` instead of the body (fetch it only when you need it,\nvia `fetch_body`); the edit verbs enforce a safety contract (staleness refusal, ambiguity refusal, atomic\nwrites) detailed below and in full in [`mcp-reference.md`](mcp-reference.md).\n\nThe server exposes **31 MCP verbs**: 16 read verbs (incl. `fetch_body`\u002F`flags`\u002F`slice`), 12 flagship-reflex\nverbs (`connect`\u002F`explore`\u002F`from_trace`\u002F`edit_check` and the cross-branch pair `whereis`\u002F`stray_content`) and\n3 edit verbs — `ripwire wrap codex --force` prints the live count.\n\n## Wiring — `ripwire wrap \u003Cagent>` prints the recipe\n\n```\nripwire wrap claude      # → claude mcp add ripwire -- ripwire --mcp\nripwire wrap cursor      # → JSON mcpServers stanza for .cursor\u002Fmcp.json (also: windsurf, gemini)\nripwire wrap codex       # → TOML stanza for ~\u002F.codex\u002Fconfig.toml\nripwire wrap opencode    # → CLI first (AGENTS.md is read automatically); its config key is \"mcp\", NOT mcpServers\nripwire wrap aider       # → no MCP: ripwire . --for=\"\u003Ctask>\" > .ripwire-map.txt; aider --read .ripwire-map.txt\nripwire wrap --all       # → auto-detect installed agents, emit each one's config in one run\n```\n\n`wrap` never edits config itself — it prints; you review and run. Before printing it security-scans\n`.\u002Fskills` and `.agents\u002Fskills`: a CRITICAL finding blocks the recipe (exit 1) unless you pass\n`--force`; WARNs print and continue. Bare `ripwire wrap` lists the supported agents.\n\n### Audit the active Codex surface\n\nRun `ripwire \u003Crepo> --doctor --agent=codex` after install\u002Fupdate or when Codex appears to be using a stale\nbinary, missing a skill, skipping the advisory CLI-first hooks, or starting the wrong MCP executable. This\nextends the ordinary six-check doctor with four read-only checks over the LIVE environment: PATH binary\nagreement, exact parity between the installed skills and `.ripwire-manifest-v1`, executability of all three\nCodex hook roles, and the configured `mcp_servers.ripwire` command plus `--mcp` argument. Failing rows give\nthe exact installer\u002Fwrap repair command. The report deliberately emits no config contents or full shell\ncommands, so it is safe to paste for diagnosis; `--agent=codex` alone refuses because it modifies doctor.\n\n## The read verbs + fetch_body (and when each beats the CLI form)\n\nEvery verb takes `path` (the repo root; `memory_recall` takes the docs\u002Fmemory dir). For a split\nservice+client checkout, pass `paths: [dir1, dir2, ...]` instead — the additive multi-root array (`path` and\n`paths` together is a usage error; the 3 edit verbs accept it too, and land a write in the correct root's\nreal file via its label). The server keeps ONE cached workspace per canonical root set: a `paths` list is\ndeduped and ordered before it's used as the cache key, so calling with the same roots in a different order\nstill hits the warm cache instead of re-parsing; a genuinely different root set gets its own cache entry, not\na shared\u002Fstale one.\n\n**Line-seeded addressing — `@FILE:LINE` in any resolver-backed selector.** Holding a LOCATION (a diff hunk,\na compiler error, a stack frame) instead of a name? Pass `@src\u002Ffoo.cpp:120` (1-based line) as the selector\nand it resolves to the innermost definition enclosing that line — accepted by `find_symbol` \u002F\n`find_referencing_symbols` \u002F `impact` \u002F `edit_check` \u002F `path_between` (`from`\u002F`to`) \u002F `connect` (each entry) \u002F\n`lego` (`type`) \u002F `fetch_body` (`handle`), and by `uses` (which serves the enclosing definition's NAME —\nits sites stay name-matched, `of=` echoes the seed as typed). A bad seed — malformed spec, unmatched or\nambiguous path, line past EOF, a line no definition spans, two definitions sharing the line — is **refused\nwith the same specific diagnosis the CLI's `--at`\u002Fselector arms speak**, never guessed. The NAME-matching\nscan verbs (`owners`, `mentions`) do not resolve seeds; a resolvable seed there refuses by naming the\ndefinition it resolves to, so the retry is in the message. CLI twin: `--at=FILE:LINE` (the bare\nenclosing-chain report) and `@FILE:LINE` in any SYM selector; contract gate: `test\u002Fatcheck.sh` +\n`test\u002Fmcpverbscheck.sh` §7.\n\n| Verb | CLI twin | Ask it for |\n|---|---|---|\n| `analyze` | `ripwire \u003Cdir>` | the ranked XML map |\n| `for` (`task`) | `--for=TASK` | the task lens: signatures + cx\u002Fin metrics framed for reuse. **Auto-routes** the ranker — pass a symbol NAME verbatim as `task` to get name-exact retrieval (recall@1 ~99%); a conceptual phrase uses subtoken+body. Header prints `[routed: …]`. |\n| `find_symbol` (`symbol`) | `--callers` + `--callees` | locate a symbol with its callers AND callees in one call — each symbol carries a `handle` |\n| `find_referencing_symbols` (`symbol`) | `--callers=SYM` | just who references\u002Fcalls it — also handle-bearing |\n| `grep` (`pattern`) | `--grep=STR` | parallel literal scan + enclosing symbol + matched line |\n| `cochange` (`file`) | `--cochange=FILE` | the lockstep git partners of one file |\n| `memory_recall` (`task`, `top_k` + `budget_tokens` optional) | `--recall=TASK [--top-k=N] [--max-tokens=N]` | full bodies of the few relevant docs\u002Fmemory notes, bounded by the SAME default 8000-token body ceiling as the CLI (the header discloses `max_tokens=` and every cut). `budget_tokens` raises the ceiling explicitly when you want everything; `top_k` (default 8) shapes how many docs |\n| `situational_awareness` (`diff`\u002F`files` optional) | `--situ` | blast radius, tests_to_run, forgotten co-change partners, hotspot alert — as JSON; defaults to `git diff HEAD` |\n| `mentions` (`symbol`) | `--mentions=SYM` | which markdown plans\u002Fdesigns discuss a symbol |\n| `owners` (`symbol` optional) | `--owners[=SYM]` | bus-factor: recency-weighted author ownership |\n| `lego` (`type`) | `--lego=TYPE` | an interface's method contract + every implementor (own-language) |\n| `fetch_body` (`handle`) | `--expand=SYM` | the FULL source of one symbol's definition, addressed by a `handle` from a prior read verb |\n| `batch` (`queries`) | `--batch=FILE` | a one-turn context sweep: up to 16 heterogeneous read sub-queries (`for`\u002F`grep`\u002F`impact`\u002F`uses`\u002F`callers`\u002F`callees`\u002F`mentions`\u002F…) answered in ONE round-trip, merged in order and deduped (`\u003Cdup-of q=\"i\"\u002F>`); a failing sub-query is an inline `ok=\"0\"` entry, never a whole-batch failure. Reach for it when a task needs several lookups at once. |\n\n**The flagship-reflex verbs** (added 2026-07 so an MCP-only agent gets the same reflexes as the CLI) — these are the moments an agent most often skips the tool for; reach for the verb, not a grep:\n\n| Verb | CLI twin | The moment |\n|---|---|---|\n| `exemplar` (`kind` or `task`) | `--exemplar` | BEFORE you write a fn\u002Fclass\u002F… — the repo's best-in-class instance to imitate, chosen by ROLE (fan-in \u002F cognitive-cx \u002F tested), with its body |\n| `quality_delta` (`path`) | `--quality-delta` | BEFORE you call it DONE — only what the working tree made WORSE vs the baseline (auto-compares vs git-HEAD; a non-empty `regressions` array is the exit-2-equivalent) |\n| `quality_baseline` (`path`) | `--quality-baseline` | pin the quality floor (writes the HEAD-stamped `.ripwire_quality_baseline`) — a side-effect verb |\n| `impact` (`symbol`, `limit`\u002F`offset` optional) | `--impact=SYM [--limit=N --offset=M]` | \"is it safe to change X\" — the TRANSITIVE blast radius (beats `find_referencing_symbols`, which is 1-hop). `reaches=` is the true radius; the listing shows 40 by rank unless you raise it, and a paged answer carries `has_more`\u002F`next_offset` so a loop can terminate |\n| `uses` (`symbol`) | `--uses=SYM` | the resolvable USE-SITES — call\u002Fread\u002Fwrite\u002Fimport\u002Fextends, not just calls (`count=0` is a real answer; `counts_floor=\"1\"` — a floor, never a total) |\n| `path_between` (`from`, `to`) | `--path=A,B` | does A reach B, and the shortest call path (named `path_between` — `path` is the root-arg key) |\n| `connect` (`symbols`) | `--connect=A,B,C` | the minimal subgraph joining N (>2) task symbols — the shared-caller join a directed `path_between` can't see |\n| `explore` (`task`, `budget_tokens` + `partition` optional) | `--pack-task=TASK [--partition=N]` | ONE-call task orientation — routed ranking + full bodies + 1-hop callers + field notes + tests_to_run, ALL under one deterministic byte budget (default 6000 tokens). Replaces the `for` → `fetch_body` → `find_referencing_symbols` → `memory_recall` dance. Also dispatchable as `pack_task` (same handler; `explore` is the one advertised in `tools\u002Flist` — the discovery-friendly name). **`partition: 2..16`** turns it into the FAN-OUT form for a multi-agent orchestrator: a shared common core plus N minimally-overlapping per-agent slices carved along the call graph's communities, so N sub-agents stop re-deriving one map — `budget_tokens` then means ONE agent's budget (core + its slice). Read `overlap_max` \u002F `split` \u002F `partitions` vs `requested` on the wrapper before trusting the slices |\n| `from_trace` (`trace`, `budget_tokens` optional) | `--from-trace=FILE` | paste a stack trace \u002F sanitizer report \u002F compiler error → the frames mapped onto indexed symbols, ranked INNERMOST-first, with the innermost in-corpus symbol's FULL body. `trace` = the raw trace TEXT (no stdin\u002Ffile arg over MCP — paste it, don't hand-translate it into a query) |\n| `edit_check` (`symbol`) | `--edit-check=SYM` | just edited a symbol? did its CONTRACT (params\u002Fpublicness) change vs git HEAD, and which 1-hop callers are now PROVABLY incompatible? Fast targeted check — for the same question over a whole diff use `quality_delta` instead |\n\n**MCP beats the CLI when you're mid-task and will ask more than once**: the server keeps the parsed\n{ingest, graph, rank} in memory, so after the first parse every verb answers warm (~ms, no shell\nround-trip). **The CLI still wins for what no verb exposes** — `--expand`\u002F`--outline`, `--around`,\n`--deps`\u002F`--hotspots`\u002F`--clones`, `--graph-query`, `--arch`, `--pr-context`, `--scip`, `--lint-rules`,\n`--export`, and the two remaining B11 verbs with no MCP twin — `--merge-scout` (multi-ref UX doesn't map\ncleanly onto a single JSON-RPC call) and `--note-add`\u002F`--notes` (a write verb; adding it needs the same\nsafety-contract thinking the 3 edit verbs got) — shell out for all of these even with the server running;\nthe on-disk warm cache keeps them fast too.\n\n**Team\u002FCI: commit the warm cache as an index artifact.** `ripwire \u003Cdir> --index-out=BASE` cold-parses once,\nwrites `BASE.lean.ripwirecache` + `BASE.rich.ripwirecache` (`--for`\u002F`--exemplar`\u002F`--metrics` need RICH), then\nexits with no map. Generate on main, commit or CI-cache it, restore with `--cache=BASE.lean.ripwirecache` (or\n`.rich.`) in PR jobs so only changed files re-parse — a same-arch SPEED cache that self-heals to a cold parse\nif stale or cross-arch (correct, slower). See README \"The committable index artifact\".\n\n## Remote transport: `--listen` (Streamable HTTP) — opt-in, security posture is the feature\n\nBy default `--mcp` speaks JSON-RPC over **stdio** (one co-located agent). For a team sharing one warm\nindex, `--listen=HOST:PORT` serves the *same verbs* over **Streamable HTTP** (protocol `2025-11-25`)\ninstead — byte-identical JSON-RPC, only the transport differs, single-threaded against one warm index.\n\n**The security posture is the whole point** (a 2026 survey found ~200K MCP servers naively bridged to the\nopen internet with no auth — ripwire is built so it cannot become one by default): loopback-only by\ndefault; a routable host needs *both* the explicit host flag *and* a bearer token or the server **refuses\nto start**; no TLS built in (reverse-proxy it); one listener pins to ONE workspace at startup; and the 3\nedit verbs are refused over remote unless you pass `--allow-remote-edits` (which also forces the token).\nFull flag\u002Fenv reference, the `curl` recipe, and each refusal's exact wire behavior →\n[`mcp-reference.md`](mcp-reference.md#remote-transport).\n\n## The lazy-body posture: names\u002Fsignatures by default, bodies by handle on request\n\n`find_symbol` and `find_referencing_symbols` attach a stable `handle` to every symbol object they return\n(the focus symbol, each caller, each callee) — but **not the body**. Call `fetch_body{path, handle}` only\nwhen you actually need to read the source, instead of the server sending bodies you didn't ask for. This is\nthe kit-style default-lean posture (measured ~90% cut on comparable extract-symbol calls) and matches the\n`2025-11-25` MCP spec's move to stateless HANDLE semantics.\n\n- **Handle format**: `sym#\u003CidHash>@\u003CcontentHash>`, both 16 lowercase hex (FNV-1a-64) — `idHash` from the\n  symbol's STABLE canonical id (`path::scope::name`, never the per-run `NodeId`), `contentHash` pinning the\n  file's bytes at mint time.\n- **Fetch when you're about to reason about the logic**, not just to confirm the symbol exists — the\n  name\u002Fkind\u002Ffile\u002Fline a read verb already gives you is often enough to decide relevance or pick a call site.\n- **Staleness is automatic and free**: a content-hash mismatch (file changed since mint) makes `fetch_body`\n  refuse rather than serve a body against shifted byte offsets — call a read verb again for a fresh handle.\n  A malformed\u002Funresolvable handle refuses the same way, never a silent wrong-symbol body.\n- **Handles are content-addressed, not pinned literals**: both halves are derived hashes, so a handle you\n  copied out of a prior session or a doc is almost certainly stale — call `find_symbol`\u002F\n  `find_referencing_symbols` fresh each session and read the `handle` it hands back.\n\n## The 3 MCP edit verbs — the warm-server counterpart to the preferred CLI\n\n`replace_symbol_body`, `insert_before_symbol`, `insert_after_symbol` — the last 3 of the 30 (see above),\nripwire's MCP WRITE verbs. The preferred shell front door is\n`ripwire ROOT --replace-symbol-body=SYM --edit-payload=FILE|-` (or the matching insert flag); use MCP when\nthe server is already warm or a client has no shell. Both fronts call the same safety engine. Each locates\na symbol's definition in the parsed index and splices text at its byte span: `replace_symbol_body`\nswaps signature-through-closing-brace verbatim, `insert_before_symbol`\u002F`insert_after_symbol` splice text at\nthe def's first\u002Ffinal byte (auto-adding the separating newline so you don't have to guess).\n\n**The receipt already answers \"what now?\"** — it carries `lines={start,end}` for the applied text,\n`edit_check` (status \u002F callers \u002F incompatible \u002F each broken caller's call lines) and `tests_to_run` with the\nrun recipe: the same answers a separate `edit_check` verb and `--affected` would give, computed on the index\nthe edit just refreshed. Do not spend two more calls on them. `post_check:false` (CLI `--no-post-check`)\nopts out — reach for it only when the next thing you do is another edit to the same tree.\n\nRead **[`mcp-reference.md`](mcp-reference.md)** before calling one of these 3 (full args table + the exact\nnewline rule + the safety contract for not-found \u002F ambiguous \u002F stale-index \u002F insane-span failures + the\natomic-write guarantee) or when you need server internals (`--mcp` implies `--stable`, `_index` staleness\nstamps, warm content-hash rebuilds, working-set PageRank personalization, the background `qsnap` HEAD-warm on\nlarge workspaces). Short version: every edit-verb failure leaves the file byte-for-byte unchanged, writes are\natomic (`tmp` + `rename(2)`), and the server never goes stale silently — it rebuilds warm from mtime checks\nbefore every verb call. **Lead with this MCP form when the body already came from `fetch_body` this\nsession**; after a CLI `--expand`, keep the zero-standing-schema CLI path and use `--edit-payload=-`.\nSeveral harnesses' native Edit tool\nneeds a fresh Read of the file immediately before the edit, even when you already have the body from\nelsewhere in the session — these verbs check their own staleness hash instead of requiring one, so under any\nharness the file gets read at most once, never twice.\n\n**Workspace pin (stdio, D3\u002FD4):** when the server was started `ripwire \u003Croot> --mcp`, an omitted\n`path` on ANY verb (read or edit) defaults to that startup root; the 3 edit verbs above additionally\nREFUSE (file byte-identical, same contract as every other refusal above) if an explicit `path` resolves\noutside it — `path outside workspace; start the server on that root or pass an absolute in-root path`.\nRead verbs stay unrestricted at any `path`. A bare `ripwire --mcp` with no startup root is unchanged: every\nverb still requires its own `path`.\n",{"name":5,"description":24,"allowed-tools":25},"Wire ripwire into an agent as an MCP server — `ripwire wrap AGENT` (Claude Code, Cursor, Codex, Gemini…) — and choose the server verb mid-task. Also tool HEALTH: a symbol you expected is missing from the ranked output, the index feels stale after a rebase, 'is my ripwire setup broken?'\n","Bash, Read","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fripwire-mcp-ripwire",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill ripwire-mcp",{"tool":40,"command":41},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill ripwire-mcp",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill ripwire-mcp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fripwire-mcp-ripwire\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"mcp-reference.md","REFERENCE","参考文档",13775,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fripwire-mcp-ripwire\u002Fmcp-reference.md",[55,62,67,74,81,88],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":63,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]