living-codebase-ast-graph

living-codebase-ast-graph is a skill for Cursor from roedyrustam/vibes-plug. It costs 34 tokens per session (5,690 once invoked), scanned A, original, MIT.

A guide to building an in-memory graph of a codebase's syntax and symbol relationships. An abstract syntax tree is a structured representation of source code that shows how its parts fit together.

In plain words
What is it for?
Use it to analyze multi-file and monorepo codebases, estimate the impact of renaming or changing symbols, plan generation order, and remove unreachable code.
Why use it?
Large refactors can break code in files or packages that are not obvious from text searches. Mapping dependencies helps identify affected code, circular dependencies, and unused code before changes are made.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin. Also seen: mentions subagents.

Part of the vibes-plug plugin — 179 skills, 9 agents, 2 MCP servers shipped together

Good fit Use it to analyze multi-file and monorepo codebases, estimate the impact of renaming or changing symbols, plan generation order, and remove unreachable code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/living-codebase-ast-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 roedyrustam/vibes-plug --skill living-codebase-ast-graph
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Cursor.

Or install vibes-plug, the plugin that ships this one along with the rest of its 179 skills, 9 agents, 2 MCP servers.

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 living-codebase-ast-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/living-codebase-ast-graph/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/living-codebase-ast-graph)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/living-codebase-ast-graph"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/living-codebase-ast-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 living-codebase-ast-graph

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/living-codebase-ast-graph"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/living-codebase-ast-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,690 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.
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.00034 $0.05690
Opus 5.5 $0.00014 $0.02276
Sonnet 5.5 $0.00007 $0.01138
Haiku 4.5 $0.00003 $0.00569

Measured 16d ago against content hash 6e0e84fede67, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

living-codebase-ast-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 16d 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.

.cursor/skills/living-codebase-ast-graph/SKILL.md · 493 lines

How it starts

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

Living Codebase AST Graph (2026 Sovereign Edition)

English | Bahasa Indonesia


English

Executive Directive & The AST Knowledge Paradigm (2026 Shift)

Fuzzy text matching (Ripgrep, regex, or basic keyword search) is catastrophic for large-scale autonomous refactoring. Renaming a function like init() or format() via global search-and-replace corrupts unrelated variables, breaks third-party interfaces, and silently introduces critical bugs.

The Living Codebase AST Graph represents a codebase not as flat text files, but as a dynamic, queryable neural knowledge graph built from native Abstract Syntax Trees across TypeScript, Python, Go, and Rust. It enables autonomous AI swarms to:

  1. Calculate Blast Radius: Determine every inbound caller, interface consumer, and database dependent before modifying any symbol.
  2. Detect Cycles Mathematically: Identify circular dependency loops using Tarjan's Strongly Connected Components (SCC) algorithm.
  3. Enforce Topological Generation Order: Sequence multi-agent code generation so base schemas and types are completed before downstream controllers or UI widgets are constructed.
  4. Persist Across Sessions via XERJ MCP: Store the graph in unified episodic memory (xerj_brain_link, xerj_memory_store) for instant context retrieval across agent restarts.

Orchestration & Integration

  • Upstream Swarm Orchestration: zero-to-prod-orchestrator, brainstorming, session-memory-manager.
  • AST Mapping & Type Systems: typescript-expert, python-programming-expert, go-programming-expert, rust-programming-expert.
  • Refactoring & Debt Eradication: scalability-clean-code, legacy-code-translator, zero-tech-debt-auditor, anti-slop.
  • Persistent Graph Memory: xerj-search-expert, vector-db-rag-expert.

Core Architectural Graph Topologies

┌────────────────────────────────────────────────────────────────────────┐
│                   LIVING CODEBASE AST GRAPH PIPELINE                   │
├────────────────────────────────────────────────────────────────────────┤
│ 1. Multi-Language Source Code (TypeScript, Python, Go, Rust)           │
│                                  │                                     │
│                                  ▼                                     │
│ 2. Native AST Parsers (ts.createProgram, ast.parse, go/parser, syn)    │
│                                  │                                     │
│                                  ▼                                     │
│ 3. Symbol Registration & In-Memory Graph Index                         │
│    • Node: SymbolKey (FileUri#SymbolName, Kind, Signature)             │
│    • Inbound Edges (Callers) | Outbound Edges (Dependencies)           │
│                                  │                                     │
│        ┌─────────────────────────┼─────────────────────────┐           │
│        ▼                         ▼                         ▼           │
│  [Blast Radius]          [Tarjan SCC Cycles]      [Topological DAG]    │
│  Recursive Inbound       Detect Circular Deps     Sequence Multi-Agent │
│  Caller Traversal        Before Build Crash       Swarm Generation     │
│        │                         │                         │           │
│        └─────────────────────────┼─────────────────────────┘           │
│                                  ▼                                     │
│ 4. Persistent Memory Serialization (XERJ Graph Brain / Memory Store)   │
└────────────────────────────────────────────────────────────────────────┘

Read the full file on GitHub · 493 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. 16d ago Changed 6e0e84fede67
  2. 21d ago Changed · +22 lines e4dcd4a4e649
  3. 1mo ago Changed · +224 lines · -42 tokens per session 6a1d7f611038
  4. 1mo ago Changed · -22 lines f91a5245ec6d
  5. 1mo ago Changed · +1 lines 237b85923a4f
  6. 1mo ago Changed 92ad0ad9efd5
  7. 1mo ago Changed c7f211fea1a7
  8. 2mo ago First seen · 268 lines · 76 tokens per session scan A c690bc1af477

Subscribe to this mod's changes

living-codebase-ast-graph is a skill published in the GitHub repository roedyrustam/vibes-plug (132 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 5,690 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-10-04.

Related

living-codebase-ast-graph compared with skills from other repositories

living-codebase-ast-graph next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
living-codebase-ast-graphroedyrustam/vibes-plugSkill1322d agoMITA34Cursor
code-reviewerchidekina/aria-superpowersSkill22mo agononeA47Claude Code, Codex
doubt-driven-developmentaddyosmani/agent-skillsSkill123k3d agoMITA96Claude Code
discount-reviewpromptfoo/promptfooSkill28ktodayMITA18Claude Code, Codex
code-reviewpromptfoo/promptfooSkill28ktodayMITA11Claude Code
triagevinvcn/mattpocock-skills-zh-CNSkill6.3k4d agoMITA34Claude Code, Codex
improve-codebase-architecturevinvcn/mattpocock-skills-zh-CNSkill6.3k4d agoMITA35Claude Code, Codex