# Map your code with Claude

> Have Claude read a codebase on your computer and write an outline of it, then import the outline and Flozu draws the map.

Claude can read a codebase on your computer and map it for you: the services, workers, databases and outside services it uses, what calls what, and where each part runs. Claude writes a short **outline**, and Flozu lays it out as a map when you import it.

Your code stays on your computer. Claude reads it where it is, and the outline holds only names, folders and short descriptions. You don’t need an account or a connection to GitHub.

![A map drawn from an outline: shoppers and the shop website on the left, then an AWS region zone holding an Orders system zone with a large Orders API, a cart cache and the Orders DB, then an Order events topic and a packing worker, and Stripe on the right. The order path runs straight and blue from the shoppers to the Orders API, the lines to Stripe and the order events run along a gap under the Orders DB, and every line shows its traffic.](https://docs.flozu.app/_astro/outline-map-light.Ddae9mOQ_2jYYfH.webp)

## Map a repository

1. Open [Claude Code](https://claude.com/claude-code), or another coding assistant, in the repository you want to map.

2. Give it the guide: [map-your-code.md](https://docs.flozu.app/map-your-code.md). Paste the guide’s link into your request, or save the file in the repository as `.claude/skills/map-to-flozu/SKILL.md`, so Claude Code uses it whenever you ask for a map.

3. Ask for the map, and say what you want to see. For example:

   ```text
   Follow the map-your-code guide to map this repository for Flozu.
   Show the services, what they talk to, and where they run.
   Save it as architecture.flozu-outline.json.
   ```

4. Open Flozu’s home, or the project you want the map in on the Maps page, and choose **Import**, or drop the file on the page. The map comes in drawn, ready to open.

Flozu places everything itself: traffic reads from left to right, each zone is a box around what’s in it, and lines run straight along gaps between the cards rather than behind them. Move things around as you like after that, and change anything Claude chose.

## What Claude puts on the map

The guide tells Claude how to turn code into parts, lines and zones:

- **Parts** are what runs and what it uses: services, workers, functions, scheduled jobs, apps, databases, queues, caches, storage, and outside services such as Stripe, marked as run by another company. For a single app, its modules are the parts. For a database, its tables are.
- **Lines** go from what calls, sends or depends to what it reaches. Each is a request, a message or a dependency, with a label and a protocol when the code says.
- **Zones** group parts by system, cloud region, network or team.

Claude can set everything you can in the editor, and the guide tells it how to make the map read well:

- **How it looks:** the parts the map is about are bigger, supporting parts such as caches and outside services are [slim](https://docs.flozu.app/guides/looks.md#card-layouts), each part shows a [drawing](https://docs.flozu.app/guides/looks.md#drawings) that says what it does, and [colour](https://docs.flozu.app/guides/looks.md#colours-and-styles) has one meaning, such as the main path.
- **Lines** carry their own [style](https://docs.flozu.app/guides/lines.md): the main path bold, and square or curved routes across the map.
- **Traffic:** how many people use it, a rate on each line and limits on the parts that can run out, from the code and its settings where they’re there. Claude marks the numbers it estimated and tells you which they are. See [traffic and limits](https://docs.flozu.app/guides/traffic-and-limits.md).
- **Its story:** a [story](https://docs.flozu.app/guides/stories.md) along the main journey, [scenarios](https://docs.flozu.app/guides/scenarios.md) for a normal day and a busy one, a [view](https://docs.flozu.app/concepts/views.md) in plain words for people who don’t build it, and a note or two.

Claude also notes where each part lives in the code, which you can see under **Code** in the part’s details. It aims for 8 to 40 parts a map. For a large system, ask for one map of the whole first, then a map of each big service, and link them with [maps inside parts](https://docs.flozu.app/guides/maps-inside-parts.md).

## When an outline can’t be drawn

If something in the file doesn’t fit, such as a line to a part that isn’t in it, Flozu says what’s wrong and where, and imports nothing from that file. Paste the message back to Claude and ask it to fix the outline.

> **Caution**
>
> The outline should hold names, folders and descriptions only. The guide tells Claude to leave out secrets, keys and personal data, but look over the file before you share it.

To write or change an outline yourself, see [Outlines](https://docs.flozu.app/reference/file-format.md#outlines) in the file format.

## Straight into your account

With a Flozu account, you don’t need the file. [Connect your assistant](https://docs.flozu.app/guides/connect-an-assistant.md) to Flozu, then sign in to Flozu and allow it when it asks. The page that asks shows what the assistant will be able to do, and that your repository’s code never leaves your computer. After that, it can see your workspaces and maps, draw new maps of your code in any project, and suggest changes. Every change it makes to a map, including mapping it again, comes in as a proposal for you to adopt. If you ask it to change a map itself, Flozu keeps a version of the map first, so you can always go back. Your code still stays on your computer: only the maps come to Flozu.

> **Note**
>
> Accounts are invite-only while Flozu is in beta. Without one, map your code into a file and import it, as above.

### Several repositories in one project

When a product lives in several repositories, ask Claude to map each one into the same [project](https://docs.flozu.app/guides/your-maps.md), then draw an overview: a part for each repository, the people who use them and what they share, with each part opening that repository’s own map. Open a part on the overview and you’re in its map.

### Mapping a repository again

Code changes, so ask Claude to map a repository again whenever it has. Claude looks for the map it made before and keeps its parts’ names, so what’s still there changes where it is. Everything you did to the map stays: where you moved things, the colours and drawings you chose, and your notes, views, scenarios and stories. New parts go beside what they link to, and parts the code no longer has are taken away.

It never changes your map by itself. The new map arrives as a [proposal](https://docs.flozu.app/guides/versions-and-proposals.md): compare it with your map, then adopt it or let it go.

### Finding what breaks

Claude can also test a map. Ask it what happens on your map in a [scenario](https://docs.flozu.app/guides/scenarios.md), one you saved or a ready-made one such as Black Friday or Region down, and it plays the scenario as the scenario panel does: what fails where traffic starts, which parts run short of room, the moments worth knowing and what to change. Ask it to fix what it finds and it suggests the fix as a proposal, then plays the scenario on the proposal and on your map to say whether the fix works. Playing a scenario saves nothing.
