# Codemap

> Analyze codebase structure, dependencies, changes, and multi-agent handoffs using codemap. Use this skill as the primary entry point when a task requires understanding project architecture, mapping dependencies, tracing logic, or generating cross-agent handoff artifacts. Always trigger this first when exploring unfamiliar code or when codemap output indicates noisy configurations.

- **Type:** Skill
- **Install:** `agentstack add skill-shalomb-agent-skills-codemap`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [shalomb](https://agentstack.voostack.com/s/shalomb)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [shalomb](https://github.com/shalomb)
- **Source:** https://github.com/shalomb/agent-skills/tree/main/skills/codemap

## Install

```sh
agentstack add skill-shalomb-agent-skills-codemap
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Codemap

Gives instant architectural context: project tree, dependency flow, hub detection, diff, intent classification, and multi-agent handoff.

## Commands

```bash
codemap .                       # Project tree with file counts and top files
codemap --deps .                # Dependency flow + hub files (requires ast-grep)
codemap --diff                  # Changes vs main branch
codemap --diff --ref    # Changes vs specific branch
codemap --importers       # Who imports this file? Is it a hub?
codemap handoff .               # Build + save cross-agent handoff artifact
codemap handoff --latest .      # Read latest saved handoff
codemap skill list              # Show available skills
codemap skill show        # Load full skill instructions
codemap config show             # Show current project config
codemap context --compact       # Minimal JSON context envelope
```

## First-Use Setup

Before deeper analysis in a new repo:
1. Run `codemap .` — if output is noisy or config is missing, run `codemap skill show config-setup` first
2. Run `codemap --deps .` — dependency graph and hub files
3. Config is repo memory: once tuned, all future calls benefit automatically

## When to use

| Situation | Command |
|---|---|
| Starting any task | `codemap .` |
| "Where is X?" / "What uses Y?" | `codemap --deps .` |
| About to edit a file | `codemap --importers ` |
| "What changed?" / before committing | `codemap --diff` |
| Switching agents / resuming work | `codemap handoff .` |
| Config missing or output noisy | `codemap skill show config-setup` |
| Risk warning in hook output | `codemap skill show ` |

## Hook output

The `prompt-submit` hook fires on every message and emits:

```

Skills matched: hub-safety, explore — run `codemap skill show ` for guidance
```

Skills are pull-based — names are surfaced automatically, full body loaded only when needed.

## Builtin skills

| Skill | When to load |
|---|---|
| `config-setup` | Config missing, boilerplate, or output noisy |
| `hub-safety` | Editing a file with 3+ importers |
| `explore` | Understanding how code works |
| `handoff` | Switching between agents |

## Reference

For MCP tools and HTTP API endpoints, load `references/codemap-api.md`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [shalomb](https://github.com/shalomb)
- **Source:** [shalomb/agent-skills](https://github.com/shalomb/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-shalomb-agent-skills-codemap
- Seller: https://agentstack.voostack.com/s/shalomb
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
