inspect-db
Skill2 starsChanged 35 days agoApache-2.0View on GitHub
Live data-layer diagnostics for Mazarbul. USE WHEN user asks "why is recall slow", "show me the event log", "is the graph corrupted", "what's in the vector index", or any question about the four-layer storage (event log + Kuzu + sqlite-vec + FTS). NOT FOR schema introspection of upcoming entity kinds (those live in JSON Schema source).
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 12-principles-of-animationSkill
- aip-namingSkill
- architectSkill
- babysit-abortSkill
- babysit-prSkill
- babysit-tickSkill
- baseline-uiSkill
- commit-pushSkill
- complex-refactorSkill
- critiqueSkill
- deadSkill
- devstackSkill
- go-backendSkill
- goSkill
- go-strictSkill
- greptileSkill
- impl-checkSkill
- inspect-deploySkill
- inspect-runtimeSkill
- interaction-designSkill
- issue-planSkill
- lessonsSkill
- mergeSkill
- new-resourceSkill
- plan-featureSkill
- preflightSkill
- pr-reviewSkill
- review-fixSkill
- reviewSkill
- shipSkill
- simplifySkill
- task-execution-protocolSkill
- teamSkill
- tui-component-browserSkill
- tui-design-labSkill
- tui-designSkill
- verifySkill
- wrap-upSkill
- write-docsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 71
If a recall is slow:
- Very specific: line 73
Run the query with --explain on the CLI (when implemented).
- Distinctive: line 76
Check that the kernel composer is filtering by scope (some scopes prune the candidate set drastically).
- Very specific: line 87
SQLite locked: when maz mcp serve is running, use ?mode=ro URI or stop the daemon.
- Very specific: line 89
Vector dimension mismatch: after switching embedding models, blow away vec.sqlite and re-index.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Live data-layer diagnostics
Mazarbul stores facts across four layers, all rooted at $MAZ_DATA_DIR:
events.sqlite, the append-only event log.graph.kuzu, the property graph.vec.sqlite, the sqlite-vec vector index.fts.sqlite, the FTS5 full-text index.
This skill is for probing them live.
Triage tree
1. Event log
sqlite3 "$MAZ_DATA_DIR/events.sqlite" <<SQL
.headers on
.mode column
SELECT kind, source_connector, count(*) FROM events GROUP BY kind, source_connector ORDER BY 3 DESC LIMIT 20;
SQLWatch for:
- Unexpected supersede chains (one event with many supersededBy references).
- Events lacking
source_connectororconfidence(provenance gaps). - Time clustering (a single connector flooding the log).
2. Vector index
sqlite3 "$MAZ_DATA_DIR/vec.sqlite" <<SQL
.headers on
SELECT count(*) AS embeddings, max(length(vec)) AS dim FROM embeddings;
SQLWatch for:
- Dimension drift (you changed embedding model mid-stream).
- Counts diverging from the event log count (indexer is behind).
3. Full-text index
sqlite3 "$MAZ_DATA_DIR/fts.sqlite" "SELECT count(*) FROM fts;"4. Graph
kuzu "$MAZ_DATA_DIR/graph.kuzu" <<CYPHER
MATCH (n) RETURN labels(n)[0] AS kind, count(*) AS n ORDER BY n DESC;
CYPHERWatch for:
- Orphan nodes (entities with no incoming or outgoing edges).
- Edge counts wildly higher than node counts (over-relating).
Slow recall
If a recall is slow:
- Run the query with
--explainon the CLI (when implemented). - Confirm the vector index is up to date (count above).
- Confirm the FTS index is up to date (count above).
- Check that the kernel composer is filtering by scope (some scopes prune the candidate set drastically).
- Profile the recall path:
mise run pprof:cpuagainst the running daemon.
Storage hygiene
VACUUMthe SQLite files monthly:sqlite3 events.sqlite "VACUUM;".- Kuzu's storage layer reclaims space on rebuild only;
maz kuzu compact(when implemented) handles this. - Backup is git-mediated for events.sqlite (CRDT sync). Other layers are derived and re-buildable.
Common gotchas
- SQLite locked when
maz mcp serveis running, use?mode=roURI or stop the daemon. - Kuzu requires a single writer, multiple
kuzuCLIs at once will fail. - Vector dimension mismatch after switching embedding models, blow away
vec.sqliteand re-index.
What this skill is NOT
- Schema design for new entity kinds, see
/new-resourcefor that. - Cloud-DB ops, Mazarbul is local-first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

