Skip to content
Back to skills

Codebase Mapping

ASecurity

Map architecture, conventions, and file structure into `~/.fd-plan/<slug>/.codebase/`. Use when onboarding or before deep feature work.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 9, 2026
ai-agentsgoapidatabasedocumentation

Works with

  • api

Security analysis

A100/100

Scanned October 9, 2026

npx -y skills add alisattorov06/ali-kiro --skill codebase-mapping --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codebase Mapping?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codebase Mapping
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alisattorov06-codebase-mapping/badge)](https://www.skillsdirectory.com/skills/alisattorov06-codebase-mapping)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codebase-mapping
description: Map architecture, conventions, and file structure into `~/.fd-plan/<slug>/.codebase/`. Use when onboarding or before deep feature work.
origin: FlowDeck
---

# Codebase Mapping Skill

Produces structured documentation of a codebase that agents can read to answer "how does this project work?" without re-scanning every time.

## When to Activate

- Starting work on an unfamiliar codebase
- Before a major feature that spans multiple modules
- When `/fd-task` runs its init step for an unmapped project
- When `~/.fd-plan/<slug>/.codebase/` is missing or stale

## Output Files

All outputs go to `~/.fd-plan/<slug>/.codebase/`:

| File | Contents |
|------|----------|
| `ARCHITECTURE.md` | System design: layers, modules, data flow |
| `CONVENTIONS.md` | Naming, style, patterns specific to this project |
| `DEPENDENCIES.md` | Key external packages and what they do |
| `INDEX.md` | File-by-file inventory |
| `ENTRY_POINTS.md` | How the application starts and key entry files |

## Mapping Sequence

### Step 1: Start from the outside

Read in this order:
1. `package.json` / `pyproject.toml` / `Cargo.toml` — dependencies, scripts, metadata
2. `README.md` — stated purpose and architecture
3. Entry point files (main, index, app, server)
4. Configuration files (env examples, config schemas)

### Step 2: Map the directory structure

Document each top-level directory's purpose:
```
src/
  api/          — HTTP route handlers
  services/     — Business logic
  models/       — Database schemas and queries
  utils/        — Shared helpers
tests/          — Test files (mirror of src/)
scripts/        — Build and deployment scripts
```

Do not guess. Read the files to confirm what each directory contains.

### Step 3: Document key conventions

Find examples in the code:
- How are errors handled? (throw? return Result? error callback?)
- How are modules exported? (default export? named exports?)
- What is the naming pattern for files? (`UserService.ts`? `user-service.ts`?)
- Where do interfaces/types live?
- How is dependency injection done?

Write 1-2 examples for each pattern, not a generic description.

### Step 4: Document entry points

```markdown
## Entry Points

- `src/index.ts` — Application bootstrap, registers routes and middleware
- `src/workers/queue.ts` — Background job processor, runs independently
- `scripts/migrate.ts` — Database migration runner
```

### Step 5: List key dependencies

For each significant dependency, document:
- What it is used for in this project
- Where in the codebase it is used
- Version (note if pinned due to known issues)

## Accuracy rules

- Only document what you have read — never document by assumption
- If a file's purpose is unclear, note "purpose unclear — investigate before modifying"
- Timestamp the mapping: `Last updated: [date]`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.