codemap
Что он делает
Этот скилл строит иерархическую карту незнакомого репозитория с кодом, охватывая его основные файлы и структуру. Он нужен разработчикам, которые начинают работать с незнакомой кодовой базой.
Когда использовать
- ✓Когда вы начинаете работать с незнакомой кодовой базой и нужен обзор.
- ✓Когда кто-то просит документацию или карту структуры репозитория.
- ✓Когда вы хотите найти основной код, пропустив тесты, документацию и сгенерированные файлы.
Ссылка на скилл
https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/codemap/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Сделай карту этого репозитория, чтобы я видел, где находится основной код, прежде чем начну что-то менять.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл смотрит структуру папок, выделяет основной код и файлы конфигурации и записывает их в файл карты. При последующих запусках он проверяет только то, что изменилось.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Codemap Skill
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 (
scripts/codemap.mjsis relative to this skill's base directory — the host prints it asBase directory for this skill):
node 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 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 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 Pat
Частые вопросы
Включает ли карта тесты и документацию?
Нет. Скилл настроен так, чтобы исключать из основной карты тесты, документацию и результаты сборки.
Это быстрая задача?
Нет. Скилл описан как дорогая операция, поэтому его предназначено запускать для первого составления карты репозитория.
Где сохраняется карта?
В файле codemap внутри папки .slim проекта.
Подробности
Оригинальное описание автора
Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping
Популярность
- Звёзды на GitHub
- 10k
- Место в рейтинге
- #12012
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
cli-review
10kПозволяет агенту запустить код-ревью Greptile для текущей ветки перед открытием запроса на слияние, а затем кратко описать результаты простыми словами.
ai-estimates
10kПомогает агенту оценить, сколько времени займет работа, которую человек выполняет с помощью ИИ, разделяя быструю работу ИИ и задержки людей или внешних сторон.
clonedeps
10kПозволяет агенту скопировать исходный код ключевых зависимостей проекта в локальную папку, чтобы он мог читать, как эти библиотеки устроены внутри.
deanchor
10kПомогает агенту учиться на примерах, не копируя их: находить общий принцип, стоящий за ними, и писать новое, что следует этому принципу.
Похожие скиллы
diffs
394kПозволяет агенту создать настоящее сравнение правок в виде ссылки или файла изображения, которым можно поделиться, вместо ручной сводки.
coding-agent
394kПомогает агенту передать большую задачу по коду в Codex, Claude Code или OpenCode как фоновому исполнителю, а затем проверять ее ход.
gh-issues
394kПомогает агенту находить задачи GitHub, выбирать, над какими работать, и открывать запросы на слияние с исправлениями, включая ответы на комментарии рецензентов.