ln-020-codegraph

Solid

Builds and queries code knowledge graph for dependency analysis, references, implementations, and architecture overview. Use when starting work on unfamiliar codebase or before refactoring.

AI & Automation 480 stars 69 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

> **Paths:** File paths are relative to skills repo root. # Code Knowledge Graph **Type:** Standalone Utility **Category:** 0XX Dev Environment Indexes codebase into a layered graph (tree-sitter AST → SQLite) and provides dependency analysis, path tracing, references, implementations, and architecture overview via MCP tools. ## Inputs | Input | Required | Source | Description | |-------|----------|--------|-------------| | `project_path` | yes | args or CWD | Project root to index | | `command` | no | args | Specific action: `index`, `search`, `symbol`, `paths`, `refs`, `arch` | ## When to Use - Starting work on an **unfamiliar codebase** → `index` + `architecture` - Before **refactoring** a function/class → `find_symbols` + `inspect_symbol` + `trace_paths` - Understanding **call flow** → `trace_paths` - Finding a **symbol** quickly → `search` ## Workflow ### Phase 1: Index Check if graph exists (`.hex-skills/codegraph/index.db` in project root). **If NOT exists:** ``` Call: index_project({ path: "{project_path}" }) ``` **If exists** (re-index on demand): ``` Call: index_project({ path: "{project_path}" }) ``` Idempotent — skips unchanged files automatically. ### Phase 2: Query Route based on user intent: | User says | Tool | Parameters | |---|---|---| | "Show dependencies" / "What uses X?" | `trace_paths` | `{ name: "X", file: "...", path_kind: "mixed", direction: "reverse", path: "{project_path}" }` | | "Who calls X?" / "What does X call?" | `trace_paths` | `...

Details

Author
levnikolaevich
Repository
levnikolaevich/claude-code-skills
Created
7 months ago
Last Updated
3 days ago
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category