canonical-format-checker
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when content teaches patterns (skills, subagents, ADRs, PHRs, specifications) that have canonical sources elsewhere. Prevents format…
от aiskillstore★ 509 звёзд на GitHubОб этом скилле
Canonical Format Checker
Overview
Prevent format drift by verifying content follows authoritative canonical sources. When teaching a pattern that exists elsewhere in the platform (skills, subagents, ADRs, etc.), this skill ensures the taught format matches the canonical source.
Why this matters: The Chapter 14 format drift failure occurred because the lesson taught skill format differently from Chapter 5 (canonical source). Students learned incorrect patterns that contradicted earlier chapters.
When to Use This Skill
Automatic Triggers (check before implementation):
- Lesson teaches how to create skills → Check
.claude/skills/structure - Lesson teaches how to write subagents → Check
.claude/agents/structure - Lesson teaches ADR format → Check
specs/*/adrs/structure - Lesson teaches PHR format → Check
history/prompts/structure - Lesson teaches specification format → Check
specs/*/spec.mdstructure
Manual Triggers (user requests):
- "Check canonical format for skills"
- "Verify format consistency"
- "Does this match the canonical source?"
Canonical Source Lookup Table
| Pattern Being Taught | Canonical Source Location | Key Format Elements |
|---|---|---|
| Skills | .claude/skills/<name>/SKILL.md |
Directory structure, YAML frontmatter with name, description |
| Subagents | .claude/agents/<name>.md |
YAML frontmatter with name, description, model, skills |
| ADRs | specs/<feature>/adrs/adr-*.md |
Numbered files, standard ADR structure |
| PHRs | history/prompts/<stage>/ |
Template from .specify/templates/phr-template.prompt.md |
| Specifications | specs/<feature>/spec.md |
Sections: Overview, User Stories, FRs, SCs, Evals |
| Commands | .claude/commands/*.md |
YAML frontmatter, step-by-step phases |
Workflow
Step 1: Identify What Pattern Is Being Taught
Ask yourself:
- Does this lesson teach how to CREATE any platform pattern?
- Is there an existing canonical source for this pattern?
Trigger Examples:
- "Lesson teaches students to write their own skills" → Skills pattern
- "Chapter covers custom commands" → Commands pattern
- "Module explains agent creation" → Subagents pattern
Step 2: Locate and Read Canonical Source
MANDATORY: Read the canonical source BEFORE writing or reviewing content.
# For Skills - read actual skill structure
ls .claude/skills/*/
cat .claude/skills/session-intelligence-harvester/SKILL.md
# For Agents - read actual agent structure
ls .claude/agents/
cat .claude/agents/content-implementer.md
# For Commands - read actual command structure
ls .claude/commands/
head -50 .claude/commands/sp.specify.md
Step 3: Extract Format Requirements
Document the required format elements from canonical source:
## Canonical Format: Skills
**Directory Structure**:
.claude/skills/
└──
**YAML Frontmatter** (REQUIRED):
```yaml
---
name: "<skill-name>"
description: "This skill should be used when... Use when..."
---
Content Structure:
- H1 title matching skill name
- Overview section explaining purpose
- When to Use section with triggers
- Workflow section with steps
### Step 4: Compare Content Against Canonical
Check the lesson/content for format consistency:
```markdown
## Format Comparison Checklist
**Skill Format Check**:
- [ ] Shows directory structure (not flat file)
- [ ] Uses SKILL.md filename (not skill.md or index.md)
- [ ] Includes YAML frontmatter with `name` and `description`
- [ ] `description` starts with "This skill should be used when..."
**Agent Format Check**:
- [ ] Shows single .md file in agents directory
- [ ] Includes YAML frontmatter with `name`, `description`, `model`
- [ ] Includes `skills` array (can be empty)
- [ ] Description explains when to invoke
**Command Format Check**:
- [ ] Shows .md file in commands directory
- [ ] Has numbered phases with clear gates
- [ ] Includes enforcement checks
Step 5: Report Drift or Confirm Compliance
If Format Drift Detected:
## Format Drift Detected
**Pattern**: Skills
**Location**: Lesson 7, Section "Creating Your First Skill"
**Issue**: Shows flat file `.claude/skills/my-skill.md`
**Canonical**: Directory structure `.claude/skills/my-skill/SKILL.md`
**Specific Fixes Required**:
1. Line 45: Change `.claude/skills/my-skill.md` to `.claude/skills/my-skill/SKILL.md`
2. Line 52: Update example to show directory creation with `mkdir`
3. Line 60: Add YAML frontmatter example with required fields
**Cross-Reference**: Chapter 5, Lesson 7 (agent-skills.md) is canonical source
If Format Compliant:
## Format Verified
Установить canonical-format-checker в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл canonical-format-checker?
This skill should be used when content teaches patterns (skills, subagents, ADRs, PHRs, specifications) that have canonical sources elsewhere. Prevents format drift by ensuring content references and follows the authoritative format from canonical sources. Use before implementing lessons that teach platform patterns, or when reviewing content for format consistency.
Как установить скилл canonical-format-checker?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл canonical-format-checker запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic