Agent skill

Code Knowledge Graph

by vibeeval in vibeeval/vibecosystem

Codebase'i knowledge graph olarak analiz et. An agent skill from vibeeval/vibecosystem.

MITAuto-check: notesKnowledge Management

Install Code Knowledge Graph

skills CLI
$ npx skills add vibeeval/vibecosystem --skill code-knowledge-graph -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vibeeval/vibecosystem code-knowledge-graph --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-knowledge-graph .claude/skills/code-knowledge-graph && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-knowledge-graph
GitHub stars
531
Token cost
~2.7k tokens
SKILL.md length
690 words
Files
1
Skills in repo
144
Repo updated
First seen
Licence
MIT

At a glance

Codebase'i knowledge graph olarak analiz et. An agent skill from vibeeval/vibecosystem.

  • Works in 4 steps: Impact sorusu: "Bu degisiklik kac modulu… → Coupling sorusu: "Bu yeni import cycle… → Cohesion sorusu: "Bu modul cok mu fazla… → …
  • Tasks that involve Knowledge graphs
  • SKILL.md covers Neden Knowledge Graph?, Kullanim, Graph Olusturma Adimlari and Dependency Analysis Pattern'leri, plus 4 more sections
  • Calls git

What it does

Code Knowledge Graph is an agent skill from vibeeval/vibecosystem. Codebase'i knowledge graph olarak analiz et. Dependency, call graph, hotspot analizi.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering Knowledge graphs and Codebase onboarding. It works with Model Context Protocol. The repository describes itself as: AI software team for Claude Code - 138 agents, 295 skills, 73 hooks. Self-learning, multi-agent swarm, autonomous skill evolution. The licence is MIT.

When your agent uses it

  • Tasks that involve Knowledge graphs
  • Tasks that involve Codebase onboarding

Example prompts

  • “/code-knowledge-graph”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Glob, Grep

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Impact sorusu: "Bu degisiklik kac modulu etkiler?"
  2. Coupling sorusu: "Bu yeni import cycle yaratir mi?"
  3. Cohesion sorusu: "Bu modul cok mu fazla is yapiyor?"
  4. Dead code sorusu: "Bu fonksiyon gercekten kullaniliyor mu?"

What it can do on your machine

Read from SKILL.md and the folder at commit 3b763b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Knowledge Graph loads about 2.7k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 690 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 690 words, ~2,700 tokens.

