Analyze project structure via AST parsing instead of reading every file.
bash
python3 skills/code-graph/scripts/analyze.py <project_dir>
Creates .code-graph.json in the project root. Takes seconds for most projects.
bash
python3 skills/code-graph/scripts/analyze.py <project_dir> --query <command> [args]
QueryDescriptionstatsProject overview: file counts, lines, functions, classesfunctionsList all functions with file + line numberclassesList all classes with bases, methods, file + linecalls <func>What does func call? (outgoing edges)callers <func>Who calls func? (incoming edges)file <path>Full summary of one file (functions, classes, imports, calls)importsImport graph: file → modules importedsearch <pattern>Find functions/classes matching pattern
stats then search to find what you needcallers to check impact--query)<project_dir>/.code-graph.json--output <path>Re-run without --query to rebuild. The cache includes a fingerprint for staleness detection.
bash
python3 skills/code-graph/scripts/analyze.py <project_dir> --exclude vendor --exclude tmp
Default excludes: node_modules, .git, pycache, .venv, dist, build, .next, coverage