🛠️ Skill Developer
Claude Codeで、アンソロピック社の公??
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Comprehensive guide for creating and managing skills in Claude Code with auto-activation system, following Anthropic's official best practices including the 500-line rule and progressive disclosure pattern.
🇯🇵 日本人クリエイター向け解説
Claude Codeで、アンソロピック社の公??
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o skill-developer.zip https://jpskill.com/download/3499.zip && unzip -o skill-developer.zip && rm skill-developer.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3499.zip -OutFile "$d\skill-developer.zip"; Expand-Archive "$d\skill-developer.zip" -DestinationPath $d -Force; ri "$d\skill-developer.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
skill-developer.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
skill-developerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Skill Developer を使って、最小構成のサンプルコードを示して
- › Skill Developer の主な使い方と注意点を教えて
- › Skill Developer を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
スキル開発者ガイド
目的
Anthropicの公式ベストプラクティス(500行ルールやプログレッシブディスクロージャーパターンを含む)に従い、自動アクティベーションシステムを備えたClaude Codeでスキルを作成・管理するための包括的なガイドです。
このスキルを使用するタイミング
以下の内容に言及すると自動的にアクティベートされます。
- スキルの作成または追加
- スキルトリガーまたはルールの変更
- スキルアクティベーションの仕組みの理解
- スキルアクティベーションの問題のデバッグ
- skill-rules.json の操作
- フックシステムのメカニズム
- Claude Codeのベストプラクティス
- プログレッシブディスクロージャー
- YAML frontmatter
- 500行ルール
システム概要
2フックアーキテクチャ
1. UserPromptSubmitフック(プロアクティブな提案)
- ファイル:
.claude/hooks/skill-activation-prompt.ts - トリガー: Claudeがユーザーのプロンプトを見る前
- 目的: キーワードと意図パターンに基づいて関連スキルを提案
- 方法: フォーマットされたリマインダーをコンテキストとして注入(stdout → Claudeの入力)
- ユースケース: トピックベースのスキル、暗黙的な作業検出
2. Stopフック - エラー処理リマインダー(穏やかなリマインダー)
- ファイル:
.claude/hooks/error-handling-reminder.ts - トリガー: Claudeが応答を終了した後
- 目的: 作成されたコードのエラー処理を自己評価するよう穏やかにリマインド
- 方法: 編集されたファイルに危険なパターンがないか分析し、必要に応じてリマインダーを表示
- ユースケース: ワークフローを妨げずにエラー処理の意識を高める
哲学の変更(2025-10-27): Sentry/エラー処理のためのブロッキングPreToolUseから移行しました。代わりに、ワークフローを妨げないがコード品質の意識を維持する、応答後の穏やかなリマインダーを使用します。
設定ファイル
場所: .claude/skills/skill-rules.json
以下を定義します。
- すべてのスキルとそのトリガー条件
- 強制レベル(block、suggest、warn)
- ファイルパスパターン(glob)
- コンテンツ検出パターン(regex)
- スキップ条件(セッショントラッキング、ファイルマーカー、環境変数)
スキルタイプ
1. ガードレールスキル
目的: エラーを防ぐ重要なベストプラクティスを強制します
特徴:
- タイプ:
"guardrail" - 強制:
"block" - 優先度:
"critical"または"high" - スキルが使用されるまでファイル編集をブロック
- 一般的な間違い(列名、致命的なエラー)を防止
- セッション認識(同じセッションで繰り返し通知しない)
例:
database-verification- Prismaクエリの前にテーブル/列名を検証frontend-dev-guidelines- React/TypeScriptパターンを強制
使用するタイミング:
- ランタイムエラーを引き起こす間違い
- データ整合性の懸念
- 致命的な互換性の問題
2. ドメインスキル
目的: 特定の領域に対する包括的なガイダンスを提供します
特徴:
- タイプ:
"domain" - 強制:
"suggest" - 優先度:
"high"または"medium" - 助言的であり、必須ではありません
- トピックまたはドメイン固有
- 包括的なドキュメント
例:
backend-dev-guidelines- Node.js/Express/TypeScriptパターンfrontend-dev-guidelines- React/TypeScriptベストプラクティスerror-tracking- Sentry統合ガイダンス
使用するタイミング:
- 深い知識を必要とする複雑なシステム
- ベストプラクティスのドキュメント
- アーキテクチャパターン
- ハウツーガイド
クイックスタート: 新しいスキルの作成
ステップ1: スキルファイルの作成
場所: .claude/skills/{skill-name}/SKILL.md
テンプレート:
---
name: my-new-skill
description: Brief description including keywords that trigger this skill. Mention topics, file types, and use cases. Be explicit about trigger terms.
---
# My New Skill
## Purpose
What this skill helps with
## When to Use
Specific scenarios and conditions
## Key Information
The actual guidance, documentation, patterns, examples
ベストプラクティス:
- ✅ 名前: 小文字、ハイフン、動名詞形(動詞 + -ing)が望ましい
- ✅ 説明: すべてのトリガーキーワード/フレーズを含める(最大1024文字)
- ✅ コンテンツ: 500行未満 - 詳細については参照ファイルを使用
- ✅ 例: 実際のコード例
- ✅ 構造: 明確な見出し、リスト、コードブロック
ステップ2: skill-rules.jsonに追加
完全なスキーマについては、SKILL_RULES_REFERENCE.mdを参照してください。
基本テンプレート:
{
"my-new-skill": {
"type": "domain",
"enforcement": "suggest",
"priority": "medium",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
}
}
}
ステップ3: トリガーのテスト
UserPromptSubmitのテスト:
echo '{"session_id":"test","prompt":"your test prompt"}' | \
npx tsx .claude/hooks/skill-activation-prompt.ts
PreToolUseのテスト:
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"session_id":"test","tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
ステップ4: パターンの調整
テストに基づいて:
- 不足しているキーワードを追加
- 誤検知を減らすために意図パターンを調整
- ファイルパスパターンを調整
- 実際のファイルに対してコンテンツパターンをテスト
ステップ5: Anthropicのベストプラクティスに従う
✅ SKILL.mdを500行未満に保つ ✅ 参照ファイルでプログレッシブディスクロージャーを使用する ✅ 100行を超える参照ファイルに目次を追加する ✅ トリガーキーワードを含む詳細な説明を記述する ✅ ドキュメント化する前に3つ以上の実際のシナリオでテストする ✅ 実際の使用状況に基づいて反復する
強制レベル
BLOCK(クリティカルなガードレール)
- Edit/Writeツールの実行を物理的に防止
- フックからの終了コード2、stderr → Claude
- Claudeはメッセージを見て、続行するにはスキルを使用する必要があります
- 用途: 致命的な間違い、データ整合性、セキュリティ問題
例: データベースの列名検証
SUGGEST(推奨)
- Claudeがプロンプトを見る前にリマインダーを注入
- Claudeは関連スキルを認識
- 強制ではなく、助言のみ
- 用途: ドメインガイダンス、ベストプラクティス、ハウツーガイド
例: フロントエンド開発ガイドライン
WARN(オプション)
- 優先度の低い提案
- 助言のみ、最小限の強制
- 用途: あれば便利な提案、情報提供のリマインダー
めったに使用されません - ほとんどのスキルはどちらか
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Skill Developer Guide
Purpose
Comprehensive guide for creating and managing skills in Claude Code with auto-activation system, following Anthropic's official best practices including the 500-line rule and progressive disclosure pattern.
When to Use This Skill
Automatically activates when you mention:
- Creating or adding skills
- Modifying skill triggers or rules
- Understanding how skill activation works
- Debugging skill activation issues
- Working with skill-rules.json
- Hook system mechanics
- Claude Code best practices
- Progressive disclosure
- YAML frontmatter
- 500-line rule
System Overview
Two-Hook Architecture
1. UserPromptSubmit Hook (Proactive Suggestions)
- File:
.claude/hooks/skill-activation-prompt.ts - Trigger: BEFORE Claude sees user's prompt
- Purpose: Suggest relevant skills based on keywords + intent patterns
- Method: Injects formatted reminder as context (stdout → Claude's input)
- Use Cases: Topic-based skills, implicit work detection
2. Stop Hook - Error Handling Reminder (Gentle Reminders)
- File:
.claude/hooks/error-handling-reminder.ts - Trigger: AFTER Claude finishes responding
- Purpose: Gentle reminder to self-assess error handling in code written
- Method: Analyzes edited files for risky patterns, displays reminder if needed
- Use Cases: Error handling awareness without blocking friction
Philosophy Change (2025-10-27): We moved away from blocking PreToolUse for Sentry/error handling. Instead, use gentle post-response reminders that don't block workflow but maintain code quality awareness.
Configuration File
Location: .claude/skills/skill-rules.json
Defines:
- All skills and their trigger conditions
- Enforcement levels (block, suggest, warn)
- File path patterns (glob)
- Content detection patterns (regex)
- Skip conditions (session tracking, file markers, env vars)
Skill Types
1. Guardrail Skills
Purpose: Enforce critical best practices that prevent errors
Characteristics:
- Type:
"guardrail" - Enforcement:
"block" - Priority:
"critical"or"high" - Block file edits until skill used
- Prevent common mistakes (column names, critical errors)
- Session-aware (don't repeat nag in same session)
Examples:
database-verification- Verify table/column names before Prisma queriesfrontend-dev-guidelines- Enforce React/TypeScript patterns
When to Use:
- Mistakes that cause runtime errors
- Data integrity concerns
- Critical compatibility issues
2. Domain Skills
Purpose: Provide comprehensive guidance for specific areas
Characteristics:
- Type:
"domain" - Enforcement:
"suggest" - Priority:
"high"or"medium" - Advisory, not mandatory
- Topic or domain-specific
- Comprehensive documentation
Examples:
backend-dev-guidelines- Node.js/Express/TypeScript patternsfrontend-dev-guidelines- React/TypeScript best practiceserror-tracking- Sentry integration guidance
When to Use:
- Complex systems requiring deep knowledge
- Best practices documentation
- Architectural patterns
- How-to guides
Quick Start: Creating a New Skill
Step 1: Create Skill File
Location: .claude/skills/{skill-name}/SKILL.md
Template:
---
name: my-new-skill
description: Brief description including keywords that trigger this skill. Mention topics, file types, and use cases. Be explicit about trigger terms.
---
# My New Skill
## Purpose
What this skill helps with
## When to Use
Specific scenarios and conditions
## Key Information
The actual guidance, documentation, patterns, examples
Best Practices:
- ✅ Name: Lowercase, hyphens, gerund form (verb + -ing) preferred
- ✅ Description: Include ALL trigger keywords/phrases (max 1024 chars)
- ✅ Content: Under 500 lines - use reference files for details
- ✅ Examples: Real code examples
- ✅ Structure: Clear headings, lists, code blocks
Step 2: Add to skill-rules.json
See SKILL_RULES_REFERENCE.md for complete schema.
Basic Template:
{
"my-new-skill": {
"type": "domain",
"enforcement": "suggest",
"priority": "medium",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
}
}
}
Step 3: Test Triggers
Test UserPromptSubmit:
echo '{"session_id":"test","prompt":"your test prompt"}' | \
npx tsx .claude/hooks/skill-activation-prompt.ts
Test PreToolUse:
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"session_id":"test","tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
Step 4: Refine Patterns
Based on testing:
- Add missing keywords
- Refine intent patterns to reduce false positives
- Adjust file path patterns
- Test content patterns against actual files
Step 5: Follow Anthropic Best Practices
✅ Keep SKILL.md under 500 lines ✅ Use progressive disclosure with reference files ✅ Add table of contents to reference files > 100 lines ✅ Write detailed description with trigger keywords ✅ Test with 3+ real scenarios before documenting ✅ Iterate based on actual usage
Enforcement Levels
BLOCK (Critical Guardrails)
- Physically prevents Edit/Write tool execution
- Exit code 2 from hook, stderr → Claude
- Claude sees message and must use skill to proceed
- Use For: Critical mistakes, data integrity, security issues
Example: Database column name verification
SUGGEST (Recommended)
- Reminder injected before Claude sees prompt
- Claude is aware of relevant skills
- Not enforced, just advisory
- Use For: Domain guidance, best practices, how-to guides
Example: Frontend development guidelines
WARN (Optional)
- Low priority suggestions
- Advisory only, minimal enforcement
- Use For: Nice-to-have suggestions, informational reminders
Rarely used - most skills are either BLOCK or SUGGEST.
Skip Conditions & User Control
1. Session Tracking
Purpose: Don't nag repeatedly in same session
How it works:
- First edit → Hook blocks, updates session state
- Second edit (same session) → Hook allows
- Different session → Blocks again
State File: .claude/hooks/state/skills-used-{session_id}.json
2. File Markers
Purpose: Permanent skip for verified files
Marker: // @skip-validation
Usage:
// @skip-validation
import { PrismaService } from './prisma';
// This file has been manually verified
NOTE: Use sparingly - defeats the purpose if overused
3. Environment Variables
Purpose: Emergency disable, temporary override
Global disable:
export SKIP_SKILL_GUARDRAILS=true # Disables ALL PreToolUse blocks
Skill-specific:
export SKIP_DB_VERIFICATION=true
export SKIP_ERROR_REMINDER=true
Testing Checklist
When creating a new skill, verify:
- [ ] Skill file created in
.claude/skills/{name}/SKILL.md - [ ] Proper frontmatter with name and description
- [ ] Entry added to
skill-rules.json - [ ] Keywords tested with real prompts
- [ ] Intent patterns tested with variations
- [ ] File path patterns tested with actual files
- [ ] Content patterns tested against file contents
- [ ] Block message is clear and actionable (if guardrail)
- [ ] Skip conditions configured appropriately
- [ ] Priority level matches importance
- [ ] No false positives in testing
- [ ] No false negatives in testing
- [ ] Performance is acceptable (<100ms or <200ms)
- [ ] JSON syntax validated:
jq . skill-rules.json - [ ] SKILL.md under 500 lines ⭐
- [ ] Reference files created if needed
- [ ] Table of contents added to files > 100 lines
Reference Files
For detailed information on specific topics, see:
TRIGGER_TYPES.md
Complete guide to all trigger types:
- Keyword triggers (explicit topic matching)
- Intent patterns (implicit action detection)
- File path triggers (glob patterns)
- Content patterns (regex in files)
- Best practices and examples for each
- Common pitfalls and testing strategies
SKILL_RULES_REFERENCE.md
Complete skill-rules.json schema:
- Full TypeScript interface definitions
- Field-by-field explanations
- Complete guardrail skill example
- Complete domain skill example
- Validation guide and common errors
HOOK_MECHANISMS.md
Deep dive into hook internals:
- UserPromptSubmit flow (detailed)
- PreToolUse flow (detailed)
- Exit code behavior table (CRITICAL)
- Session state management
- Performance considerations
TROUBLESHOOTING.md
Comprehensive debugging guide:
- Skill not triggering (UserPromptSubmit)
- PreToolUse not blocking
- False positives (too many triggers)
- Hook not executing at all
- Performance issues
PATTERNS_LIBRARY.md
Ready-to-use pattern collection:
- Intent pattern library (regex)
- File path pattern library (glob)
- Content pattern library (regex)
- Organized by use case
- Copy-paste ready
ADVANCED.md
Future enhancements and ideas:
- Dynamic rule updates
- Skill dependencies
- Conditional enforcement
- Skill analytics
- Skill versioning
Quick Reference Summary
Create New Skill (5 Steps)
- Create
.claude/skills/{name}/SKILL.mdwith frontmatter - Add entry to
.claude/skills/skill-rules.json - Test with
npx tsxcommands - Refine patterns based on testing
- Keep SKILL.md under 500 lines
Trigger Types
- Keywords: Explicit topic mentions
- Intent: Implicit action detection
- File Paths: Location-based activation
- Content: Technology-specific detection
See TRIGGER_TYPES.md for complete details.
Enforcement
- BLOCK: Exit code 2, critical only
- SUGGEST: Inject context, most common
- WARN: Advisory, rarely used
Skip Conditions
- Session tracking: Automatic (prevents repeated nags)
- File markers:
// @skip-validation(permanent skip) - Env vars:
SKIP_SKILL_GUARDRAILS(emergency disable)
Anthropic Best Practices
✅ 500-line rule: Keep SKILL.md under 500 lines ✅ Progressive disclosure: Use reference files for details ✅ Table of contents: Add to reference files > 100 lines ✅ One level deep: Don't nest references deeply ✅ Rich descriptions: Include all trigger keywords (max 1024 chars) ✅ Test first: Build 3+ evaluations before extensive documentation ✅ Gerund naming: Prefer verb + -ing (e.g., "processing-pdfs")
Troubleshoot
Test hooks manually:
# UserPromptSubmit
echo '{"prompt":"test"}' | npx tsx .claude/hooks/skill-activation-prompt.ts
# PreToolUse
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
See TROUBLESHOOTING.md for complete debugging guide.
Related Files
Configuration:
.claude/skills/skill-rules.json- Master configuration.claude/hooks/state/- Session tracking.claude/settings.json- Hook registration
Hooks:
.claude/hooks/skill-activation-prompt.ts- UserPromptSubmit.claude/hooks/error-handling-reminder.ts- Stop event (gentle reminders)
All Skills:
.claude/skills/*/SKILL.md- Skill content files
Skill Status: COMPLETE - Restructured following Anthropic best practices ✅ Line Count: < 500 (following 500-line rule) ✅ Progressive Disclosure: Reference files for detailed information ✅
Next: Create more skills, refine patterns based on usage
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.