/superlocalmemory-codex:slm-graphfrom SuperLocalMemory (Codex)
Indexes a codebase as a structural graph for code navigation, impact analysis, and semantic search. Traces callers, callees, inheritance, blast radius, and detects changes since last index.
Ships in SuperLocalMemory (Codex). 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.
None: SKILL.md is the whole skill.
Index any repo as a code knowledge graph and answer structural questions about it: callers, callees, impact radius, semantic search, and review context. These tools are not in the default tool set: they need slm tools set code (or whole); see "Tool set requirement" below.
Prerequisite rule: every tool except build_code_graph self-guards — if the graph is not built it returns {"success": false, "error": "Code graph not built. Run build_code_graph first."}. Always index first.
build_code_graph — index a repositorybuild_code_graph(
repo_path: str,
languages: str = "",
exclude_patterns: str = "",
) -> {success, files_parsed, nodes, edges, flows, communities, duration_ms}
Parses all supported source files, extracts functions/classes/imports, builds the call graph, detects execution flows, and identifies code communities. Replaces any previous index for the same repo.
repo_path — absolute path to the repository root. Must exist and sit under your home directory; a path outside it is refused with Invalid repo_path.languages — comma-separated language filter, e.g. "python,typescript". Empty string = index all supported languages.exclude_patterns — comma-separated glob patterns to exclude, e.g. "**/node_modules/**,**/.venv/**". Empty = no exclusions.When to (re)build:
detect_changes or query_graph returns stale/unexpected results.# Index the full repo
build_code_graph(repo_path="/abs/path/to/myrepo")
# Index only Python, skip tests and generated code
build_code_graph(
repo_path="/abs/path/to/myrepo",
languages="python",
exclude_patterns="**/tests/**,**/generated/**"
)
query_graph — traverse relationshipsquery_graph(
pattern: str,
target: str = "",
limit: int = 20,
) -> {success, pattern, target, results: [{qualified_name, kind, file_path, name}]}
Query the graph for structural relationships. pattern is required and must be one of the eight valid values below. target is a qualified name, partial name, or node ID — matched with exact-then-LIKE fallback.
Valid patterns:
| pattern | returns |
|---|---|
callers_of | functions/methods that call target |
callees_of | functions/methods that target calls |
imports_of | modules/symbols that target imports |
imported_by | who imports target |
tests_for | test nodes associated with target |
inherits_from | base classes of target |
inherited_by | subclasses of target |
contains | symbols defined inside target (e.g. methods in a class) |
# Who calls the auth handler?
query_graph(pattern="callers_of", target="authenticate_user")
# What does the payment processor import?
query_graph(pattern="imports_of", target="PaymentProcessor", limit=30)
# What classes inherit from BaseModel?
query_graph(pattern="inherited_by", target="BaseModel")
get_blast_radius — impact analysisget_blast_radius(
changed_files: str,
max_depth: int = 2,
max_nodes: int = 500,
) -> {success, changed_nodes, impacted_nodes, impacted_files, edges, depth_reached, truncated}
Computes the full impact radius for one or more changed files using bidirectional BFS (callers and callees). Returns every node and file reachable within max_depth hops. Use this before editing to understand risk surface.
changed_files — comma-separated file paths relative to the repo root, e.g. "src/auth/handler.py,src/auth/models.py".max_depth — BFS depth. Default 2. Increase to 3–4 for deep call chains; lower to 1 for a quick first-degree check.max_nodes — caps the result set. If truncated=true in the response, the real blast radius is larger.# What breaks if I change the auth handler?
get_blast_radius(changed_files="src/auth/handler.py")
# Deeper analysis across two files
get_blast_radius(
changed_files="src/payments/gateway.py,src/payments/models.py",
max_depth=3,
max_nodes=200
)
If truncated is true, narrow the scope with max_nodes or reduce max_depth to get a reliable result.
semantic_search_code — find code by meaningsemantic_search_code(
query: str,
kind: str = "",
limit: int = 20,
) -> {success, results: [{qualified_name, kind, file_path, score, line_start, name}]}
Hybrid FTS5 + vector search over all indexed code entities. Use when you know what the code does but not what it's called.
query — natural language description, e.g. "retry logic for HTTP requests" or "parse JWT token from header".kind — optional filter: "Function", "Class", "File", or "Test". Empty = all kinds. Case-insensitive match in the engine.limit — max results. Default 20.Results include a score field (higher = more relevant).
# Find where authentication is handled
semantic_search_code(query="authenticate user from request token")
# Find only test functions that cover database writes
semantic_search_code(query="database write transaction rollback", kind="Test")
# Find the rate limiter class
semantic_search_code(query="rate limiting middleware", kind="Class", limit=5)
get_review_context — assemble PR review contextget_review_context(
changed_files: str,
include_source: bool = True,
) -> {success, summary, review_items, test_gaps, risk_score}
Produces a token-optimized review package for a set of changed files: a plain-language summary, a ranked list of review items with per-node risk scores, and a list of changed symbols that have no associated test coverage.
changed_files — comma-separated file paths relative to the repo root.include_source — whether to include source code snippets in the context (default True). Set False to reduce token usage when you only need the risk analysis.risk_score is a float 0–1 on the overall changeset. review_items[].risk_score is per-node.
# Get review context for a PR touching two files
get_review_context(changed_files="src/auth/handler.py,src/auth/utils.py")
# Risk summary only, no source snippets
get_review_context(
changed_files="src/payments/gateway.py",
include_source=False
)
detect_changes — what changed since last indexdetect_changes(
base: str = "HEAD~1",
) -> {success, summary, risk_score, changed_functions, test_gaps, review_priorities}
Runs git diff against base, maps the changed hunks to graph nodes, and returns a risk-scored list of changed functions, test gaps, and review priorities. Requires the repo to be a git repository.
base — git ref to diff against. Default "HEAD~1" (one commit back). Any valid git ref works: "main", "v1.4.0", a commit SHA, etc.# What changed in the last commit?
detect_changes()
# What changed since the release branch?
detect_changes(base="release/1.4")
# What changed relative to main?
detect_changes(base="main")
Returns error if the repo root is not a git repository or if git is not available.
# 1. Index it
build_code_graph(repo_path="/abs/path/to/repo")
# 2. Find the entry point by meaning
semantic_search_code(query="request router entry point", kind="Function")
# 3. Trace what it calls
query_graph(pattern="callees_of", target="handle_request")
# 4. See who else calls the same core function
query_graph(pattern="callers_of", target="authenticate_user")
# 1. Know what you are touching
semantic_search_code(query="retry HTTP requests with backoff")
# 2. Understand blast radius before making the change
get_blast_radius(changed_files="src/http/client.py")
# 3. Check test gaps
get_review_context(changed_files="src/http/client.py")
# 1. What changed in this branch vs main?
detect_changes(base="main")
# 2. Full impact analysis for the changed files
get_blast_radius(changed_files="src/auth/handler.py,src/auth/models.py")
# 3. Assemble review context
get_review_context(changed_files="src/auth/handler.py,src/auth/models.py")
All tools return {"success": false, "error": "<message>"} on failure — they never raise.
| Error message | Cause | Fix |
|---|---|---|
Code graph not built. Run build_code_graph first. | No index exists | Call build_code_graph(repo_path=...) first |
Repository path does not exist: <path> | Bad repo_path in build | Pass an absolute path that exists |
Git not available or not a git repository: ... | detect_changes needs git | Only works in git repos with git installed |
Invalid pattern '...' | Wrong pattern in query_graph | Use one of the 8 valid pattern strings |
No node found matching '<target>' | Target not in index. Returned as success: true with an empty results and this message, not as an error | Rebuild or check the qualified name via semantic_search_code |
Invalid repo_path: ... | repo_path is outside your home directory | Index a repository under your home directory |
If build_code_graph returns files_parsed: 0, no supported source files were found — check repo_path and exclude_patterns.
The six tools above are registered only when the MCP server runs the code tool
set, or with SLM_MCP_ALL_TOOLS=1 / SLM_MCP_PROFILE=whole, or when
SLM_MCP_TOOLS names them. They are not in core, full, power or the
default every app gets, so there the tools do not exist and a call fails as an
unknown tool. If the user asks for graph work and the tools are missing, tell
them: "Code-graph tools are off by default. Run slm tools set code (graph
without mesh) or slm tools set whole (every tool), then restart this app."
Let them choose; it changes the tools every connected app sees.
switch_profile does not change the tool set; it changes the active memory
profile. See slm-profile. The code set leaves out the mesh and several
administration tools, so ask the user before changing their tool set.
With SLM_MCP_ALL_TOOLS=1 more graph tools appear: update_code_graph (refresh
for changed_files without a full rebuild), list_graph_stats,
get_architecture_overview, list_communities, get_community, list_flows,
get_flow, get_affected_flows, find_large_functions, enrich_blast_radius,
refactor_preview, and the code-to-memory tools link_memory_to_code,
code_memory_search, code_entity_history and code_stale_check. The memory
links need "bridge_enabled": true in code_graph_config.json and a rebuild.
All are host-only: a remote caller cannot use them.
slm-profile — memory profiles and the tool sets that decide which tools existslm-recall — retrieve architectural decisions before graph queriesslm-status — confirm the active profile and graph index healthSuperLocalMemory v4.2.34 · Qualixar · AGPL-3.0-or-later
Some hosts block local MCP servers by policy, and many agents, bots and agent frameworks never had them. SuperLocalMemory works the same from any shell, so this skill still applies:
slm status --json first. Never report "SLM unavailable" only because an MCP tool is missing.slm tool <name> --json '{...}', with the same arguments, checks and results: a successful call prints exactly what the MCP tool returns, and a failed one prints "success": false with error.code and error.message. slm tool describe <name> shows one tool's arguments; slm tool list lists the tools available right now (pictures and documents appear once they are turned on, slm media status).slm command answers in one JSON document on stdout: add --json after it, put slm --json before it, or set SLM_JSON=1 in the environment. slm mcp, slm session and slm session-context ignore SLM_JSON so servers and hooks keep working; give them --json directly. Read success first; a failure carries error.code and error.message. Exit code 0 means success, 1 that the command ran and failed (error.exit_code keeps a more specific code), 2 that it could not run, 130 that it was interrupted. Under JSON a command never asks a question: one that needs a confirmation answers confirmation_required and names the flag. slm gdpr export streams its document over several lines.slm recall "<question>" --json and slm remember "<text>" --json. slm help --json lists every command with its options.The slm-cli skill has the full command reference.
What SKILL.md sets; muted values are Claude Code's defaults
- what calls X - what breaks if I change Y - what does Z inherit from - find code that handles authentication - impact analysis before editing - code navigation in unfamiliar repos - blast radius before a PR - pre-commit change detection
npx claudepluginhub qualixar/superlocalmemory --plugin superlocalmemory-codex17 skills in this plugin
/slm-bot-memoryCross-bot memory on a shared computer (Grok Bot, Cursor plugin, any host where several agents share one machine). Explains agent_id attribution vs. profile/scope access, how to namespace by agent_id + profile + scope, and what must never be written to memory. Read this before the first remember/recall on a new Grok-Bot-style host./slm-cacheKV cache for repeated reads — call slm_cache_get(key) first; on a miss do the expensive operation then slm_cache_set(key, value, ttl_seconds) to store it; on a hit use the returned value directly; always fail-open (hit:false on any error, never raises); saves tokens when the same file, query result, or tool output is read more than once in a session./slm-cliUse SuperLocalMemory from the shell when its MCP tools are not available to you. Every MCP tool runs as `slm tool <name>` with the same arguments, checks and JSON result, and the session protocol (start, recall before answering or searching, cue check before editing, remember decisions, pictures and PDFs, close) has a command for each step. Includes the full tool-to-command table./slm-compressCompress large text, tool output, or transcripts to reduce context-window usage while keeping the full 1M window intact — call slm_compress(content, mode, reversible, ttl_seconds) to shrink content; if the result is lossy a ccr_id is returned so you can call slm_retrieve(ccr_id) later to recover the exact original; always fail-open (ok:false → continue with the original)./slm-getting-started-botFirst-session orientation for SuperLocalMemory on a headless bot host (Grok Bot, or any Cursor-format plugin install with no hooks, no dashboard, and no interactive setup wizard). What is different here vs. Claude Code/Codex, which 21 tools are actually available, and the first three calls to make./slm-governanceGoverned-workspace behavior for SuperLocalMemory. Covers roles (admin/member/viewer) and company mode, who administers a company-mode workspace (a signed-in admin, or `slm team` on the SLM computer), `slm token show` in strict mode, what remote web apps can never see or change, retention and lifecycle settings, the audit trail, GDPR export and erasure, and how agents must behave when operating under workspace governance. The audit and retention tools need the power MCP profile. Agents must never bypass governance controls.2 plugins in one repository ship this exact skill · first indexed Nov 23, 2026
Other plugins' skills for the same job