code-knowledge-graph

code-knowledge-graph is a skill for Claude Code from vibeeval/vibecosystem. It costs 24 tokens per session (3,262 once invoked), scanned A, original, MIT.

A tool for mapping a codebase as a graph of files, modules, functions, and classes, including how they depend on or call one another.

In plain words
What is it for?
Use it to create Mermaid diagrams or JSON graph data, inspect a module, find circular dependencies, analyze hotspots, and detect orphaned code.
Why use it?
It makes hidden relationships easier to see before refactoring, deleting code, or adding features. It can also help locate circular dependencies, hotspots, and unused code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create Mermaid diagrams or JSON graph data, inspect a module, find circular dependencies, analyze hotspots, and detect orphaned code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vibeeval/vibecosystem/code-knowledge-graph
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vibeeval/vibecosystem --skill code-knowledge-graph
Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-knowledge-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/vibeeval/vibecosystem/code-knowledge-graph/github.svg)](https://agentmods.dev/skills/vibeeval/vibecosystem/code-knowledge-graph)
Your own site
<a href="https://agentmods.dev/skills/vibeeval/vibecosystem/code-knowledge-graph"><img src="https://agentmods.dev/badge/skills/vibeeval/vibecosystem/code-knowledge-graph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-knowledge-graph

Your own site · 80×15
<a href="https://agentmods.dev/skills/vibeeval/vibecosystem/code-knowledge-graph"><img src="https://agentmods.dev/badge/skills/vibeeval/vibecosystem/code-knowledge-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,262 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.03262
Opus 5.5 $0.00010 $0.01305
Sonnet 5.5 $0.00005 $0.00652
Haiku 4.5 $0.00002 $0.00326

Measured 1mo ago against content hash 8f32a7c0c9f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-knowledge-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code-knowledge-graph/SKILL.md · 400 lines

How it starts

The opening of the file, as written. The whole thing — 400 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Knowledge Graph - Codebase Graph Analysis

Codebase'i knowledge graph olarak modeller. Dosya, modul, fonksiyon ve class'lar node; import, call, inheritance ve composition iliskileri edge olur. Sonuc: Mermaid diagram + JSON graph data.

Neden Knowledge Graph?

Kod text degil, graph'tir. Her dosya diger dosyalara baglidir. Bu baglantilari anlamadan:

  • Refactoring yaparken neyi kiracagini bilemezsin
  • Dead code'u guvenle silemezsin
  • Yeni feature'in nereye oturacagini gormezsin
  • Circular dependency'lerin kokunu bulamazsin

Knowledge graph tum bu iliskileri gorsellestirir ve olculebilir yapar.

Kullanim

/code-knowledge-graph [hedef-dizin] [--focus module] [--depth N] [--format mermaid|json|both]

Ornekler

# Tum codebase analizi
/code-knowledge-graph src/

# Belirli module odaklan
/code-knowledge-graph src/ --focus auth

# Sadece circular dependency kontrolu
/code-knowledge-graph src/ --focus circular

# Hotspot analizi
/code-knowledge-graph src/ --focus hotspots

# Orphan/dead code tespiti
/code-knowledge-graph src/ --focus orphans

Graph Olusturma Adimlari

Adim 1: Node Discovery

# Dosya agaci
tldr tree ${PATH:-src/} --ext .py

# Kod yapisi: fonksiyonlar, class'lar, export'lar
tldr structure ${PATH:-src/} --lang python

Her dosya, class, fonksiyon ve export bir node olur.

Adim 2: Edge Extraction

# Dosyanin import'lari (outgoing edges)
tldr imports ${FILE}

# Modulu kim import ediyor? (incoming edges)
tldr importers ${MODULE} ${PATH:-src/}

# Cross-file call graph
tldr calls ${PATH:-src/}

Her import ve fonksiyon cagrisi bir directed edge olur.

Adim 3: Layer Detection

# Architectural layer analizi
tldr arch ${PATH:-src/}

Node'lar 3 katmana ayrilir:

Katman Tanim Ornekler
Entry Disaridan cagirilan, ici cagirmayan routes, cli, main, handlers
Middle Hem cagrilan hem cagirir services, business logic
Leaf Cagirilan ama baskasini cagirmayan utils, helpers, constants

Read the full file on GitHub · 400 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 400 lines · 24 tokens per session scan A 8f32a7c0c9f4

Subscribe to this mod's changes

code-knowledge-graph is a skill published in the GitHub repository vibeeval/vibecosystem (540 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 3,262 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

understand-diff

Use when you need to analyze git diffs or pull requests to understand what changed, affected components, and risks.

Egonex-AI/Understand-Anything · 27 tokens

architecture-review

Analyze Python module architecture using pyscn - class coupling (CBO), cohesion (LCOM), dependency cycles, and module communities. Use when user asks about architecture, module structure, coupling, circular dependencies, or which files to review or change together.

ludo-technologies/pyscn · 53 tokens

refactoring

Find refactoring targets in Python code using pyscn - duplicate code (clones), overly complex functions, and dead code. Use when user asks about refactoring, code duplication, complexity hotspots, unreachable code, or cleaning up a codebase.

ludo-technologies/pyscn · 52 tokens

enola

Use Enola when investigating architecture, dependencies, blast radius, cross-repository relationships, structural regressions, or what a code change did to the system.

enola-labs/enola · 34 tokens

windows-compat

Audit and harden this Rust repo (code-graph-mcp) for Windows correctness: path-spelling drift between producers, the 32,767-char command-line cap, index-key mismatches, and path predicates that assume one ecosystem's layout. Use whenever touching code that builds, compares, prints, or stores a filesystem path; that…

sdsrss/code-graph-mcp · 165 tokens

cortex-memory

Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and NLI contradiction detection.

Fozikio/cortex-engine · 36 tokens