# Code Map: One-Page HTML Architecture Diagram

> Turns any code folder, repository or public website into one HTML code map: layers, boxes, arrows and numbered flow steps, with pan, zoom, on-canvas edit and PNG/PDF export. Builds every drill-down level and checks overlaps at 1440px and 390px before it calls the map done.

Code Map: One-Page HTML Architecture Diagram is a free AI agent skill on Agensi by Sangwoo Park, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Sangwoo Park](https://www.agensi.io/creators/creator-1514)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/code-map-one-page-html-architecture-diagram
- Tags: ai-agents, documentation, code-review, javascript, python, architecture-diagram

## About this skill

Onboarding a new teammate onto an unfamiliar repository, or explaining a running service to someone outside engineering, usually ends in a hand-drawn diagram that is out of date the next week. This skill draws the map from the code itself and keeps checking it until it is readable.

### What it does
- **Code map for a folder or a repository** — one self-contained HTML file that shows where the code is made, where it goes and how it runs: a horizontal band for each place (developer machine, internet, user device), boxes for modules and services, arrows for calls and data, and up to six numbered steps that trace one request end to end.
- **Screen-flow map for a website** — the public pages of a site and how they link to each other, with login walls marked as "login required" instead of guessed through.
- **Drill-down** — a box too big to read becomes its own map inside the same file: a detail view, or an automatic file graph built from the code's own imports (JS, TS, Python).
- **Review notes** — a box where the code has a likely bug, a cheap fix or a slow spot carries a short note with the file path as evidence, marked as an AI opinion.
- **A map you can actually use** — pan, zoom, presentation view, on-canvas annotation and editing, PNG/PDF export. One file, double-click, no server and no agent needed to view it, so it survives being mailed to a colleague who has none of this installed.
### How it works

1. The agent reads only what it needs: README and dependency files, entry points, build and deploy config, and where data is stored. `.env` files are read by name only, never by value.
2. It writes the bands, boxes, arrows and steps as a small JSON file, following the schema in `reference/schema.md`; three worked examples ship in `examples/`, including the map of this tool itself.
3. `build.mjs` turns that JSON into the HTML file with the bundled engine.
4. `check.mjs` opens the result in headless Chrome at 1440 px and 390 px, at every drill level, and reports overlapping labels, labels crossing arrows, arrows crossing each other, text overflow and horizontal scroll. Build, check, fix, repeat until the check passes.
5. `graph.mjs` extracts the import graph of a folder and lays it out automatically, already flagging loops, large files, hub files and files nothing uses.
### What makes it different

- The package brings its own layout engine and validator, so the diagram is laid out and checked rather than just generated: if labels overlap, the check fails and the agent fixes the coordinates.
- Nothing to install and no build step of your own — the engine is plain files shipped in the package.
- The result is a readable document, not a source file: a colleague without an agent, a Node install or a browser extension opens it by double-clicking.

### Where it stops
- **Diagram text is written in Korean.** The instructions tell the agent to label boxes, steps and notes in plain Korean, so the map reads natively for a Korean-speaking team; it does not turn an English codebase into English labels.
- It draws at most 20 boxes per level and groups the rest, so a very large system arrives as an overview plus drill-downs rather than one giant sheet.
- Anything the agent could not confirm from the code — deployment configured outside the repo, screens behind a login — is marked as a guess rather than presented as fact.
- It reads the target project and never writes to it.
- The overlap check needs Chrome, Chromium or Edge. Without one it says it could not check, rather than passing silently.
- The scripts expect the package files to stay together in one folder: `build.mjs`, `check.mjs` and `graph.mjs` next to `engine/`, `lib/`, `checks/`, `reference/` and `examples/`.

### Requirements
Node.js 20 or newer. Chrome, Chromium or Edge for the overlap check only.

### Licence

Apache-2.0. `LICENSE` and `NOTICE` are included in the package. Original work by Sangwoo Park. Source: GitHub repository woowa0913/codemap

## Requires

- Node.js
- Git
- Chrome
- Chromium or Microsoft Edge

The overlap check needs Chrome, Chromium or Edge. Without one the skill reports that it could not check, rather than passing silently. Diagram labels are written in Korean.

## Known limitations

Requires Node.js 20+. Layout validation needs Chrome/Edge. File-level graphing limited to JS, TS, and Python. Does not bypass logins or submit forms during web crawls.

## 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 Code Map: One-Page HTML Architecture Diagram 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 Code Map differ from standard Mermaid or PlantUML diagrams generated by LLMs?

Unlike static text-based charts, Code Map produces a portable HTML file with an interactive UI, allowing you to click through folders and drill down into specific file dependencies without cluttering the view.

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

The skill currently supports deep dependency mapping for JavaScript, TypeScript, and Python, though it can generate folder-level visual structures for any project type.

### What are the technical requirements to run the layout validation feature?

You will need Node.js 20 or higher and a local installation of Chrome, Chromium, or Edge, which the skill uses to validate that diagram layouts are readable and overlap-free.

### Can I share the generated diagrams with teammates who don't have this AI skill?

Yes, because the output is a standalone HTML file, you can easily share the architecture maps with team members, embed them in internal documentation, or use them during stakeholder presentations.

### How does the web flow mapping feature handle live websites?

It does not crawl the site. Your agent opens up to 15 public pages with its own browser tool and maps how they link to each other. It never signs in, and anything behind a login is drawn as "login required" rather than guessed.

---

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.
