ln-020-codegraph
БесплатноБез исполняемых скриптовНе проверенBuilds and queries code knowledge graph for dependency analysis, references, implementations, and architecture overview. Use when starting work on unfamiliar…
от onfire7777★ 17 звёзд на GitHubОб этом скилле
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 →
search+get_symbol+trace_paths - Understanding call flow →
trace_paths - Finding a symbol quickly →
search
Workflow
Phase 1: Index
Check if graph exists (.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" } |
| "Who calls X?" / "What does X call?" | trace_paths |
{ name: "X", file: "...", path_kind: "calls", direction: "reverse"|"forward" } |
| "Tell me about X" / "Context of X" | get_symbol |
{ name: "X", file: "..." } |
| "Project structure" / "Architecture" | get_architecture |
{ path?: "src/" } |
| "Find symbol X" | search_symbols |
{ query: "X" } |
| "Watch for changes" | watch_project |
{ path: "{project_path}" } |
| "Find duplicate code" | find_clones |
{ type: "all" } |
| "Risky hotspots" | find_hotspots |
{ minCallers: 2, minComplexity: 5 } |
| "Unused exports" | find_unused_exports |
{} |
| "Circular dependencies" | find_cycles |
{} |
| "Module coupling" | get_module_metrics |
{ minCoupling: 0 } |
| "Implementations / overrides" | find_implementations |
{ qualified_name: "..." } |
| "Dataflow / propagation" | find_dataflows |
{ qualified_name: "...", depth: 2 } |
Phase 3: Present Results
- Show MCP tool output directly (markdown tables)
- For code snippets referenced in results, use
hex-line read_filewith line ranges - Suggest follow-up queries based on results:
- After
search_symbols→ suggestget_symbolfor top result - After
get_symbol→ suggesttrace_pathsif refactoring - After
trace_paths→ suggestfind_referencesorfind_implementationsdepending on symbol kind
- After
Supported Languages
| Language | Extensions | Coverage |
|---|---|---|
| JavaScript | .js, .mjs, .cjs, .jsx | Strongest semantic coverage |
| TypeScript / TSX | .ts, .tsx | Strongest semantic coverage |
| Python | .py | Definitions, exports, imports; more limited cross-file semantics |
| C# | .cs | Definitions, exports, imports, type relations |
| PHP | .php | Definitions, exports, imports |
MCP Server Setup
Add to .mcp.json:
{
"mcpServers": {
"hex-graph": {
"command": "node",
"args": ["{skills_repo}/mcp/hex-graph-mcp/server.mjs"]
}
}
}
Definition of Done
- Project indexed (index_project returns success)
- Query results shown to user
- Follow-up suggestions provided
Version: 0.1.0 Last Updated: 2026-03-20
Установить ln-020-codegraph в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ln-020-codegraph?
Builds and queries code knowledge graph for dependency analysis, references, implementations, and architecture overview. Use when starting work on unfamiliar codebase or before refactoring.
Как установить скилл ln-020-codegraph?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ln-020-codegraph запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic