skills/clawhub.ai/codegraph

codegraph

Installation
SKILL.md

CodeGraph — Graph-First Codebase Analysis

Answer codebase questions from a pre-built local code graph instead of a grep+read crawl. CodeGraph parses a project with tree-sitter, stores symbols/edges/files in SQLite with FTS5, and returns the verbatim source an agent needs in one call.

Graph-first doctrine

Start with explore: when it finds the relevant symbols, it returns their verbatim, line-numbered source plus call paths — a completed Read, not a search result.

  • Treat explore output as the read source itself: it is byte-for-byte the on-disk file, identical to a Read call. Using it directly is the point of the tool.
  • For flow questions, name the symbols spanning the flow: codegraph explore 'mutateElement renderScene' surfaces the call path among them, riding dynamic-dispatch hops grep cannot follow.
  • After edits, if a response opens with a ⚠️ Some files referenced below were edited since the last index sync banner, Read only the listed files; everything unlisted is fresh.

Indexing

CodeGraph is per-project and index-driven. The graph lives in <repo>/.codegraph/.

  • Before querying, confirm the project is indexed with codegraph status.
  • An unindexed project: stop calling codegraph for it this session and fall back to built-in Read/Grep. Indexing is the caller's decision — mention codegraph init exists, run it only when authorized.
  • codegraph init in the project root builds .codegraph/ and the graph in one step. It respects .gitignore and default-excluded dirs (node_modules, dist, vendor, ...); files over 1 MB are skipped.
Installs
2
First Seen
Aug 10, 2026
codegraph from clawhub.ai