ai-estimates
Use when estimating how long a task will take: coding, writing, research, analysis, design, data work, or anything else AI can…
Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping
Claude Code
$ npx -y skills add alvinunreal/oh-my-opencode-slim --skill codemap --agent claude-code
Codex
$ npx skills add alvinunreal/oh-my-opencode-slim --skill codemap -a codex -y
Cursor
$ npx skills add alvinunreal/oh-my-opencode-slim --skill codemap -a cursor -y
Gemini CLI
$ npx skills add alvinunreal/oh-my-opencode-slim --skill codemap -a gemini-cli -y
GitHub Copilot
$ npx skills add alvinunreal/oh-my-opencode-slim --skill codemap -a github-copilot -y
OpenCode
$ npx skills add alvinunreal/oh-my-opencode-slim --skill codemap -a opencode -y
Windsurf
$ npx skills add alvinunreal/oh-my-opencode-slim --skill codemap -a windsurf -y
name: codemap description: Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping
You help users understand and map repositories by creating hierarchical codemaps.
**First, check if `.slim/codemap.json` exists in the repo root.**
If it does not exist, check for legacy state at `.slim/cartography.json`.
If legacy state exists: move `.slim/cartography.json` to `.slim/codemap.json`, then continue with change detection.
If `.slim/codemap.json` exists: Skip to Step 3 (Detect Changes) - no need to re-initialize.
If neither file exists: Continue to Step 2 (Initialize).
1. **Analyze the repository structure** - List files, understand directories 2. **Infer patterns** for **core code/config files ONLY** to include:
3. **Run codemap.mjs init** (`scripts/codemap.mjs` is relative to this skill's base directory — the host prints it as `Base directory for this skill`):
node scripts/codemap.mjs init \ --root ./ \ --include "src/**/*.ts" \ --exclude "**/*.test.ts" --exclude "dist/**" --exclude "node_modules/**"
This creates:
4. **Delegate codemap writing to Fixer agents** - Spawn one fixer per folder to read code and create or update its specific `codemap.md` file.
1. **Run codemap.mjs changes** to see what changed:
node scripts/codemap.mjs changes \ --root ./
2. **Review the output** - It shows:
3. **Only update affected codemaps** - Spawn one fixer per affected folder to update its `codemap.md`. 4. **Run update** to save new state:
node scripts/codemap.mjs update \ --root ./
Once all specific directories are mapped, the Orchestrator must create or update the root `codemap.md`. This file serves as the **Master Entry Point** for any agent or human entering the repository.
1. **Map Root Assets**: Document the root-level files (e.g., `package.json`, `index.ts`, `plugin.json`) and the project's overall purpose. 2. **Aggregate Sub-Maps**: Create a "Repository Directory Map" section. For every folder that has a `codemap.md`, extract its **Responsibility** summary and include it in a table or list in the root map. 3. **Cross-Reference**: Ensure that the root map contains the absolute or relative paths to the sub-maps so agents can jump directly to the relevant details.
**OpenCode auto-loads `AGENTS.md` into agent context on every session.** To ensure agents automatically discover and use the codemap, update (or create) `AGENTS.md` at the repo root:
1. If `AGENTS.md` already exists and already contains a `## Repository Map` section, **skip this step** - the reference is already set up. 2. If `AGENTS.md` exists but has no `## Repository Map` section, **append** the section below. 3. If `AGENTS.md` doesn't exist, **create** it with the section below.
## Repository Map A full codemap is available at `codemap.md` in the project root. Before working on any task, read `codemap.md` to understand: - Project architecture and entry points - Directory responsibilities and design patterns - Data flow and integration points between modules For deep work on a specific folder, also read that folder's `codemap.md`.
This is idempotent - repeated codemap runs will detect the existing section and skip. No duplication.
Fixers are responsible for writing `codemap.md` files during this workflow. Use precise technical terminology to document the implementation:
Example skeleton:
# src/<dir>/ ## Responsibility <role of this directory> ## Design <patterns and abstractions> ## Flow <data in → key calls → data out> ## Integration <consumers / dependencies>
For root atlas, aggregate the same headings plus a Directory Map table:
| Directory | Responsibility | Link | |-----------|----------------|------| | `src/<dir>/` | <one-line summary> | [View Map](src/<dir>/codemap.md) |
Lean, fine tuned Opencode multi agent suite · Mix any models · Auto delegate tasks
Use when estimating how long a task will take: coding, writing, research, analysis, design, data work, or anything else AI can…
Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use…
Use when a request includes examples, samples, templates, or reference outputs. Treat them as evidence of intent, not as…
High-cost orchestrator workflow for large, high-risk, multi-phase coding efforts with meaningful dependencies and review gates.…
Configure and improve oh-my-opencode-slim for the current user. Use when users want to tune agents, models, prompts, custom…
Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks.…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration