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 agentmods add skills/narumiruna/pi-extensions/codebase-memorynpx skills add narumiruna/pi-extensions --skill codebase-memorygit clone --depth 1 https://github.com/narumiruna/pi-extensionsWhat 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 | $0.00098 | $0.02170 |
| Opus 5 | $0.00049 | $0.01085 |
| Sonnet 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 2d 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.
- 2d 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 (472 stars, last pushed 2d ago), licensed MIT. It adds 98 tokens to every session and 2,170 once invoked, about $0.0005 per session on Opus 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.
Other skills, from other repositories
pi-tui-design
Create distinctive, crafted TUI components for pi using @mariozechner/pi-tui and @mariozechner/pi-coding-agent. Use when building interactive terminal UIs — custom components, overlays, dialogs, dashboards, widgets, data visualizations, animated elements, game-like interfaces, or any visual TUI work inside pi…
session-search
Search and verify Joel's Pi, Claude, Codex, Cursor, Grok, and OpenCode session history. Use when asked to recover prior context, find exact transcript evidence, inspect session receipts, continue old work, or verify capture health. Prefer flowing recall before raw transcript search when the question is about prior…
linear-tracker
Resolve project-local issue tracker routing and publish Linear issues safely. Use before creating Linear issues, PRDs, phase breakdown issues, or when deciding whether Linear/GitHub/local docs is the configured tracker. Enforces capability ≠ routing: Linear requires project-local policy, team association, auth, and…
shortlink-qr
Create joel.dev shortlinks and QR assets. Use when Joel asks for a QR code, stage/demo shortlink, joel.dev redirect, link label that looks good in phone camera UI, or a copyable QR asset.
session-capture
Historical pointer for the retired Codex-to-Central capture plugin. Use only to inspect legacy state during migration; current capture belongs to the joelclaw flowing-memory host adapter.
multiline-description
This is a multiline description. It spans multiple lines. And should be normalized.