Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

spec-check

БесплатноБез исполняемых скриптовНе проверен

Audit spec/plan documents against the codebase. Ensures every spec section has implementing code, tests, and matching logic. Use when the user says "check…

Nimblesiteот Nimblesite★ 68 звёзд на GitHub

Об этом скилле

spec-check

Portable skill. This skill adapts to the current repository. The agent MUST inspect the repo structure and use judgment to apply these instructions appropriately.

Audit spec/plan documents against the codebase. Ensures every spec section has implementing code, tests, and that the code logic matches the spec.

Arguments

  • $ARGUMENTS — optional spec name or ID to check (e.g., LQL-PIPE or migration-spec). If empty, check ALL specs. Spec IDs are descriptive slugs, NEVER numbered (see Step 1).

Instructions

Follow these steps exactly. Be strict and pedantic. Stop on the first failure.


Step 1: Validate spec ID structure

Before checking code/test references, verify that the specs themselves are well-formed.

  1. Find all spec documents (see locations in Step 2).
  2. Extract every section ID using the regex \[([A-Z][A-Z0-9]*(-[A-Z0-9]+)+)\].
  3. Flag invalid IDs:
    • Numbered IDs ([SPEC-001], [REQ-003], [CI-004]) — must be renamed to descriptive hierarchical slugs.
    • Single-word IDs ([TIMEOUT]) — must have a group prefix.
    • IDs with trailing numbers ([FEAT-AUTH-01]) — the number is meaningless, remove it.
  4. Check group clustering: The first word of each ID is its group. All sections in the same group MUST appear together (adjacent) in the document. If they're scattered, flag it.
  5. Check for missing IDs: Any heading that defines a requirement or behavior should have an ID. Flag headings in spec files that look like they define behavior but lack an ID.

If any ID violations are found, report them all and STOP:

SPEC ID VIOLATIONS:

- docs/specs/migration-spec.md line 12: [SPEC-001] → rename to descriptive ID (e.g., [MIG-DDL-DIFF])
- docs/specs/sync-spec.md line 30: [SYNC-PUSH] and [SYNC-PULL] are not adjacent (scattered group)
- docs/specs/lql-spec.md line 5: "## Pipeline operators" has no spec ID

Fix spec IDs first, then re-run spec-check.

If all IDs are valid, proceed to Step 2.


Step 2: Find all spec/plan documents

Search for markdown files that contain spec sections with IDs. Look in these locations:

  • docs/specs/*.md
  • docs/plans/*.md
  • docs/**/*.md

Use Glob to find candidate files, then use Grep to confirm they contain spec IDs.

Spec ID patterns — IDs appear in square brackets, typically at the start of a heading or section line. Match this regex pattern:

\[([A-Z][A-Z0-9]*(-[A-Z0-9]+)+)\]

Spec IDs are hierarchical descriptive slugs, NEVER numbered. The format is [GROUP-TOPIC] or [GROUP-TOPIC-DETAIL]. The first word is the group — all sections sharing the same group MUST appear together in the spec's table of contents. IDs are uppercase, hyphen-separated, unique across the repo, and MUST NOT contain sequential numbers.

The hierarchy depth varies by repo: two words for simple repos ([AUTH-LOGIN]), three for most ([AUTH-TOKEN-VERIFY]), four for complex domains ([AUTH-OAUTH-REFRESH-FLOW]). The hierarchy mirrors the spec document's heading structure.

Examples of valid spec IDs (note how groups cluster):

  • [LQL-PIPE], [LQL-FILTER], [LQL-JOIN] — all in the LQL group
  • [SYNC-PUSH], [SYNC-PULL], [SYNC-CONFLICT] — all in the SYNC group
  • [MIG-DDL], [MIG-RLS], [MIG-VECTOR] — all in the MIG group
  • [CI-TIMEOUT], [CI-LINT], [CI-RELEASE] — all in the CI group

Examples of INVALID spec IDs:

  • [SPEC-001] — numbered, meaningless
  • [FEAT-AUTH-01] — trailing number
  • [REQ-003] — sequential index, no group hierarchy
  • [CI-004] — numbered, tells the reader nothing
  • [TIMEOUT] — no group prefix, ungrouped

For each file, extract every spec ID and its associated section title (the heading text after the ID) and the full section content (everything until the next heading of equal or higher level).


Step 3: Filter specs

  • If $ARGUMENTS is non-empty, filter the discovered specs:
    • If it matches a spec ID exactly (e.g., LQL-PIPE), check only that spec.
    • If it matches a partial name (e.g., migration), check all specs in files whose path contains that string.
  • If $ARGUMENTS is empty, process ALL discovered specs.

If filtering produces zero specs, report an error:

ERROR: No specs found matching "$ARGUMENTS". Discovered spec files: [list them]

Step 4: Check each spec section

For EACH spec section that has an ID, perform checks A, B, and C below. Stop on the first failure.

Check A: Code references the spec ID

Search the entire codebase for the spec ID string, excluding these directories:

  • docs/
  • node_modules/
  • .git/
  • target/ (Rust build artifacts)
  • bin/, obj/ (.NET build artifacts)
  • *.md files (markdown is docs, not code)
  • Lql/lql-lsp-rust/crates/lql-parser/src/generated/ (ANTLR-generated)

Use Grep with the literal spec ID (e.g., [LQL-PIPE]) to find references in code files.

Code files should contain comments referencing the spec ID. The search must catch **

Полный SKILL.md на GitHub

Установить spec-check в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл spec-check?

Audit spec/plan documents against the codebase. Ensures every spec section has implementing code, tests, and matching logic. Use when the user says "check specs", "spec audit", or "verify specs".

Как установить скилл spec-check?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spec-check запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить spec-check с