agentsclimarketplace

Ln 020 codegraph

Skill onfire7777/universal-ai-skills-library/skills/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.From its SKILL.md

Install
npx -y skills add onfire7777/universal-ai-skills-library --skill ln-020-codegraph

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.2 KB, 992 tokens by cl100k_base, as published. Nobody here has run it

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

InputRequiredSourceDescription
project_pathyesargs or CWDProject root to index
commandnoargsSpecific action: index, search, symbol, paths, refs, arch

When to Use

  • Starting work on an unfamiliar codebaseindex + architecture
  • Before refactoring a function/class → search + get_symbol + trace_paths
  • Understanding call flowtrace_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 saysToolParameters
"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

  1. Show MCP tool output directly (markdown tables)
  2. For code snippets referenced in results, use hex-line read_file with line ranges
  3. Suggest follow-up queries based on results:
    • After search_symbols → suggest get_symbol for top result
    • After get_symbol → suggest trace_paths if refactoring
    • After trace_paths → suggest find_references or find_implementations depending on symbol kind

Supported Languages

LanguageExtensionsCoverage
JavaScript.js, .mjs, .cjs, .jsxStrongest semantic coverage
TypeScript / TSX.ts, .tsxStrongest semantic coverage
Python.pyDefinitions, exports, imports; more limited cross-file semantics
C#.csDefinitions, exports, imports, type relations
PHP.phpDefinitions, 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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.