Codebase Graph

Transforms complex repositories into interactive visual maps and structured onboarding guides.

Install
cmdop skills install agensi-codebase-graph

Codebase Graph is a skill that analyzes unfamiliar repositories and produces structured visual and textual representations of their architecture. It parses a project’s directory structure, import statements, and configuration files such as package.json using AST-based analysis to build a dependency model of the codebase.

From that model, the skill generates a standalone, interactive D3.js force-directed graph that shows how modules relate to one another. It also produces detailed Markdown summaries covering entry points, refactor suggestions, and module relationships. Beyond a basic file-tree view, it detects circular dependencies, identifies likely dead code, and ranks modules by their centrality to the overall architecture, helping developers understand where execution begins and where technical debt concentrates.

Supported languages include TypeScript, JavaScript, and Python. The skill is aimed at situations where a developer needs to understand a large, unfamiliar codebase without manually tracing files — for example, during onboarding or when planning a major refactor. Because the skill has no listed environment variables or external service dependencies, it operates against the local repository files it is given access to.

This is not a runtime monitoring or database introspection tool. It does not connect to Postgres or any other database, so it is the wrong choice if the goal is querying live data rather than understanding source code structure.

Use cases

  • Generate an interactive dependency graph before starting a large refactor
  • Onboard a new developer by producing a visual map of module relationships
  • Detect circular dependencies in a TypeScript or JavaScript project
  • Identify likely dead code and rank modules by architectural centrality
  • Produce a Markdown summary of entry points and refactor suggestions for a Python codebase
  • Audit a repository's structure to locate technical debt hotspots

When to use it

  • When onboarding onto a large, unfamiliar codebase in TypeScript, JavaScript, or Python
  • When planning a refactor and needing to understand hidden module interdependencies
  • When circular dependencies or dead code are suspected but not yet located
  • When a visual, interactive representation of the codebase architecture is required

When not to use it

  • When the goal is querying or interacting with a live database such as Postgres
  • When the project language is outside TypeScript, JavaScript, or Python
  • When runtime performance profiling or live tracing is needed rather than static analysis
  • When a simple file-tree listing is sufficient and graph-level detail is not required