بنقرة واحدة
generate-codemap
Generate comprehensive hierarchical codemaps.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate comprehensive hierarchical codemaps.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Standard workflow to implement a plan. Use only when user instructs or other skill references.
Manage interactive or persistent terminal sessions. Must use before running these sessions, like start a dev server, SSH, REPL, ...
Guidelines to help you write code smartly by using workers. Only use
Disciplined diagnosis loop for hard bugs and performance regressions. Use only when user instructs or other skill references.
Workflow to transform vague ideas into validated designs and stepped implementation plans. Use only when user instructs or other skill references.
Review a plan before implementation. Use only when user instructs or other skill references.
| name | generate-codemap |
| description | Generate comprehensive hierarchical codemaps. |
| disable-model-invocation | true |
You help users understand and map repositories by creating hierarchical codemaps.
First, check if blueprint/codemap.json exists in the repo root. If exists, skip to Step 3 (Detect Changes) - no need to re-initialize.
src/**/*.ts, package.json, etc.**/*.test.ts, **/*.spec.ts, tests/**, __tests__/**docs/**, *.md (except root README.md if needed), LICENSEnode_modules/**, dist/**, build/**, *.min.js.gitignore automaticallybun directory/of/skill/codemap.ts init \
--root ./ \
--include "src/**/*.ts" \
--exclude "**/*.test.ts" --exclude "dist/**" --exclude "node_modules/**" <all other files you must exclude>
This creates:
blueprint/codemap.json - File and folder hashes for change detectioncodemap.md files in all relevant subdirectoriescodemap.md file.bun directory/of/skill/codemap.ts changes \
--root ./
Review the output - It shows:
Only update affected codemaps - Spawn one worker agent per affected folder to update its codemap.md. You must:
You are responsible for writing `codemap.md` file in directory `<placeholder directory>`. You must create `codemap.md` if missing, overwrite if existing, create if missing. Explore the code and related integrations. Use precise technical terminology to document the implementation:
- **Responsibility** - Define the specific role of this directory using standard software engineering terms (e.g., "Service Layer", "Data Access Object", "Middleware").
- **Design Patterns** - Identify and name specific patterns used (e.g., "Observer", "Singleton", "Factory", "Strategy"). Detail the abstractions and interfaces.
- **Data & Control Flow** - Explicitly trace how data enters and leaves the module. Mention specific function call sequences and state transitions.
- **Integration Points** - List dependencies and consumer modules. Use technical names for hooks, events, or API endpoints.
bun directory/of/skill/codemap.ts update \
--root ./
Once all specific directories are mapped, the you must create or update the root codemap.md. This file serves as the Master Entry Point for any agent or human entering the repository.
package.json, index.ts, plugin.json) and the project's overall purpose.codemap.md, extract its Responsibility summary and include it in a table or list in the root map.Example Root Codemap (Atlas):
# Repository Atlas: oh-my-opencode-slim
## Project Responsibility
A high-performance, low-latency agent orchestration plugin for OpenCode, focusing on specialized sub-agent delegation and multiplexer-assisted child sessions.
## System Entry Points
- `src/index.ts`: Plugin initialization and OpenCode integration.
- `package.json`: Dependency manifest and build scripts.
- `oh-my-opencode-slim.json`: User configuration schema.
## Directory Map (Aggregated)
| Directory | Responsibility Summary | Detailed Map |
| --------------- | --------------------------------------------------------------------------------- | ----------------------------------- |
| `src/agents/` | Defines agent personalities (Orchestrator, Explorer) and manages model routing. | [View Map](src/agents/codemap.md) |
| `src/features/` | Core logic for tmux integration and session state. | [View Map](src/features/codemap.md) |
| `src/config/` | Implements the configuration loading pipeline and environment variable injection. | [View Map](src/config/codemap.md) |
To ensure agents automatically discover and use the codemap, update (or create) AGENTS.md at the repo root:
AGENTS.md already exists and already contains a ## Repository Map section, skip this step — the reference is already set up.AGENTS.md exists but has no ## Repository Map section, append the section below.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 the project. 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.