Manages codebase-memory-mcp graphs for Git repositories: resolves canonical checkouts, indexes/verifies dependency graphs, opens browser viewer, and audits duplicate worktree caches.
Ships in codebase-memory-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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.
search_graph, trace_path, get_code_snippet, or query_graph.git rev-parse --show-toplevelgit status -sbcommand -v codebase-memory-mcpcodebase-memory-mcp --versionscripts/codebase-memory-graph.sh canonical --repo "$(git rev-parse --show-toplevel)"~/.codex/worktrees, ~/GIT/_Worktrees, any .worktrees component, /tmp, or /private/tmp are never indexed. Linked worktrees under those paths may only rewrite to one existing nonreserved owner.~/GIT/_Synthetic or repositories marked by .git/gwt-synthetic.json. This indexing rule grants no cleanup authority.rg and direct reads. Do not retry without changed service evidence. Graph availability is not a prerequisite for ordinary inspection or repair.index_repository tool because it cannot enforce the canonical indexing boundary. For Codex installs, render the private disabled_tools configuration accordingly.scripts/codebase-memory-graph.sh index --repo "$(git rev-parse --show-toplevel)" --mode full. Do not start indexing or daemon repair as an incidental prerequisite to another task.search_graph, trace_path, and get_code_snippet before broad text scans.scripts/codebase-memory-graph.sh init --repo "$(git rev-parse --show-toplevel)" --mode fullindex_repository.--mode fast for a smoke index.scripts/codebase-memory-gateway.py.tmpl with 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, and codebase_memory_cache.py paths. The rendered gateway has no upgrade logic and uses execve for pass-through.disabled_tools control.--json and --progress before checking index_repository; index calls always require an explicit JSON repo_path. File, stdin, worker, prefixed-command, and vendor-installer forms fail closed. Default output and explicit --json output keep their upstream formats.auto_index=false, auto_watch=false, and ui_enabled=false. Ordinary MCP/CLI calls do not enable the viewer or reset an operator's explicit setting. Initialize the UI default with codebase-memory-mcp config set ui_enabled false; ui is not a supported backend config key.daemon start remains denied because it implicitly enables the UI. The explicit browser command daemon start --open [--port=N] is allowed; daemon status remains read-only.codebase-memory-mcp cli list_projects '{"format":"json","include_details":true,"limit":100,"offset":0}'scripts/codebase-memory-graph.sh schema --repo "$(git rev-parse --show-toplevel)"scripts/codebase-memory-graph.sh start-ui --repo "$(git rev-parse --show-toplevel)" resolves the owner, enables the viewer, and uses native daemon start --open. It does not index or create tmux sessions.scripts/codebase-memory-graph.sh stop-ui restores ui_enabled=false without stopping the shared daemon or other sessions. Closing a browser tab alone does not disable the listener.scripts/codebase-memory-graph.sh cache-audit --manifest /secure/path/cbm-cache.json~/.codex/worktrees, ~/GIT/_Worktrees, /tmp, /private/tmp, and any exact .worktrees path component. The audit records normalized lexical and resolved boundary evidence; .worktrees component matching is case-insensitive on Darwin.reserved_missing_root candidates. Live valid graphs whose physical canonical root and Git common directory remain reserved are reserved_live_root candidates, including shallow, promisor, and partial clones. Dangling symlinks, bare repositories, non-Git roots, and invalid reserved mappings block as live_root_unmapped.--ephemeral-prefix.scripts/codebase-memory-graph.sh cache-prune --manifest /secure/path/cbm-cache.json--allow-blocked-manifest to preflight and prune only independent candidates while preserving all protected and blocked projects.--protect-candidate NAME on cache-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.--allow-blocked-manifest independently when blockers were reviewed. Unknown, duplicate, or non-candidate names fail before preflight.scripts/codebase-memory-graph.sh cache-prune --manifest /secure/path/cbm-cache.json --apply/usr/sbin/lsof -nP -F0pfn -f -- in deterministic, NUL-parsed batches before any SQLite open and again after every exact mode=ro&immutable=1 quick_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 SECONDS to override the 300-second holder timeout within the guarded 30-900 range.lsof may 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 only codebase-memory-mcp cli delete_project children 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.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.codebase-memory-mcp cli delete_project only. Never remove project databases directly.fast, moderate, full, or cross-repo-intelligence.9749.stateDiagram-v2
[*] --> ResolveCanonicalOwner
ResolveCanonicalOwner --> ReportBlocked: missing, ambiguous, or reserved owner
ResolveCanonicalOwner --> SelectTask: valid owning checkout
state SelectTask <<choice>>
SelectTask --> QueryGraph: discovery
SelectTask --> GuardedIndex: indexing explicitly requested
SelectTask --> AuditManifest: cache maintenance
SelectTask --> OpenViewer: UI startup requested
SelectTask --> DisableViewer: UI stop requested
OpenViewer --> ReportProof: browser and listener verified
OpenViewer --> ReportBlocked: native startup or readiness fails
DisableViewer --> ReportProof: UI disabled, shared daemon preserved
GuardedIndex --> QueryGraph: index succeeds
GuardedIndex --> ReportBlocked: index fails
QueryGraph --> ReportProof: schema and focused query pass
QueryGraph --> BoundedSourceSearch: graph unavailable during code work
BoundedSourceSearch --> ReportProof: direct source findings with graph limitation
QueryGraph --> ReportBlocked: requested graph repair remains unverified
AuditManifest --> ReviewAndDryRun
ReviewAndDryRun --> ReportProof: audit or dry-run only
ReviewAndDryRun --> ApplyThroughCLI: apply requested and every precondition passes
ReviewAndDryRun --> ReportBlocked: blockers or drift
ApplyThroughCLI --> VerifyDeletion
VerifyDeletion --> ReportProof: registration and files absent
VerifyDeletion --> ReportBlocked: failure, residue, or ambiguity
ReportProof --> [*]
ReportBlocked --> [*]
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/codebase-memory-mcp:codebase-memory-mcpfrom codebase-memory-mcp
npx claudepluginhub vincentkoc/dotskills --plugin codebase-memory-mcpOther plugins' skills for the same job