adopt-spec
БесплатноБез исполняемых скриптовНе проверенAdopt a typed .spec.ts for an existing hand-written CLAUDE.md — start from the file you already have, non-destructively
от zernie★ 17 звёзд на GitHubОб этом скилле
Start a typed CLAUDE.md.spec.ts from an existing hand-written CLAUDE.md (or AGENTS.md). This is the non-destructive adoption path — you keep your existing instruction file as the starting point and get type safety going forward.
Say that this skill is running. Start your first reply with one line: Running the adopt-spec skill on <file>. The user should see that adoption started, and on which file, without opening the tool output.
Adoption rules
Adoption is the safe, faithful on-ramp — never an upgrade in disguise. These are non-negotiable:
- Faithful. Preserve every rule, command, and prose section as-is. Invent nothing — the spec must compile back to ~the user's existing file. The one exception is a file map ("Key Files"): never emit the deprecated
keyFilesfield — see the guideline under Step 3. - Non-destructive. Never edit the original
CLAUDE.md/AGENTS.md. Only write the new.spec.ts. Never auto-compileover the file — switching it to spec-managed is a separate, explicit step the user runs with a diff to review. - Don't escalate enforcement. Keep
guidance()asguidance(). Upgrading toenforce()has a cost (config/plugins, possible false positives) and is a separate opt-in step — thestrengthenskill. Adoption is not turning on strict /workflowgating. - Reversible.
vigiles eject <file>hands the file back as plain hand-owned markdown anytime — it's never a one-way door. Tell the user this. - Ask before writing. Present the generated spec and a conversion summary first; write only on the user's yes.
- A lighter touch exists. For no spec at all, inline marks in the markdown are verified by
vigiles lintwith the same engine:<!-- vigiles:enforce ... -->for a linter rule,<!-- vigiles:file <path> -->for a file,<!-- vigiles:cmd "<command>" -->for a script (every mark:docs/verifying-instruction-files.md#inline-marksin the vigiles repository).
Instructions
Step 1: Read the Existing File
Read the target instruction file (default: CLAUDE.md in the repo root). If the user specified a path, use that.
Also check if vigiles is installed: look for vigiles in package.json devDependencies. If not, suggest:
npm install -D vigiles
Step 2: Parse the Structure
Identify these sections in the markdown:
- Commands — lines like
`npm run build` — descriptionor- `command` — description - A file map ("Key Files") — lines like
`src/foo.ts` — descriptionlisting important files. Never becomeskeyFiles(deprecated); see the guideline under Step 3 - Rules —
###headings with**Enforced by:**,**Claimed (unverified):**or**Guidance only**annotations - Prose sections — everything else (positioning, architecture, principles, etc.)
For each rule, classify it:
- Has
**Enforced by:** \linter/rule`→enforce("linter/rule", "why")` - Has
**Claimed (unverified):** \linter/rule`→enforce("linter/rule", "why")` too — the last compile could not verify it; the next one will say why - Has
**Enforced by:** \code-review`or similar non-linter →guidance("...")` - Has
**Guidance only**→guidance("...") - Has no annotation → mark as TODO for the user to classify
Step 3: Generate the Spec File
Create CLAUDE.md.spec.ts (or the appropriate name based on the source file) with this structure:
import {
instructionFile,
enforce,
guidance,
file,
cmd,
ref,
prose,
} from "vigiles/spec";
export default instructionFile({
sections: {
// Prose sections here
},
// No `keyFiles`: the field is deprecated (removed next major). A "Key Files"
// list in the original file is NOT carried over as a map — see the
// guideline below.
commands: {
// Commands here
},
rules: {
// Rules here
},
});
Important guidelines:
- Use
file()refs in sections where file paths appear in backticks — this enables stale reference detection - 🔴 Never emit
keyFiles. The field is deprecated and removed in the next major (vigiles lintwarns asdeprecated-key-files). For a "Key Files" / file-map section in the original, apply the migration recipe (docs/rules/deprecated-key-files.mdin the vigiles repository) and show the user, per entry, where it goes — the first that fits: (1) the file's header, the docs or the path already say it (or the path no longer exists) → delete it; (2) a fact about that one file → that file's header comment; (3) a rule for working in one folder → that folder's nestedCLAUDE.md(its own<folder>/CLAUDE.md.spec.ts); (4) nothing else would lead an agent to the file → a one-linefile()pointer in the section where the decision that needs it is written. Where each entry goes is the user's call; that the map does not becomekeyFilesis not. Until they decide, carry the list over as a plain prose section so adoption stays faithful - 🔴 A rule that names the script or hook enforcing it ("a
Установить adopt-spec в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл adopt-spec?
Adopt a typed .spec.ts for an existing hand-written CLAUDE.md — start from the file you already have, non-destructively
Как установить скилл adopt-spec?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл adopt-spec запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic