bootstrap-agent-config — скилл для Claude Code
Скилл обходит проект, находит стек и команды сборки, а потом пишет CLAUDE.md и AGENTS.md с правилами, взятыми из кода.
npx skills add dshakes/compass --skill bootstrap-agent-config -a claude-codeЧто делает bootstrap-agent-config
Сначала скилл запускает вспомогательный скрипт detect-stack.sh, который собирает инвентарь: языки, пакетные менеджеры, команды сборки, тестов и линтера, раскладку монорепозитория, наличие ADR и CI. Полученному он не верит на слово — открывает Makefile, package.json или justfile и пару исходников, чтобы проверить команды и подсмотреть настоящие соглашения: обработку ошибок, стиль тестов, именование.
Дальше самое ценное. Скилл ищет инварианты — правила, нарушение которых приводит к инцидентам: границы тенантов, доверенные зоны, сгенерированные файлы, которые нельзя править руками. Источники — ADR, ARCHITECTURE.md, SECURITY.md, разделы README про подводные камни. Если архитектура непонятна, скилл спрашивает.
CLAUDE.md собирается по скелету из шаблона и заполняется только проверенным. AGENTS.md получается симлинком на CLAUDE.md, чтобы была одна версия правды; исключение — если в репозитории уже есть свой расходящийся AGENTS.md. В конце скилл перечисляет записанные файлы и три главных инварианта, чтобы вы поправили догадки. Догадку он помечает (verify) — без проверки человеком такой пункт в конфиг не идёт. Нужен bash и доступ к репозиторию.
Какие задачи решает
- написать стартовый
CLAUDE.mdдля проекта без конфига агента - вытащить из репозитория точные команды сборки и тестов
- собрать список правил, нарушение которых ломает прод
- свести
CLAUDE.mdиAGENTS.mdк одному источнику правды - подключить новый проект к Codex и другим агентам, читающим
AGENTS.md
Примеры запросов агенту
- Разбери репозиторий и подготовь для него конфиг агента.
- Прогони инициализацию конфига по каталогу пакета
./services/auth. - Напиши
CLAUDE.mdдля этого проекта и сделайAGENTS.mdссылкой на него.
Как установить bootstrap-agent-config
1Через Skills CLI (Vercel)
npx skills add dshakes/compass --skill bootstrap-agent-config -a claude-code2Вручную: положить файлы
~/.claude/skills/bootstrap-agent-config/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/bootstrap-agent-config/
1Через Skills CLI (Vercel)
npx skills add dshakes/compass --skill bootstrap-agent-config -a codex2Вручную: положить файлы
.agents/skills/bootstrap-agent-config/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dshakes/compass --skill bootstrap-agent-config -a cursor2Вручную: положить файлы
.cursor/skills/bootstrap-agent-config/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dshakes/compass bootstrap-agent-config2Вручную: положить файлы
.github/skills/bootstrap-agent-config/SKILL.md1Через Skills CLI (Vercel)
npx skills add dshakes/compass --skill bootstrap-agent-config -a gemini-cli2Командой платформы
gemini skills install https://github.com/dshakes/compass --path claude/skills/bootstrap-agent-configВручную: положить файлы
.devin/skills/bootstrap-agent-config/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dshakes/compass --skill bootstrap-agent-config -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о bootstrap-agent-config
Как установить bootstrap-agent-config в Claude Code?
Выполните npx skills add dshakes/compass --skill bootstrap-agent-config -a claude-code. Файл скилла появится по пути ~/.claude/skills/bootstrap-agent-config/SKILL.md.
Что делает bootstrap-agent-config?
Инспектирует репозиторий, определяет стек и команды, затем черновик CLAUDE.md и AGENTS.md с правилами, подтверждёнными кодом.
Что нужно, чтобы скилл отработал?
bash для detect-stack.sh и сам репозиторий под рукой. Скилл читает Makefile, package.json, ADR и исходники, поэтому запускать его лучше в корне проекта.
Исходный текст
SKILL.md · MIT
---
name: bootstrap-agent-config
description: Generate a high-quality project CLAUDE.md and AGENTS.md by inspecting the current repository. Use when a repo has no agent config, when onboarding a new project, or when the user asks to "set up Claude/Codex for this repo" or "write a CLAUDE.md". Detects languages, build/test commands, and structure, then drafts config grounded in what's actually there.
argument-hint: "[optional path, default: current repo]"
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
---
# Bootstrap agent config for a repository
Produce a `CLAUDE.md` and a symlinked/parallel `AGENTS.md` that are *grounded in
the real repo*, not generic boilerplate. A good config is the single highest-ROI
thing for agent productivity in a codebase — it pays for itself on the first task.
## Steps
1. **Detect the stack.** Run the helper to get a fast inventory:
```
bash "${CLAUDE_SKILL_DIR}/detect-stack.sh" .
```
It reports languages, package managers, build/test/lint commands, monorepo
layout, and whether ADRs/CI exist.
2. **Verify, don't trust.** Confirm the detected build/test commands actually exist
(read the Makefile / package.json / justfile). Read 2–3 representative source
files to learn the real conventions (error handling, test style, naming).
3. **Find the invariants.** The most valuable part of a `CLAUDE.md` is the
*load-bearing rules* — the things that cause incidents if violated. Look for
them in: existing ADRs, `ARCHITECTURE.md`, `SECURITY.md`, README "gotchas", and
patterns the code enforces (e.g. tenant scoping, a trust boundary, a generated
file you must not hand-edit). Ask the user if the architecture isn't legible.
4. **Draft `CLAUDE.md`** using the structure in
`${CLAUDE_SKILL_DIR}/../../../templates/CLAUDE.md.tmpl` as a skeleton. Fill every
placeholder with real, verified content. Sections that matter most:
- One-sentence "what this is"
- Languages and *exact* build/test/lint commands (copy-pasteable)
- Repo layout (only the parts an agent needs)
- **Load-bearing invariants** — the "what NOT to do" list
- How to run/verify locally
Cut anything you can't ground in the actual repo. Short and true beats long and
aspirational.
5. **Make `AGENTS.md` track it.** Most non-Claude tools (Codex, etc.) read
`AGENTS.md`. Either symlink it (`ln -s CLAUDE.md AGENTS.md`) so there's one
source of truth, or write a thin `AGENTS.md` that says "see CLAUDE.md". Prefer
the symlink unless the repo already has a divergent `AGENTS.md`.
6. **Report** the files written and the top 3 invariants you encoded, so the user
can correct anything you inferred.
## Quality bar
- Every command in the file runs. Every path exists. Every invariant is real.
- No "best practices" filler that isn't specific to this repo.
- If you had to guess at an invariant, mark it `(verify)` so the user checks it.
© dshakes · MIT · dshakes/compass