Download SKILL.mdSave it as .claude/skills/code-knowledge-graph/SKILL.md (or your agent's skills folder).
name
code-knowledge-graph
description
Codebase'i knowledge graph olarak analiz et. Dependency, call graph, hotspot analizi.
allowed-tools
Bash, Read, Glob, Grep
keywords
dependency graph, code graph, knowledge graph, codebase analysis, architecture analysis, circular dependency, hotspot, orphan, call graph, import graph

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
bash
# 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
bash
# 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
bash
# 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
bash
# Architectural layer analizi
tldr arch ${PATH:-src/}

Node'lar 3 katmana ayrilir:

KatmanTanimOrnekler
EntryDisaridan cagirilan, ici cagirmayanroutes, cli, main, handlers
MiddleHem cagrilan hem cagirirservices, business logic
LeafCagirilan ama baskasini cagirmayanutils, helpers, constants
Adim 4: Impact Analysis
bash
# Bu fonksiyona kim bagimli?
tldr impact ${FUNCTION} ${PATH:-src/} --depth 3

# Dead code: hicbir yerden cagrilmayan fonksiyonlar
tldr dead ${PATH:-src/}
Adim 5: codebase-memory MCP Entegrasyonu

codebase-memory MCP kuruluysa, persistent graph sorgusu yap:

mcp: index_status       -> Repo index durumu
mcp: index_repository   -> Repo'yu indexle (yoksa)
mcp: query_graph        -> Graph sorgusu (iliskiler)
mcp: search_graph       -> Pattern arama
mcp: get_architecture   -> Mimari genel bakis
mcp: trace_call_path    -> Fonksiyonlar arasi cagri yolu

MCP, session'lar arasi kalici graph verisi saglar. tldr ise anlik taze analiz verir. Ikisini birlikte kullan.

Dependency Analysis Pattern'leri

Direct Dependencies

A dogrudan B'yi import ediyor:

A --import--> B
Transitive Dependencies

A, B'yi import ediyor, B de C'yi import ediyor. A, C'ye transitif bagimli:

A --import--> B --import--> C
A ....transitif....> C

Transitive dependency chain'i uzadikca risk artar. tldr impact ile transitif zincirleri gor.

Fan-In vs Fan-Out
MetrikYuksek Degerin AnlamiRisk
Fan-In (in-degree)Cok modul buna bagimliFragile - degisiklik cascade yapar
Fan-Out (out-degree)Bu modul cok seye bagimliUnstable - disaridan kirilabilir

Hedef: Leaf node'larda yuksek fan-in (iyi - utility), entry node'larda yuksek fan-out (kotu - god module).

Circular Dependency Cozme Stratejileri

Circular dependency = A imports B, B imports A (dogrudan veya transitif).

Strateji 1: Extract Interface
ONCE: A <--> B (circular)
SONRA: A --> IB <-- B (interface ile decouple)

Her iki modul de bir interface'e bagimli olur, birbirine degil.

Strateji 2: Dependency Inversion
ONCE: A --> B --> A (circular)
SONRA: A --> B, A <-- C (C yeni modul, B'nin A'ya ihtiyac duydugu kismi tasir)
Strateji 3: Extract Shared Module
ONCE: A <--> B (ortak kod paylasiyor)
SONRA: A --> Shared <-- B (ortak kod ayri module)
Strateji 4: Event-Based Decoupling
ONCE: A --> B --> A (geri cagri)
SONRA: A --> EventBus <-- B (event ile haberlesme)
Hangi Stratejiyi Sec?
DurumStrateji
Type/interface paylasimiExtract Interface
Fonksiyon geri cagrisiDependency Inversion
Ortak utility koduExtract Shared Module
Async bildirim ihtiyaciEvent-Based Decoupling

Hotspot Analizi ve Refactoring Onceliklendirme

Hotspot = Graph'ta en cok baglantisi olan node.

Hotspot Skorlama
hotspot_score = (in_degree * 2) + out_degree + (change_frequency * 3)
  • in_degree * 2: Bagimli modul sayisi (en onemli - cascade risk)
  • out_degree: Bagimlilik sayisi (kirilganlik)
  • change_frequency * 3: Git log'dan degisiklik sikligi (degisen hotspot = en tehlikeli)
Refactoring Oncelik Matrisi
Hotspot TipiOncelikAksiyon
Yuksek in-degree + sik degisenP0 CRITICALHemen split et, test ekle
Yuksek in-degree + stabilP2 MEDIUMTest ekle, dikkatli degistir
Yuksek out-degreeP1 HIGHDependency'leri azalt, facade pattern
Yuksek her ikisiP0 CRITICALGod module - parcala
Change Frequency Analizi
bash
# Git log'dan en cok degisen dosyalar
git log --format=format: --name-only --since="6 months ago" | sort | uniq -c | sort -rn | head -20

Cok degisen + cok baglantili = en yuksek risk.

Mermaid Diagram Ornekleri

Dependency Graph (Layered)
mermaid
graph TD
    subgraph Entry["Entry Layer (Red)"]
        routes[routes.py]
        cli[cli.py]
    end
    subgraph Middle["Middle Layer (Orange)"]
        auth[auth_service.py]
        user[user_service.py]
    end
    subgraph Leaf["Leaf Layer (Green)"]
        utils[utils.py]
        validators[validators.py]
    end

    routes --> auth
    routes --> user
    cli --> user
    auth --> utils
    auth --> validators
    user --> utils

    style routes fill:#e74c3c,color:#fff
    style cli fill:#e74c3c,color:#fff
    style auth fill:#f39c12,color:#fff
    style user fill:#f39c12,color:#fff
    style utils fill:#27ae60,color:#fff
    style validators fill:#27ae60,color:#fff
Call Graph
mermaid
graph LR
    handle_request --> validate
    handle_request --> authorize
    authorize --> check_token
    authorize --> check_role
    validate --> sanitize
    check_token --> decode_jwt
Circular Dependency (Highlighted)
mermaid
graph LR
    A[module_a] -->|imports| B[module_b]
    B -->|imports| C[module_c]
    C -->|imports| A

    style A fill:#e74c3c,color:#fff
    style B fill:#e74c3c,color:#fff
    style C fill:#e74c3c,color:#fff
    linkStyle 0 stroke:#e74c3c,stroke-width:3px
    linkStyle 1 stroke:#e74c3c,stroke-width:3px
    linkStyle 2 stroke:#e74c3c,stroke-width:3px
Hotspot Visualization
mermaid
graph TD
    A[utils.py<br/>in:12 out:1<br/>HOTSPOT]
    B[service.py<br/>in:3 out:8]
    C[routes.py<br/>in:0 out:5]
    D[models.py<br/>in:6 out:2]

    C --> B
    C --> A
    B --> A
    B --> D
    D --> A

    style A fill:#e74c3c,stroke:#c0392b,stroke-width:4px,color:#fff
    style D fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:#fff
Show full SKILL.md (281 more words)Show less

Graph-Based Code Review

Knowledge graph review'da su sorulari cevaplar:

  1. Impact sorusu: "Bu degisiklik kac modulu etkiler?"

    bash
    tldr impact changed_function src/ --depth 3
  2. Coupling sorusu: "Bu yeni import cycle yaratir mi?"

    • Mevcut graph'a yeni edge ekle, cycle kontrol et
  3. Cohesion sorusu: "Bu modul cok mu fazla is yapiyor?"

    • Out-degree > 8 ise muhtemelen evet
  4. Dead code sorusu: "Bu fonksiyon gercekten kullaniliyor mu?"

    bash
    tldr impact function_name src/

Onboarding Icin Graph Kullanimi

Yeni developer'a codebase'i tanitmak icin:

  1. Buyuk resim: Layer diagram'i goster (entry/middle/leaf)
  2. Kritik yollar: En onemli call chain'leri goster
  3. Hotspot'lar: "Bu dosyalara dokunurken dikkatli ol" listesi
  4. Moduller: Her modulu 1 cumle ile acikla + bagimliliklari goster

Architectural Decision Support

Graph verisi mimari kararlari destekler:

KararGraph Verisi
"Bu modulu bolmeli miyiz?"In-degree + out-degree + LOC
"Microservice siniri nerede?"Cluster analizi (yuksek ic baglantilar, dusuk dis baglantilar)
"Hangi modulu once refactor edelim?"Hotspot score siralamasina bak
"Yeni feature nereye oturur?"Mevcut layer'a ve dependency pattern'ine bak
"Bu dependency guvenli mi?"Transitif dependency chain'ine bak

tldr CLI Komut Referansi

KomutKullanimCikti
tldr tree [path]Dosya agaciJSON
tldr structure [path] --lang XKod yapisi (codemaps)JSON
tldr calls [path]Cross-file call graphJSON
tldr impact <func> [path]Reverse call graphJSON
tldr dead [path]Dead/orphan codeJSON
tldr arch [path]Layer detectionJSON
tldr imports <file>Dosyanin import'lariJSON
tldr importers <module> [path]Modulu kim import ediyorJSON

JSON Graph Data Formati

json
{
  "metadata": {
    "project": "project-name",
    "analyzed_at": "2026-03-26T10:00:00Z",
    "total_nodes": 45,
    "total_edges": 128,
    "languages": ["python"]
  },
  "nodes": [
    {
      "id": "src/auth/service.py::AuthService",
      "type": "class",
      "file": "src/auth/service.py",
      "layer": "middle",
      "in_degree": 5,
      "out_degree": 3,
      "is_hotspot": true,
      "is_orphan": false
    }
  ],
  "edges": [
    {
      "source": "src/routes.py::handle_login",
      "target": "src/auth/service.py::AuthService.authenticate",
      "type": "call"
    }
  ],
  "layers": {
    "entry": [],
    "middle": [],
    "leaf": []
  },
  "circular_dependencies": [],
  "hotspots": [],
  "orphans": []
}

Iliskili Araclar

AracNe Zaman
graph-analyst agentTam graph analizi, otomatik rapor
tldr archHizli layer detection
tldr callsHizli call graph
codebase-memory MCPPersistent graph, session arasi sorgulama
/explore architectureGenel mimari kesfetme
architect agentGraph verisiyle mimari karar
janitor agentOrphan/dead code temizligi

© vibeeval, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/code-knowledge-graph of vibeeval/vibecosystem.

Open the folder on GitHubat commit 3b763b1

Compare with similar skills

Code Knowledge Graph next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Knowledge Graph compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Knowledge Graph this skillvibeeval/vibecosystem531—~2.7kAutomated safety check: NotesMIT
Memtrace Indexsyncable-dev/memtrace-public486—~1.2kAutomated safety check: PassCustom licence
Explore Codebase with Graphtirth8205/code-review-graph32k1 repos~335Automated safety check: PassMIT
Forgetful Repo EncodingScottRBK/forgetful301—~1kAutomated safety check: PassMIT
Compasscrabbuild/compass168—~5kAutomated safety check: PassCustom licence
Codebase Domain Flow ExtractorEgonex-AI/Understand-Anything85k1 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • Memtrace Index

    syncable-dev/memtrace-public

    Index a source-code repo into the Memtrace knowledge graph and poll the job to completion.

    486 GitHub stars~1.2k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Explore Codebase with Graph

    tirth8205/code-review-graph

    Navigates a codebase through the code-review-graph MCP tools: architecture overview, symbol search, caller and callee tracing, flows and oversized functions.

    32k GitHub starsUsed in 1 repo~335 tokens
    DevelopmentAuto-check passed
  • Forgetful Repo Encoding

    ScottRBK/forgetful

    Encodes a repository into the Forgetful knowledge base as a project, entities, atomic memories and documents, so a second run updates instead of duplicating.

    301 GitHub stars~1k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Compass

    crabbuild/compass

    A skill your agent uses for graph-first AI coding sessions and repository analysis: session initialization, architecture maps, dependency or call-graph tracing, symbol and repository search…

    168 GitHub stars~5k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Codebase Domain Flow Extractor

    Egonex-AI/Understand-Anything

    Extracts business domains, flows and process steps from a codebase and produces an interactive horizontal flow graph, reusing an existing knowledge graph when one exists.

    85k GitHub starsUsed in 1 repo~2.4k tokens
    Knowledge ManagementAuto-check passed
  • Memory

    yonatangross/orchestkit

    Read-side memory operations on the knowledge graph: search past decisions and patterns, load session context, view decision timelines, render Mermaid graph visualizations.

    288 GitHub stars~1.8k tokensUpdated yesterday
    Knowledge ManagementAuto-check: notes

More from vibeeval/vibecosystem

All 144 skills in this repo
  • Agent Benchmark

    vibeeval/vibecosystem

    Framework for measuring and tracking agent response quality over time.

    531 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Differential Review

    vibeeval/vibecosystem

    Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Factcheck Guard

    vibeeval/vibecosystem

    A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.

    531 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Fp Check

    vibeeval/vibecosystem

    Systematic false positive verification for security findings.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Notepad System

    vibeeval/vibecosystem

    A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.

    531 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Code Knowledge Graph

What does Code Knowledge Graph do?

Codebase'i knowledge graph olarak analiz et. An agent skill from vibeeval/vibecosystem. Code Knowledge Graph is an agent skill from vibeeval/vibecosystem. Codebase'i knowledge graph olarak analiz et.

When should I use Code Knowledge Graph?

Code Knowledge Graph fits situations like: tasks that involve Knowledge graphs; tasks that involve Codebase onboarding.

How do I install Code Knowledge Graph in Claude Code?

Run `npx skills add vibeeval/vibecosystem --skill code-knowledge-graph -a claude-code`. Or copy the skill folder (skills/code-knowledge-graph in vibeeval/vibecosystem) into .claude/skills/code-knowledge-graph in your project. Claude Code loads it when a task matches its description.

How do I install Code Knowledge Graph in Codex?

Run `npx skills add vibeeval/vibecosystem --skill code-knowledge-graph -a codex`. Or copy the skill folder (skills/code-knowledge-graph in vibeeval/vibecosystem) into .agents/skills/code-knowledge-graph in your project. Codex loads it when a task matches its description.

Can I use Code Knowledge Graph in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vibeeval/vibecosystem --skill code-knowledge-graph -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-knowledge-graph, .gemini/skills/code-knowledge-graph, .github/skills/code-knowledge-graph and .opencode/skills/code-knowledge-graph in your project.

What does Code Knowledge Graph need to run?

Going by SKILL.md and its folder, Code Knowledge Graph needs the command-line tools its instructions call (git). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Glob, Grep.

Does Code Knowledge Graph access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Knowledge Graph safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Code Knowledge Graph use?

Code Knowledge Graph is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Knowledge Graph use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Knowledge Graph?

Skills that share tags, products or a category with Code Knowledge Graph: Memtrace Index (syncable-dev/memtrace-public, 486 stars), Explore Codebase with Graph (tirth8205/code-review-graph, 32k stars), Forgetful Repo Encoding (ScottRBK/forgetful, 301 stars) and Compass (crabbuild/compass, 168 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Knowledge Graph?

vibeeval (a GitHub user) maintains it in vibeeval/vibecosystem, which has 531 GitHub stars. The repository holds 144 skills in this directory. The repository was last updated on August 8, 2026.

Source: vibeeval/vibecosystem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.