From pds
Explores codebase structure via codebase-memory-mcp SQLite index with queries for function callers/callees, symbols, hierarchies when index exists; prefers over grep.
npx claudepluginhub rmzi/portable-dev-system --plugin pdsThis skill uses the workspace's default tool permissions.
Before you `grep -r` or `Glob '**/*.py'` to orient in a codebase, check whether an index exists. If it does, prefer structural queries — fewer reads, better signal, real edges instead of string-match guesses.
Explores codebases to answer questions about how code works, trace execution flows, or research topics via semantic search. Offers autonomous mode for structured subagent output and interactive mode with narrative checkpoints.
Queries AST-based code graph for sub-ms symbol lookup, call tracing, dependency analysis, and blast radius via codebase-memory-mcp. Use before file reads for code navigation and planning.
Queries codebase knowledge graphs to search functions, trace callers/callees, list file entities, analyze impact, and run SurrealQL. Use for code structure, dependencies, and relationships.
Share bugs, ideas, or general feedback.
Before you grep -r or Glob '**/*.py' to orient in a codebase, check whether an index exists. If it does, prefer structural queries — fewer reads, better signal, real edges instead of string-match guesses.
/explore [optional search term or question]
The codebase-memory-mcp index for the current project lives at:
~/.cache/codebase-memory-mcp/$(basename "$PWD").db
Check once at the start:
DB="$HOME/.cache/codebase-memory-mcp/$(basename "$PWD").db"
if [ -f "$DB" ]; then
PROJECT="$(basename "$PWD")"
# Index exists → use structural queries (next section)
else
# Fall back to Grep / Glob as usual
# Surface a one-line note: "No codebase-memory-mcp index for this repo — structural queries unavailable; using Grep."
fi
nodes(id, project, label, name, qualified_name, file_path, start_line, end_line, properties)
edges(id, project, source_id, target_id, type, properties)
nodes_fts(name, qualified_name, label, file_path) -- FTS5 virtual table
nodes.label ∈ Folder, File, Function, Class, Variable, …edges.type ∈ CALLS, DEFINES, CONTAINS_FILE, CONTAINS_FOLDER, IMPORTS, FILE_CHANGES_WITH, SEMANTICALLY_RELATED, …nodes.properties is JSON — read via json_extract(properties, '$.key')Run with sqlite3 -readonly "$DB" "<query>" (read-only flag prevents any accidental writes).
SELECT n2.qualified_name, n2.file_path, n2.start_line
FROM edges e
JOIN nodes n1 ON e.target_id = n1.id
JOIN nodes n2 ON e.source_id = n2.id
WHERE n1.name = 'X' AND e.type = 'CALLS' AND e.project = 'PROJECT';
SELECT n2.qualified_name, n2.file_path, n2.start_line
FROM edges e
JOIN nodes n1 ON e.source_id = n1.id
JOIN nodes n2 ON e.target_id = n2.id
WHERE n1.name = 'X' AND e.type = 'CALLS' AND e.project = 'PROJECT';
SELECT DISTINCT file_path FROM nodes
WHERE project = 'PROJECT' AND file_path LIKE 'src/auth/%'
ORDER BY file_path;
SELECT n.name, n.label, n.file_path, n.start_line
FROM nodes_fts fts
JOIN nodes n ON n.qualified_name = fts.qualified_name
WHERE nodes_fts MATCH 'login*' AND n.project = 'PROJECT'
ORDER BY rank LIMIT 20;
SELECT n.name, n.label, n.start_line, n.end_line
FROM edges e
JOIN nodes n ON e.target_id = n.id
WHERE e.source_id = (SELECT id FROM nodes WHERE project = 'PROJECT' AND file_path = 'path/to/file.py' LIMIT 1)
AND e.type = 'DEFINES'
ORDER BY n.start_line;
SELECT name, file_path, start_line,
json_extract(properties, '$.complexity') AS complexity,
json_extract(properties, '$.lines') AS lines
FROM nodes
WHERE project = 'PROJECT' AND label = 'Function'
AND json_extract(properties, '$.complexity') > 10
ORDER BY complexity DESC LIMIT 20;
Use Grep and Glob as you would normally. Surface one line so the user knows why structural exploration isn't active:
No codebase-memory-mcp index for this repo — structural queries unavailable; using Grep.
The user can create an index by running codebase-memory-mcp against the repo (separate tool, not installed by PDS).
CALLS is a parsed call, not a string match. No false positives from comments, strings, or similarly-named symbols in other scopes.grep passes plus file reads to verify context./pds:verify — completion self-check before declaring done/pds:grill — requirement interrogation before implementation