/slm-graph
Index and query a codebase as a structural graph — build the code graph, trace blast radius of a change, find callers/callees/inheritors, semantic code search by meaning, assemble PR review context, and detect what changed since last index. Use when the user asks how code
$ npx -y skills add qualixar/superlocalmemory --skill slm-graph --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/slm-graph
Context preview
The summary Claude sees to decide when to auto-load this skill.
Index and query a codebase as a structural graph — build the code graph, trace blast radius of a change, find callers/callees/inheritors, semantic code search by meaning, assemble PR review context, and detect what changed since last index. Use when the user asks how code
SKILL.md
slm-graph.SKILL.mdname: slm-graph
description: >
Index and query a codebase as a structural graph — build the code graph, trace blast radius of a
change, find callers/callees/inheritors, semantic code search by meaning, assemble PR review
context, and detect what changed since last index. Use when the user asks how code connects, what
breaks if X changes, what calls a function, what a class inherits from, how to navigate an
unfamiliar codebase, or to understand risk before editing.
when_to_use: |
- 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
allowed-tools: build_code_graph, query_graph, get_blast_radius, semantic_search_code, get_review_context, detect_changes, Bash
slm-graph — Code Intelligence Skill
Index any repo as a code knowledge graph and answer structural questions about it: callers, callees, impact radius, semantic search, and review context. Requires the `code` MCP profile (set `SLM_MCP_PROFILE=code` in your plugin `.mcp.json`).
**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.
---
Tool Reference
1. `build_code_graph` — index a repository
build_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.
- `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:
- Before using any other graph tool for the first time on a repo.
- After significant changes to the codebase (pull, merge, large refactor).
- When `detect_changes` or `query_graph` returns stale/unexpected results.
- Rebuild is safe and idempotent — it replaces the previous index atomically per file.
# 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/**"
)---
2. `query_graph` — traverse relationships
query_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")
---
3. `get_blast_radius` — impact analysis
get_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.
---
4. `semantic_search_code` — find code by meaning
semantic_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 fu
Read more
name: slm-graph description: > Index and query a codebase as a structural graph — build the code graph, trace blast radius of a change, find callers/callees/inheritors, semantic code search by meaning, assemble PR review context, and detect what changed since last index. Use when the user asks how code connects, what breaks if X changes, what calls a function, what a class inherits from, how to navigate an unfamiliar codebase, or to understand risk before editing. when_to_use: | - 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 allowed-tools: build_code_graph, query_graph, get_blast_radius, semantic_search_code, get_review_context, detect_changes, Bash
slm-graph — Code Intelligence Skill
Index any repo as a code knowledge graph and answer structural questions about it: callers, callees, impact radius, semantic search, and review context. Requires the `code` MCP profile (set `SLM_MCP_PROFILE=code` in your plugin `.mcp.json`).
**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.
---
Tool Reference
1. `build_code_graph` — index a repository
build_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.
- `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:
- Before using any other graph tool for the first time on a repo.
- After significant changes to the codebase (pull, merge, large refactor).
- When `detect_changes` or `query_graph` returns stale/unexpected results.
- Rebuild is safe and idempotent — it replaces the previous index atomically per file.
# 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/**"
)---
2. `query_graph` — traverse relationships
query_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")
---
3. `get_blast_radius` — impact analysis
get_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.
---
4. `semantic_search_code` — find code by meaning
semantic_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 fu
World's first local-only AI memory to break 74% retrieval and 60% zero-LLM on LoCoMo. No cloud, no APIs, no data leaves your machine. Additionally, mode C (LLM/Cloud) - 87.7% LoCoMo. Research-backed. arXiv: 2603.14588
Repo: qualixar/superlocalmemory
Other skills on superlocalmemory.
- /slm-cache
KV 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
Open skill - /slm-compress
Compress 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)
Open skill - /slm-governance
Enterprise compliance and governed workspace behavior for SuperLocalMemory. Covers role-based access (admin/member/viewer), retention policies, audit trail, GDPR data export/erase, and how agents must behave when operating under workspace governance. Requires power MCP profile
Open skill - /slm-loop
Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint, reconciliation) and you must iterate until an INDEPENDENT gate passes — never stopping just because the agent believes it is
Open skill - /slm-mesh
Cross-session peer coordination via the SLM mesh network. Lets multiple AI agent sessions on the same machine discover each other, send messages, share lightweight state, and lock files to avoid conflicts. Requires full, power, or mesh MCP profile. All 8 tools are MCP-only —
Open skill - /slm-profile
Workspace isolation and runtime profile switching for SuperLocalMemory. Each profile is a fully independent memory namespace — separate facts, code graphs, and tool sets. Use switch_profile (MCP, requires code/full/power profile) to change the active workspace without
Open skill

