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 598 stars 90 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
92
Recency 20%
90
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
1 years ago
Last Updated
1 weeks ago
Language
Shell
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

codebase-memory

Use the codebase knowledge graph for structural code queries. Triggers on: explore the codebase, understand the architecture, what functions exist, show me the structure, who calls this function, what does X call, trace the call chain, find callers of, show dependencies, impact analysis, dead code, unused functions, high fan-out, refactor candidates, code quality audit, graph query syntax, Cypher query examples, edge types, how to use search_graph.

3 Updated 1 weeks ago
LucasSantana-Dev
AI & Automation Listed

codegraph

Query a repository's CodeGraph index (MCP tools or the codegraph CLI) instead of broad grep and file reading. Use when locating the code relevant to a task or ticket, understanding an unfamiliar codebase, finding a symbol's callers or callees, estimating a change's blast radius, tracing dependencies, or finding tests related to a change.

4 Updated today
isink17
Code & Development Listed

querying-the-codebase-memory-graph

Use the codebase-memory-mcp knowledge graph for structural code queries: callers, callees, call chains, impact of a diff, dead code, fan-in/out, Cypher queries, plus evidence tiers and subagent handoff. Triggers on: explore the codebase, understand the architecture, what functions exist, show me the structure, who calls this function, what does X call, trace the call chain, find callers of, show dependencies, impact analysis, dead code, unused functions, high fan-out, refactor candidates, code quality audit, graph query syntax, Cypher query examples, edge types, how to use search_graph.

0 Updated today
sblattj