Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add narumiruna/pi-extensions --skill codebase-memorygit clone --depth 1 https://github.com/narumiruna/pi-extensionsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/narumiruna/pi-extensions/codebase-memory)<a href="https://agentmods.dev/skills/narumiruna/pi-extensions/codebase-memory"><img src="https://agentmods.dev/badge/skills/narumiruna/pi-extensions/codebase-memory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/narumiruna/pi-extensions/codebase-memory"><img src="https://agentmods.dev/badge/skills/narumiruna/pi-extensions/codebase-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Prompt Injection · line 10 Subtle instructions detected that may alter agent decision-making or introduce hidden biases.Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00098 | $0.02170 |
| Opus 5.5 | $0.00039 | $0.00868 |
| Sonnet 5.5 | $0.00020 | $0.00434 |
| Haiku 4.5 | $0.00010 | $0.00217 |
Grade A, and why
codebase-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Memory — Knowledge Graph Tools
Graph tools return precise structural results in ~500 tokens vs ~80K for grep.
Always prefer MCP graph tools over grep, glob, or file search for code discovery.
Priority Order
search_graph— find functions, classes, routes, and variables by pattern.trace_path— trace who calls a function or what it calls.get_code_snippet— read specific function or class source code.check_index_coverage— validate candidate paths and missed ranges before claims.query_graph— run Cypher queries for complex patterns.get_architecture— get a high-level project summary.
Quick Decision Matrix
Use project="@current" for eligible graph reads in the active checkout, or use the exact project="<name>" returned by list_projects.
Never replace @current with its borrowed source project in later graph calls because the alias revalidates the worktree on every call.
| Question | Tool call |
|---|---|
| Who calls X? | trace_path(project="<name>", function_name="X", direction="inbound") |
| What does X call? | trace_path(project="<name>", function_name="X", direction="outbound") |
| Full call context | trace_path(project="<name>", function_name="X", direction="both") |
| Find by name pattern | search_graph(project="<name>", name_pattern="...") |
| Dead code | search_graph(project="<name>", max_degree=0, exclude_entry_points=true) |
| Cross-service edges | query_graph(project="<name>", query="<cypher>") |
| Impact of local changes | detect_changes(project="<name>") |
| Risk-classified trace | trace_path(project="<name>", function_name="X", risk_labels=true) |
| Text search | search_code(project="<name>", pattern="...") or Grep |
Current Worktree Resolution
index_status(project="@current")resolves an existing current-root index first.- In an unindexed linked worktree,
@currentborrows a canonical checkout graph only when both trees are clean, share one Git common directory andHEAD, and the graph-recorded Branch snapshot matches. - Keep using
@currentforsearch_graph,query_graph,trace_path,get_code_snippet,get_graph_schema,get_architecture, andindex_statusso each call revalidates the borrowed snapshot. - Inspect
pi_cbmem_resolution;borrowed_canonical_basemeans the result is read-only borrowed graph evidence rather than a worktree index. - Borrowed
get_code_snippetreads the reported lines from the current worktree. - Do not use
@currentwithsearch_code,check_index_coverage,detect_changes,manage_adr,ingest_traces,delete_project, orindex_repository. - For required coverage on borrowed evidence, call
check_index_coverageonce with the reported source project, read flagged paths from the current worktree, then rerunindex_status(project="@current")before relying on the result. Do not use the reported source project for graph reads. - If
@currentrejects a dirty, divergent, stale, missing, or ambiguous context, do not bypass the guard with the canonical project name. Index the worktree or use current-root file reads and grep instead. - Treat borrowed coverage as best-effort because Codebase Memory exposes no immutable generation lease or complete semantic-input comparison.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 134 lines · 98 tokens per session scan A 4593d85479e0
codebase-memory is a skill published in the GitHub repository narumiruna/pi-extensions (823 stars, last pushed today), licensed MIT. It adds 98 tokens to every session and 2,170 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
codebase-memory compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| codebase-memorynarumiruna/pi-extensions | Skill | 823 | today | MIT | A | 98 | Claude Code, Codex |
| session-searchjoelhooks/pi-tools | Skill | 90 | 3d ago | none | A | 70 | Claude Code, Codex |
| session-capturejoelhooks/pi-tools | Skill | 90 | 3d ago | none | A | 40 | Claude Code, Codex |
| accordion-context-foldinga-Fig/Accordion | Skill | 249 | 4d ago | MIT | A | 102 | Claude Code, Codex |
| accordion-context-recalla-Fig/Accordion | Skill | 249 | 4d ago | MIT | A | 89 | Claude Code, Codex |
| agy-session-askw-winter/dot314 | Skill | 143 | today | MIT | A | 65 | Claude Code, Codex |
| migrate-to-shoehornwangmiaozero/pi-harness | Skill | 371 | today | AGPL-3.0 | A | 48 | Codex |