slm-bot-memory
Cross-bot memory on a shared computer (Grok Bot, Cursor plugin, any host where several agents share one machine). Explains…
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
Claude Code
$ npx -y skills add qualixar/superlocalmemory --skill slm-graph --agent claude-code
Codex
$ npx skills add qualixar/superlocalmemory --skill slm-graph -a codex -y
Cursor
$ npx skills add qualixar/superlocalmemory --skill slm-graph -a cursor -y
Gemini CLI
$ npx skills add qualixar/superlocalmemory --skill slm-graph -a gemini-cli -y
GitHub Copilot
$ npx skills add qualixar/superlocalmemory --skill slm-graph -a github-copilot -y
OpenCode
$ npx skills add qualixar/superlocalmemory --skill slm-graph -a opencode -y
Windsurf
$ npx skills add qualixar/superlocalmemory --skill slm-graph -a windsurf -y
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:*)
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(
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.
When to (re)build:
# 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(
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(
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.
# 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(
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*.
Results include a `score` field (higher = more relevant).
Open-source governed, local-first memory control plane for AI agents and teams. arXiv:2608.08253
Cross-bot memory on a shared computer (Grok Bot, Cursor plugin, any host where several agents share one machine). Explains…
KV cache for repeated reads — call slm_cache_get(key) first; on a miss do the expensive operation then slm_cache_set(key, value,…
Compress large text, tool output, or transcripts to reduce context-window usage while keeping the full 1M window intact — call…
First-session orientation for SuperLocalMemory on a headless bot host (Grok Bot, or any Cursor-format plugin install with no…
Governed-workspace behavior for SuperLocalMemory. Covers roles (admin/member/viewer) and company mode, who administers a…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…