codemap
Skill1 starsChanged 59 days agoMITView on GitHub
为陌生或大型代码仓库生成层级化代码地图。当需要快速了解项目结构、梳理代码架构、生成代码文档、新人 onboarding、接手旧项目、分析开源库、理解陌生 repo、查看项目目录结构、模块依赖关系、代码全景图时使用。
16 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- thistleknot/skillsedited, first seen Nov 8, 2026
- openyida/openyidatheir own version, first seen Nov 3, 2026
- hmjBill/skillstheir own version, first seen Oct 29, 2026
- jellydn/my-ai-toolstheir own version, first seen Oct 18, 2026
- mike22890/opencode-skills-enword for word, first seen Oct 15, 2026
- Asixa/codemap-skilltheir own version, first seen Oct 11, 2026
Other versions16 projects use a version of this.
Word for word · 1
- mike22890/opencode-skills-en★ 1100% same
Edited · 3
- akitaonrails/my-skills★ 28397% same
- arkan/skills★ 197% same
- thistleknot/skills★ 095% same
Wrote their own version · 12
- JordanCoin/codemap★ 710same name
- openyida/openyida★ 231same name
- jellydn/my-ai-tools★ 127same name
- ulpi-io/browse★ 15same name
- lglucas/ai-dev-operating-system★ 12same name
- Asixa/codemap-skill★ 8same name
- beadnall/codemap★ 8same name
- shalomb/agent-skills★ 3same name
- htdxd/codemap-skill★ 2same name
- camilo-acevedo/claude-skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- aestheticsSkill
- applying-ui-design-systemSkill
- avoid-ai-writingSkill
- clonedepsSkill
- code-masterySkill
- code-refactor-astSkill
- copywritingSkill
- croSkill
- db-schema-designerSkill
- frontend-designSkill
- github-workflowSkill
- git-workflowSkill
- humanize-fictionSkill
- human-voiceSkill
- life-planningSkill
- literary-craftSkill
- long-taskSkill
- marketing-psychologySkill
- masterpiece-writingSkill
- mcp-builderSkill
- mermaid-diagram-generatorSkill
- orchestrating-adversarial-reviewsSkill
- pandocSkill
- persuasion-craftSkill
- pptxSkill
- pricingSkill
- privacy-guardSkill
- product-strategySkill
- property-based-testingSkill
- psychology-masterySkill
- research-masterySkill
- self-editSkill
- shopping-advisorSkill
- simplifySkill
- skill-creatorSkill
- story-endingsSkill
- system-designSkill
- thinking-craftSkill
- wealth-masterySkill
- wisdom-philosophySkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 4 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
If it does not exist, check for legacy state at .slim/cartography.json.
- Very specific: line 29
If legacy state exists: move .slim/cartography.json to .slim/codemap.json, then continue with change detection.
- Very specific: line 31
If .slim/codemap.json exists: Skip to Step 3 (Detect Changes) - no need to re-initialize.
- Distinctive: line 33
If neither file exists: Continue to Step 2 (Initialize).
- Distinctive: line 40
Exclude (MANDATORY): Do NOT include tests, documentation, or translations.
- Very specific: line 87
Map Root Assets: Document the root-level files (e.g., package.json, index.ts, plugin.json) and the project's overall purpose.
- Very specific: line 88
Aggregate Sub-Maps: Create a "Repository Directory Map" section.
- Distinctive: line 89
Cross-Reference: Ensure that the root map contains the absolute or relative paths to the sub-maps so agents can jump directly to the …
- Very specific: line 95
If AGENTS.md already exists and already contains a ## Repository Map section, skip this step - the reference is already set up.
- Very specific: line 96
If AGENTS.md exists but has no ## Repository Map section, append the section below.
- Distinctive: line 97
If AGENTS.md doesn't exist, create it with the section below.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codemap Skill
何时触发
关键词命中即触发:代码地图/项目结构/架构/模块依赖/新人onboarding/接手/快速了解/代码全景/目录结构。
You help users understand and map repositories by creating hierarchical codemaps.
When to Use
- User asks to understand/map a repository
- User wants codebase documentation
- Starting work on an unfamiliar codebase
Workflow
Step 1: Check for Existing State
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).
Step 2: Initialize (Only if no state exists)
- Analyze the repository structure - List files, understand directories
- Infer patterns for core code/config files ONLY to include:
- Include:
src/**/*.ts,package.json, etc. - Exclude (MANDATORY): Do NOT include tests, documentation, or translations.
- Tests:
**/*.test.ts,**/*.spec.ts,tests/**,__tests__/** - Docs:
docs/**,*.md(except rootREADME.mdif needed),LICENSE - Build/Deps:
node_modules/**,dist/**,build/**,*.min.js
- Tests:
- Respect
.gitignoreautomatically
- Include:
- Run codemap.mjs init:
node ~/.config/opencode/skills/codemap/scripts/codemap.mjs init \
--root ./ \
--include "src/**/*.ts" \
--exclude "**/*.test.ts" --exclude "dist/**" --exclude "node_modules/**"This creates:
.slim/codemap.json- File and folder hashes for change detection- Empty
codemap.mdfiles in all relevant subdirectories
- Delegate codemap writing to Fixer agents - Spawn one fixer per folder to read code and create or update its specific
codemap.mdfile.
Step 3: Detect Changes (If state already exists)
- Run codemap.mjs changes to see what changed:
node ~/.config/opencode/skills/codemap/scripts/codemap.mjs changes \
--root ./- Review the output - It shows:
- Added files
- Removed files
- Modified files
- Affected folders
- Only update affected codemaps - Spawn one fixer per affected folder to update its
codemap.md. - Run update to save new state:
node ~/.config/opencode/skills/codemap/scripts/codemap.mjs update \
--root ./Step 4: Finalize Repository Atlas (Root Codemap)
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.
- Map Root Assets: Document the root-level files (e.g.,
package.json,index.ts,plugin.json) and the project's overall purpose. - 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. - 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.
Step 5: Register Codemap in AGENTS.md
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:
- If
AGENTS.mdalready exists and already contains a## Repository Mapsection, skip this step - the reference is already set up. - If
AGENTS.mdexists but has no## Repository Mapsection, append the section below. - If
AGENTS.mddoesn'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.
Codemap Content
Fixers are responsible for writing codemap.md files during this workflow. 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.
Example codemap:
# src/agents/
## Responsibility
Defines agent personalities and manages their configuration lifecycle.
## Design
Each agent is a prompt + permission set. Config system uses:
- Default prompts (orchestrator.ts, explorer.ts, etc.)
- User overrides from ~/.config/opencode/oh-my-opencode-slim.json
- Permission wildcards for skill/MCP access control
## Flow
1. Plugin loads → calls getAgentConfigs()
2. Reads user config preset
3. Merges defaults with overrides
4. Applies permission rules (wildcard expansion)
5. Returns agent configs to OpenCode
## Integration
- Consumed by: Main plugin (src/index.ts)
- Depends on: Config loader, skills registryExample 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) |Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

