Loading...
Loading...
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.
npx skill4agent add panaversity/agentfactory canonical-format-checker.claude/skills/.claude/agents/specs/*/adrs/history/prompts/specs/*/spec.md| Pattern Being Taught | Canonical Source Location | Key Format Elements |
|---|---|---|
| Skills | | Directory structure, YAML frontmatter with |
| Subagents | | YAML frontmatter with |
| ADRs | | Numbered files, standard ADR structure |
| PHRs | | Template from |
| Specifications | | Sections: Overview, User Stories, FRs, SCs, Evals |
| Commands | | YAML frontmatter, step-by-step phases |
Trigger Examples:
- "Lesson teaches students to write their own skills" → Skills pattern
- "Chapter covers custom commands" → Commands pattern
- "Module explains agent creation" → Subagents pattern# 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## Canonical Format: Skills
**Directory Structure**:
**YAML Frontmatter** (REQUIRED):
```yaml
---
name: "<skill-name>"
description: "This skill should be used when... Use when..."
---
### 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## 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## Format Verified
**Pattern**: Skills
**Canonical Source**: `.claude/skills/session-intelligence-harvester/SKILL.md`
**Content Location**: Chapter 14, Lesson 5
**Verification**:
- [x] Directory structure matches canonical
- [x] YAML frontmatter format correct
- [x] Required fields present (name, description)
- [x] Description follows "This skill should be used when..." pattern
**Status**: COMPLIANT - No drift detected.claude/skills/my-skill.md.claude/skills/my-skill/SKILL.mdskill.mdindex.mdREADME.mdSKILL.mdnamenamedescriptionchapter-plannercontent-implementervalidation-auditor