jpskill.com
🛠️ 開発・MCP コミュニティ

canonical-format-checker

このSkillは、既存の信頼できる情報源に基づいたパターン(スキル、仕様など)に関するコンテンツを作成・レビューする際に、形式のずれを防ぎ、一貫性を保つために、参照元となる正式な形式に従っているかを確認するSkill。

📜 元の英語説明(参考)

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.

🇯🇵 日本人クリエイター向け解説

一言でいうと

このSkillは、既存の信頼できる情報源に基づいたパターン(スキル、仕様など)に関するコンテンツを作成・レビューする際に、形式のずれを防ぎ、一貫性を保つために、参照元となる正式な形式に従っているかを確認するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o canonical-format-checker.zip https://jpskill.com/download/16853.zip && unzip -o canonical-format-checker.zip && rm canonical-format-checker.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16853.zip -OutFile "$d\canonical-format-checker.zip"; Expand-Archive "$d\canonical-format-checker.zip" -DestinationPath $d -Force; ri "$d\canonical-format-checker.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して canonical-format-checker.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → canonical-format-checker フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Canonical Format Checker

概要

コンテンツが信頼できる標準ソースに従っていることを検証することで、フォーマットのずれを防ぎます。プラットフォームの他の場所(スキル、サブエージェント、ADRなど)に存在するパターンを教える場合、このスキルは、教えられたフォーマットが標準ソースと一致することを保証します。

これが重要な理由: 第14章のフォーマットずれの失敗は、レッスンで教えられたスキルフォーマットが第5章(標準ソース)と異なっていたために発生しました。生徒は、以前の章と矛盾する誤ったパターンを学びました。

このスキルを使用するタイミング

自動トリガー(実装前に確認):

  • レッスンでスキルの作成方法を教える → .claude/skills/ 構造を確認
  • レッスンでサブエージェントの書き方を教える → .claude/agents/ 構造を確認
  • レッスンでADRフォーマットを教える → specs/*/adrs/ 構造を確認
  • レッスンでPHRフォーマットを教える → history/prompts/ 構造を確認
  • レッスンで仕様フォーマットを教える → specs/*/spec.md 構造を確認

手動トリガー(ユーザーからのリクエスト):

  • "Check canonical format for skills"
  • "Verify format consistency"
  • "Does this match the canonical source?"

標準ソースルックアップテーブル

教えるパターン 標準ソースの場所 主要なフォーマット要素
スキル .claude/skills/<name>/SKILL.md ディレクトリ構造、namedescription を含む YAML フロントマター
サブエージェント .claude/agents/<name>.md namedescriptionmodelskills を含む YAML フロントマター
ADR specs/<feature>/adrs/adr-*.md 番号付きファイル、標準ADR構造
PHR history/prompts/<stage>/ .specify/templates/phr-template.prompt.md からのテンプレート
仕様 specs/<feature>/spec.md セクション:Overview、User Stories、FRs、SCs、Evals
コマンド .claude/commands/*.md YAML フロントマター、段階的なフェーズ

ワークフロー

ステップ 1: 教えるパターンを特定する

自問してください:

  • このレッスンでは、プラットフォームのパターンをCREATEする方法を教えていますか?
  • このパターンに対する既存の標準ソースはありますか?
トリガーの例:
- "Lesson teaches students to write their own skills" → スキルパターン
- "Chapter covers custom commands" → コマンドパターン
- "Module explains agent creation" → サブエージェントパターン

ステップ 2: 標準ソースを見つけて読む

必須: コンテンツを作成またはレビューする前に、標準ソースを読んでください。

# スキルの場合 - 実際のスキル構造を読みます
ls .claude/skills/*/
cat .claude/skills/session-intelligence-harvester/SKILL.md

# エージェントの場合 - 実際のエージェント構造を読みます
ls .claude/agents/
cat .claude/agents/content-implementer.md

# コマンドの場合 - 実際のコマンド構造を読みます
ls .claude/commands/
head -50 .claude/commands/sp.specify.md

ステップ 3: フォーマット要件を抽出する

標準ソースから必要なフォーマット要素を文書化します。

## 標準フォーマット: スキル

**ディレクトリ構造**:

.claude/skills/ └── <skill-name>/ # ディレクトリ、フラットファイルではありません └── SKILL.md # SKILL.md ファイル (大文字)


**YAML フロントマター** (必須):
```yaml
---
name: "<skill-name>"
description: "This skill should be used when... Use when..."
---

コンテンツ構造:

  1. スキル名と一致する H1 タイトル
  2. 目的を説明する Overview セクション
  3. トリガーを含む When to Use セクション
  4. ステップを含む Workflow セクション

ステップ 4: コンテンツを標準と比較する

レッスン/コンテンツのフォーマットの一貫性を確認します。

## フォーマット比較チェックリスト

**スキルフォーマットチェック**:
- [ ] ディレクトリ構造を表示する (フラットファイルではない)
- [ ] SKILL.md ファイル名を使用する (skill.md または index.md ではない)
- [ ] `name` と `description` を含む YAML フロントマターを含む
- [ ] `description` は "This skill should be used when..." で始まる

**エージェントフォーマットチェック**:
- [ ] エージェントディレクトリに単一の .md ファイルを表示する
- [ ] `name`、`description`、`model` を含む YAML フロントマターを含む
- [ ] `skills` 配列を含む (空でも可)
- [ ] 説明はいつ呼び出すかを説明する

**コマンドフォーマットチェック**:
- [ ] コマンドディレクトリに .md ファイルを表示する
- [ ] 明確なゲートを持つ番号付きフェーズがある
- [ ] 強制チェックを含む

ステップ 5: ずれを報告するか、準拠を確認する

フォーマットのずれが検出された場合:

## フォーマットのずれが検出されました

**パターン**: スキル
**場所**: レッスン 7, セクション "Creating Your First Skill"

**問題**: フラットファイル `.claude/skills/my-skill.md` を表示
**標準**: ディレクトリ構造 `.claude/skills/my-skill/SKILL.md`

**必要な具体的な修正**:
1. 45行目: `.claude/skills/my-skill.md` を `.claude/skills/my-skill/SKILL.md` に変更
2. 52行目: `mkdir` でディレクトリ作成を示すように例を更新
3. 60行目: 必須フィールドを含む YAML フロントマターの例を追加

**相互参照**: 第5章、レッスン7 (agent-skills.md) が標準ソース

フォーマットが準拠している場合:

## フォーマットが検証されました

**パターン**: スキル
**標準ソース**: `.claude/skills/session-intelligence-harvester/SKILL.md`
**コンテンツの場所**: 第14章、レッスン5

**検証**:
- [x] ディレクトリ構造が標準と一致する
- [x] YAML フロントマターのフォーマットが正しい
- [x] 必須フィールドが存在する (name, description)
- [x] 説明は "This skill should be used when..." パターンに従う

**ステータス**: COMPLIANT - ずれは検出されませんでした

一般的なフォーマットずれパターン

ずれパターン 1: フラットファイル vs ディレクトリ

誤り: .claude/skills/my-skill.md 正しい: .claude/skills/my-skill/SKILL.md

ずれパターン 2: YAML フロントマターの欠落

誤り: フロントマターのない Markdown ファイル 正しい: 必須フィールドを含む YAML フロントマター

ずれパターン 3: ファイル名の誤り

誤り: skill.md, index.md, README.md 正しい: SKILL.md (大文字)

ずれパターン 4: 必須フィールドの欠落

誤り: フロントマターに name のみ 正しい: namedescription の両方 (descript

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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.

# 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/ └── <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:

## 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

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