openspec-bootstrap — скилл для Claude Code: настройка OpenSpec
Скилл openspec-bootstrap настраивает OpenSpec в репозитории: создаёт схему, конфигурацию и проверяет их. Нужен при первом запуске или изменении openspec/config.yaml.
Apache-2.0 ★ 173 обновлён 2026-10-30
npx skills add sammcj/agentic-coding --skill openspec-bootstrap -a claude-codeЧто делает openspec-bootstrap
Скилл проводит настройку OpenSpec по шагам. Он проверяет наличие openspec/, при необходимости запускает openspec init --tools <the agents this repo uses>, изучает документацию проекта и переносит схему lean в openspec/schemas/lean/. Затем создаёт или обновляет openspec/config.yaml.
После заполнения конфигурации скилл проверяет шаблоны, валидирует схему командой openspec schema validate lean и разбирает YAML через Python. Правила должны описывать контекст проекта, а не внутренние детали реализации. Если конфигурация уже содержит реальные правила, её нужно объединить с шаблоном, сохранив эти факты. Удалённые незаполненные места он предлагает оформить вопросами, а не угадывает значения.
Какие задачи решает
- настроить OpenSpec в новом репозитории
- создать схему
openspec/schemas/lean/ - заполнить
openspec/config.yamlпо документации проекта - проверить конфигурацию и YAML
- найти незаполненные шаблоны
Примеры запросов агенту
- Настрой OpenSpec в этом репозитории с помощью
openspec-bootstrap. - Проверь существующий
openspec/config.yaml, объедини реальные правила с шаблоном и провалидируй схемуlean. - Подготовь OpenSpec с нуля: изучи
README,CLAUDE.mdиAGENTS.md, затем проверь YAML.
Как установить openspec-bootstrap
1Через Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill openspec-bootstrap -a claude-code2Вручную: положить файлы
~/.claude/skills/openspec-bootstrap/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/openspec-bootstrap/
1Через Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill openspec-bootstrap -a codex2Вручную: положить файлы
.agents/skills/openspec-bootstrap/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill openspec-bootstrap -a cursor2Вручную: положить файлы
.cursor/skills/openspec-bootstrap/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install sammcj/agentic-coding Skills/openspec-bootstrap/SKILL.md2Вручную: положить файлы
.github/skills/openspec-bootstrap/SKILL.md1Через Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill openspec-bootstrap -a gemini-cli2Командой платформы
gemini skills install https://github.com/sammcj/agentic-coding --path Skills/openspec-bootstrapВручную: положить файлы
.devin/skills/openspec-bootstrap/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об openspec-bootstrap
Как установить openspec-bootstrap в Claude Code?
Выполните npx skills add sammcj/agentic-coding --skill openspec-bootstrap -a claude-code, затем используйте файл ~/.claude/skills/openspec-bootstrap/SKILL.md.
Что делает openspec-bootstrap?
Скилл подготавливает OpenSpec в репозитории: создаёт или обновляет схему и openspec/config.yaml, проверяет их и выделяет незаполненные места для вопросов.
Что будет с уже существующим openspec/config.yaml?
Конфигурацию с реальными правилами нужно объединить с шаблоном. Репозиторные факты сохраняются, а правила, которые предписывают детали внутреннего кода, удаляются.
Исходный текст
SKILL.md · Apache-2.0
---
name: openspec-bootstrap
description: Use when setting up OpenSpec in a repo for the first time, or editing a repo's `openspec/config.yaml` or project schema
metadata:
version: 2026-10-30
---
The config steers every artifact agents write later. Its main job is keeping a change's artifacts at the outcome level. Artifacts that prescribe implementation detail go stale as soon as the implementation drifts, and agents then spend effort resyncing them. The template's `context` states that principle, with contracts as the one exception.
## Workflow
1. Create a task per step below, phrased with its completion criterion, then work them to completion.
2. If `openspec/` is missing, run `openspec init --tools <the agents this repo uses>`. Done when `openspec/config.yaml` exists.
3. Read the README, CLAUDE.md/AGENTS.md, the build entrypoint (Makefile or similar) and any planning or decision docs. Done when you can name what the project is, its hard constraints and where decisions live.
4. Copy `assets/schemas/lean/` from this skill's directory to the project as `openspec/schemas/lean/`. It is `spec-driven` trimmed to outcome-level sections, with each fact held in one artifact. Done when `openspec schema validate lean` passes.
5. Copy `assets/config.yaml` from this skill's directory to the project as `openspec/config.yaml`, then fill it in.
- Keep it short. Include only what agents must take into account when working with OpenSpec in this project.
- Add a repo-specific rule only when the repo's docs show it needs one.
- If a config with real content already exists, merge into it instead: keep its repo-specific facts and replace rules that prescribe internal code.
- Delete any placeholder line you can't fill and note it for step 8.
- Done when `rg -n '<[^>]+>' openspec/config.yaml` finds nothing.
6. Check every rule you wrote against the template's `context` and the `lean` schema's instructions. Remove any rule that tells future agents to prescribe implementation detail, restates a schema instruction, or adds a section to every change.
7. Confirm the YAML parses: `python3 -c 'import yaml,sys; yaml.safe_load(open(sys.argv[1]))' openspec/config.yaml`.
8. Report the deleted placeholders to the user as questions rather than guessing values.
## Gotchas
- Rules are appended to the schema's artifact instructions (`openspec/schemas/lean/schema.yaml`). Those already cover spec scope, user decisions, per-task verification, per-group tests and size targets. Write rules only for what the repo needs beyond them. A rule that contradicts the schema gets half-followed; edit the project's schema copy instead.
- Every rule tends to add a section to every change. Prefer limits ("only when ...") to requests ("include ...").
- Size targets in lines don't bind: agents write long lines. Use words.
- `lean` is a fork of OpenSpec 1.15.0's `spec-driven`. After an OpenSpec upgrade, compare it with `openspec schema fork spec-driven` output and carry over upstream fixes. `lean` keeps prose unwrapped while upstream wraps it, so compare with `git diff --no-index --word-diff`.
- `context` should point to files (CLAUDE.md, decision docs) rather than copying their commands or facts, which then drift.
- `operations` supports only `apply` and `archive`. OpenSpec only warns about other keys at instruction time, so a YAML parse misses them.
- Explore reads only `context` and `rules`. Behaviour wanted outside a single artifact or apply/archive goes in `context`.
- Archive blocks on unchecked task boxes, so the template's Human checks rule uses plain bullets. Keep that wording when merging into an existing config.
- Sub-agents never read the config. Rules they must follow go in `apply` guidance as something the main agent puts in each brief.
- Changes already in flight keep their current artifacts. The new rules apply to new changes.
© sammcj · Apache-2.0 · sammcj/agentic-coding