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.

242 stars

Best use case

canonical-format-checker is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 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.

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.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "canonical-format-checker" skill to help with this workflow task. Context: 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.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/canonical-format-checker/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/92bilal26/canonical-format-checker/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/canonical-format-checker/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How canonical-format-checker Compares

Feature / Agentcanonical-format-checkerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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.md` structure

**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.

```bash
# 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:

```markdown
## Canonical Format: Skills

**Directory Structure**:
```
.claude/skills/
└── <skill-name>/          # Directory, NOT flat file
    └── SKILL.md           # SKILL.md file (uppercase)
```

**YAML Frontmatter** (REQUIRED):
```yaml
---
name: "<skill-name>"
description: "This skill should be used when... Use when..."
---
```

**Content Structure**:
1. H1 title matching skill name
2. Overview section explaining purpose
3. When to Use section with triggers
4. 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**:
```markdown
## 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**:
```markdown
## 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
```

## Common Format Drift Patterns

### Drift Pattern 1: Flat Files vs Directories
**Wrong**: `.claude/skills/my-skill.md`
**Right**: `.claude/skills/my-skill/SKILL.md`

### Drift Pattern 2: Missing YAML Frontmatter
**Wrong**: Markdown file with no frontmatter
**Right**: YAML frontmatter with required fields

### Drift Pattern 3: Wrong Filename
**Wrong**: `skill.md`, `index.md`, `README.md`
**Right**: `SKILL.md` (uppercase)

### Drift Pattern 4: Missing Required Fields
**Wrong**: Only `name` in frontmatter
**Right**: Both `name` and `description` (description starts with "This skill should be used when...")

### Drift Pattern 5: Inventing New Format
**Wrong**: Creating custom format not matching canonical
**Right**: Following exact structure from canonical source

## Integration Points

**Use With**:
- `chapter-planner` - Check during lesson planning phase
- `content-implementer` - Verify before implementation
- `validation-auditor` - Include in validation checklist

**Invoke When**:
- Planning lessons that teach platform patterns
- Reviewing content that describes file structures
- Validating documentation about Claude Code features

## Self-Monitoring

Before approving content that teaches patterns:

- [ ] Identified what pattern is being taught
- [ ] Located and READ the canonical source
- [ ] Extracted format requirements from canonical
- [ ] Compared content against canonical requirements
- [ ] Detected drift OR confirmed compliance
- [ ] Provided specific fix instructions if drift found

## Success Criteria

**You succeed when**:
- Format drift detected BEFORE publication
- Specific canonical source identified and referenced
- Exact format requirements documented
- Content matches canonical source exactly

**You fail when**:
- Content teaches incorrect format that contradicts canonical
- Canonical source not checked before implementation
- Vague feedback ("fix the format") instead of specific corrections
- New patterns invented instead of following canonical

Related Skills

dbt-transformation-patterns

242
from aiskillstore/marketplace

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

cloudformation-best-practices

242
from aiskillstore/marketplace

CloudFormation template optimization, nested stacks, drift detection, and production-ready patterns. Use when writing or reviewing CF templates.

aws-compliance-checker

242
from aiskillstore/marketplace

Automated compliance checking against CIS, PCI-DSS, HIPAA, and SOC 2 benchmarks

baoyu-format-markdown

242
from aiskillstore/marketplace

Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.

enact-json-formatter

242
from aiskillstore/marketplace

Formats and prettifies JSON with configurable indentation

enact-formatter

242
from aiskillstore/marketplace

Formats and prettifies JSON with configurable indentation

assume-cloudformation-role

242
from aiskillstore/marketplace

Assume AWS IAM role for CloudFormation operations and set temporary credentials as environment variables. Use when working with CloudFormation stacks or when authentication setup is needed before AWS CloudFormation operations.

deployment-checker

242
from aiskillstore/marketplace

Pre-deployment validation checklist and automated readiness assessment.

compliance-checker

242
from aiskillstore/marketplace

Check code against security compliance standards and best practices.

code-formatter

242
from aiskillstore/marketplace

Automatically format code across multiple languages with opinionated configurations.

toon-format

242
from aiskillstore/marketplace

TOON (Token-Oriented Object Notation) encoding for LLM-efficient data representation. 30-60% token savings vs JSON for structured data.

standup-formatter

242
from aiskillstore/marketplace

Use when generating standup reports, daily updates, or team status summaries. Formats work activity into concise standup format.