# codebase-architecture-map

> Analyze codebase structure, map dependencies, and calculate change impact using local AST and git analysis.

codebase-architecture-map is a free AI agent skill on Agensi by Kannan D, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Kannan D](https://www.agensi.io/creators/kannan-d)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-16
- Security: scan passed (2026-10-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/codebase-architecture-map
- Tags: ai-agents, python, typescript, code-review, llm-ops

## About this skill

Large or unfamiliar repositories often paralyze agents with too much context and not enough structure. This skill provides a structural map of a codebase to prevent blind edits and excessive file reads. It gives you a clear understanding of tech stacks, module relationships, and the potential blast radius of your changes.

### What it does
- **Architectural mapping** Identifies core languages, frameworks, entry points, and top-level project structure.
- **Dependency analysis** Maps internal import graphs to reveal circular dependencies and central "hub" modules.
- **Risk assessment** Locates hotspots by identifying the largest, most complex, and most frequently changed files.
- **Impact analysis** Calculates the transitive blast radius before you edit a file to see what else will break.
- **Codebase orientation** Generates summaries of specific folders, classes, functions, and external requirements.

### How it works
1. **Orient** Run `architecture_overview` to identify the tech stack and entry points.
2. **Map** Execute `dependency_graph` to see how modules connect and find circular imports.
3. **Analyze** Use `hotspots` and `impact_analysis` to identify high-risk files and the ripple effects of proposed changes.
4. **Explain** Trigger `explain` on specific sub-directories to understand local implementation details before reading source code.

### Frameworks & tools
This skill requires the `mcp-architect` server. It supports full AST parsing for Python and import parsing for JavaScript and TypeScript. It provides file statistics for over 25 other languages.

### Why this beats prompting it yourself
Standard agents try to read every file to understand structure, which wastes tokens and misses hidden dependencies. This skill uses specialized local tools to build a graph of the codebase, identifying circular imports and high-risk hubs that a simple file search would overlook.

### Use cases
- Onboard onto a massive legacy codebase without reading every file manually.
- Identify circular dependencies that are causing runtime or build issues.
- Calculate the blast radius of a refactor before touching a shared utility module.
- Find tech debt by listing files with the highest complexity and change frequency.

### Known limitations
Full AST parsing is limited to Python. JavaScript and TypeScript support import parsing. Other languages return basic file and line statistics only. Complexity data requires a local git history.

## Requires

- Architect MCP
- uv (Python tool runner)

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the codebase-architecture-map skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill prevent AI agents from getting overwhelmed by large codebases?

The skill uses local AST parsing and git history to map dependencies and calculate "blast radius," preventing agents from wasting tokens on unnecessary file reads or making blind edits to high-risk modules.

### Which programming languages are supported for deep architectural analysis?

It offers full AST parsing for Python, import-level mapping for JavaScript and TypeScript, and basic file statistics for over 25 other programming languages.

### Are there any specific technical requirements or servers I need to install?

Yes, the skill requires the installation of the `mcp-architect` server to perform local analysis, ensuring your source code is processed locally before insights are sent to the agent.

### Can I use this tool to predict how a refactor will affect the rest of my project?

The 'Impact Analysis' feature calculates the transitive dependencies of a file, showing you exactly which other modules or functions might break if you modify a shared utility or core component.

### Does the risk assessment feature require a specific version control system?

The complexity and hotspot analysis features require a local git history to identify which files are changed most frequently and represent the highest technical debt.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
