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/vincentkoc/dotskills/codebase-memory-mcpnpx skills add vincentkoc/dotskills --skill codebase-memory-mcpgit clone --depth 1 https://github.com/vincentkoc/dotskillsWhat 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.00062 | $0.01981 |
| Opus 5 | $0.00031 | $0.00991 |
| Sonnet 5 | $0.00012 | $0.00396 |
| Haiku 4.5 | $0.00006 | $0.00198 |
Grade A, and why
codebase-memory-mcp 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Memory MCP
Purpose
Bring up codebase-memory-mcp for the owning Git checkout and prove the graph is usable before relying on it for code discovery. Keep linked worktrees on the owner's graph instead of creating one graph per branch.
When to use
- Initialize, re-index, refresh, or troubleshoot a repository graph.
- Use
search_graph,trace_path,get_code_snippet, orquery_graph. - Verify that a repository is indexed before graph-backed exploration.
- Audit or prune duplicate linked-worktree indexes without deleting cache files directly.
Workflow
- Verify the repository and binary.
git rev-parse --show-toplevelgit status -sbcommand -v codebase-memory-mcpcodebase-memory-mcp --version
- Resolve the canonical owning checkout.
scripts/codebase-memory-graph.sh canonical --repo "$(git rev-parse --show-toplevel)"- Linked worktrees resolve through their absolute Git common directory to the one checkout that owns it.
- Separate clones remain separate projects.
- Independent roots under
~/.codex/worktrees,~/GIT/_Worktrees, any.worktreescomponent,/tmp, or/private/tmpare never indexed. Linked worktrees under those paths may only rewrite to one existing nonreserved owner. - Missing, invalid, bare, ambiguous, ownerless, reserved-owner, or NUL-containing repositories fail closed.
- Prefer exposed MCP graph tools for discovery.
- Installer or client configuration must separately disable the MCP
index_repositorytool because it cannot enforce the canonical indexing boundary. For Codex installs, render the privatedisabled_toolsconfiguration accordingly. - When a graph is missing, run
scripts/codebase-memory-graph.sh index --repo "$(git rev-parse --show-toplevel)" --mode full. - Use
search_graph,trace_path, andget_code_snippetbefore broad text scans.
- Installer or client configuration must separately disable the MCP
- Use the helper for CLI indexing.
scripts/codebase-memory-graph.sh init --repo "$(git rev-parse --show-toplevel)" --mode full- The helper always sends the canonical owning checkout to
index_repository. - Use
--mode fastfor a smoke index. - Installer integrations render
scripts/codebase-memory-gateway.py.tmplwith an approved pinned backend path. Replace@@PYTHON_PATH_SHEBANG@@with the raw absolute interpreter path and replace@@PYTHON_PATH_JSON@@,@@BACKEND_PATH_JSON@@, and@@RESOLVER_PATH_JSON@@with JSON string literals containing the exact absolute interpreter, backend, andcodebase_memory_cache.pypaths. The rendered gateway has no upgrade logic and usesexecvefor pass-through. - The gateway guards raw CLI calls only. Zero-argument MCP stdio startup intentionally passes through to the approved backend, so the gateway is not an MCP tool-filtering proxy and does not replace the separate
disabled_toolscontrol.
- Verify the graph.
codebase-memory-mcp cli list_projectsscripts/codebase-memory-graph.sh schema --repo "$(git rev-parse --show-toplevel)"- Run one focused graph query before declaring success.
- Treat the UI as unavailable.
start-uiandkeepalivefail closed before configuration or process mutation.- UI startup remains disabled until upstream
/api/indexcanonicalization can enforce the same boundary.statusmay report an already-running grandfathered listener.
- Audit cache cleanup before applying it.
- Freeze a host-specific manifest:
scripts/codebase-memory-graph.sh cache-audit --manifest /secure/path/cbm-cache.json - Built-in reserved roots are
~/.codex/worktrees,~/GIT/_Worktrees,/tmp,/private/tmp, and any exact.worktreespath component. The audit records normalized lexical and resolved boundary evidence;.worktreescomponent matching is case-insensitive on Darwin. - Missing roots under a reserved boundary are
reserved_missing_rootcandidates. Live valid graphs whose physical canonical root and Git common directory remain reserved arereserved_live_rootcandidates, including shallow, promisor, and partial clones. Dangling symlinks, bare repositories, non-Git roots, and invalid reserved mappings block aslive_root_unmapped. - Other missing roots are protected unless the audit names an explicit narrow
--ephemeral-prefix. - Reserved aliases or linked worktrees that resolve to a nonreserved owner retain duplicate cleanup rules. They require a mapped, registered, final-protected healthy full canonical graph; candidate graphs, reserved graphs, shallow/promisor/partial owners, missing alternate graphs, and ambiguous owners cannot preserve them.
- When legacy home symlinks name the same physical checkout, preserve the exact canonical graph and treat only the symlink-named graph as a duplicate. Preserve a sole symlink-named graph.
- Review the manifest, then dry-run it:
scripts/codebase-memory-graph.sh cache-prune --manifest /secure/path/cbm-cache.json - Manifests with host blockers fail closed by default. After reviewing every relationship, explicitly add
--allow-blocked-manifestto preflight and prune only independent candidates while preserving all protected and blocked projects. - To retain an exact manifest candidate at runtime, repeat
--protect-candidate NAMEoncache-prune. Each named candidate must still exist in the unchanged snapshot and pass its root, prefix, classification, canonical mapping, and clone-health rules. It remains in the expected snapshot but is excluded from cache inventory, holder sweeps, DB integrity preflight, final holder probes, and deletion. - Runtime candidate protection does not bypass host blockers; add
--allow-blocked-manifestindependently when blockers were reviewed. Unknown, duplicate, or non-candidate names fail before preflight. - Apply only the unchanged manifest:
scripts/codebase-memory-graph.sh cache-prune --manifest /secure/path/cbm-cache.json --apply - Dry-run and apply freeze regular DB/WAL/SHM fingerprints for every eligible candidate in manifest order, rejecting a missing or size-mismatched DB, nonregular files, and nonzero WAL. Existing absolute paths are swept with
/usr/sbin/lsof -nP -F0pfn -f --in deterministic, NUL-parsed batches before any SQLite open and again after every exactmode=ro&immutable=1quick_check; global fingerprint equality is required between phases. An absent or zero-byte WAL and a stable regular SHM are allowed. Use prune-only--lsof-timeout-seconds SECONDSto override the 300-second holder timeout within the guarded 30-900 range. - Batch holder sweeps are point-in-time checks: they do not prevent a legacy index or server surface from reopening a graph after the check. Unprivileged
lsofmay not see root-owned or other-user holders, so pruning trusts the point-in-time visibility available to the cache owner; running as root provides stronger holder visibility. Apply processes eligible candidates in manifest order, at most eight per deletion batch and within the same 128 KiB path budget. Each batch revalidates the snapshot and live fingerprints, performs one holder sweep, proves post-sweep fingerprint equality, then revalidates every remaining candidate relationship immediately before the first delete child. The batch launches onlycodebase-memory-mcp cli delete_projectchildren and verifies registrations plus DB/WAL/SHM absence before continuing; spawn errors, timeouts, nonzero exits, retained registrations, residue, drift, or ambiguous state stop future batches and report launched, verified-deleted, failed, and ambiguous names and bytes. - Before applying any manifest containing
reserved_live_root, deploy the reserved-root indexing prevention and quiesce every legacy index/server surface outside this helper. The helper reports this operational precondition but does not probe or kill processes. - Deletion uses
codebase-memory-mcp cli delete_projectonly. Never remove project databases directly.
- Freeze a host-specific manifest:
- Report exact proof.
- Indexed project name.
- Node and edge counts when available.
- Any grandfathered UI listener reported by
status. - For cleanup: manifest path and digest, manifest/eligible/preflighted candidate totals, runtime protected names/reasons/bytes, required operational preconditions, before/after project and byte totals, deleted project names, and any stop condition.
- Missing binaries, unavailable MCP tools, or incomplete proof.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 90 lines · 62 tokens per session scan A 7b3fd7be7dd6
codebase-memory-mcp is a skill published in the GitHub repository vincentkoc/dotskills (102 stars, last pushed 11d ago), licensed MIT. It adds 62 tokens to every session and 1,981 once invoked, about $0.0003 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
panel-app-creator
Create or update the Panel App UI part of a NextClaw lightweight app. Use after nextclaw-app-creator selects Panel-only or Panel + Service, or when the user explicitly asks for a right-side Panel App UI, folder-based static panel, Service Actions UI, Agent-powered Panel App, React/Vite/Tailwind Panel App, or asks what…
service-app-creator
Create or update the Service App backend action part of a NextClaw lightweight app. Use after nextclaw-app-creator selects Service-only or Panel + Service, or when the user explicitly asks for workspace service-apps, MCP-compatible backend helpers, file access, external API calls, local commands, or privileged actions.
nextclaw-dead-code-governance
当用户要求扫描、识别、清理、常态化治理 NextClaw 仓库里的死代码、无用代码、unused files、unused exports、unused dependencies,尤其是核心包越来越臃肿、想删旧实现或做定期减债时使用。.
nextclaw-http-agent-runtime-integration
Use when integrating or debugging a Hermes-style external HTTP agent runtime in NextClaw, including runtime config, session selection, readiness, streaming, and adapter behavior.
nextclaw-product-visual-assets
当 NextClaw 产品更新后需要生成、替换、挑毛病或检查官网、GitHub README、用户文档或社交传播中的真实截图、AI 宣传视觉、整页 HTML 宣传预览、社区二维码等对外视觉资产时使用;也用于“更新截图”“重新截一批图”“做宣传页”“生成 campaign 页面”“视觉审稿”“五星挑刺法”或发布前检查视觉资产。普通站点布局开发或只写文章不触发。.
agent-browser
Use Agent Browser for real browser navigation, dynamic pages, and web interaction; also use it as a distinct browser-based path when websearch is unavailable or fails.