explorelisted
Install: claude install-skill rmzi/portable-dev-system
# /explore — Structural Codebase Exploration
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.
## Invocation
```
/explore [optional search term or question]
```
## Detection
The codebase-memory-mcp index for the current project lives at:
```
~/.cache/codebase-memory-mcp/$(basename "$PWD").db
```
Check once at the start:
```bash
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
```
## Schema (relevant tables)
```
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')`
## Useful queries
Run with `sqlite3 -readonly "$DB" "<query>"` (read-only flag prevents any accidental writes).
### W