SKILL.mdフォーマット
SKILL.mdファイルフォーマットの完全な仕様です。
概要
SKILL.mdファイルはYAMLフロントマター付きのMarkdownを使用してAgent Skillを定義します。
ファイル構造
markdown
---
# YAML Frontmatter (metadata)
name: Skill Name
description: Brief description
---
# Main Content
Your skill instructions in Markdown format.
フロントマターフィールド
必須フィールド
| フィールド | タイプ | 説明 |
|-------|------|-------------|
| name | string | スキル名(最大50文字) |
| description | string | 簡単な説明(最大200文字) |
オプションフィールド
| フィールド | タイプ | 説明 |
|-------|------|-------------|
| version | string | セマンティックバージョン(例:"1.0.0") |
| author | string | 著者名または組織 |
| license | string | ライセンスタイプ(例:"MIT") |
| platforms | array | サポートされるプラットフォーム |
| categories | array | スキルのカテゴリ |
| tags | array | 検索キーワード |
| repository | string | ソースリポジトリURL |
| website | string | ドキュメントウェブサイト |
フロントマターの例
yaml
---
name: React Best Practices
description: Guidelines for writing clean React components
version: 2.1.0
author: React Community
license: MIT
platforms:
- claude-code
- codex
- chatgpt
categories:
- development
- frontend
tags:
- react
- javascript
- components
---
コンテンツ構造
推奨セクション
markdown
# Skill Name
## Context
Background information and domain knowledge.
## Guidelines
Specific rules and best practices.
## Do's and Don'ts
Clear behavioral guidance.
## Examples
Sample interactions or code snippets.
## References
Links to additional resources.
フォーマットのヒント
- 見出し(
#、##、###)を使用してコンテンツを整理 - ガイドラインには箇条書きを使用
- 例にはコードブロックを使用
- 重要なポイントには太字を使用
- 段落は簡潔に
プラットフォームフィールド
スキルがサポートするプラットフォームを指定:
yaml
platforms:
- claude-code # Claude Code CLI
- codex # Codex CLI
- chatgpt # ChatGPT Custom Instructions
カテゴリ
利用可能なカテゴリから選択:
技術:
development- 一般的な開発frontend- フロントエンド/UI開発backend- バックエンド/API開発devops- DevOps/インフラストラクチャdata- データサイエンス/分析ai-ml- AI/機械学習
プロフェッショナル:
marketing- マーケティング/コンテンツdesign- デザイン/UXlegal- 法務/コンプライアンスfinance- 財務/会計hr- 人事education- 教育/トレーニング
バリデーション
SKILL.mdは以下がバリデーションされます:
- 有効なYAMLフロントマター構文
- 必須フィールドの存在
- フィールド長の制限
- 有効なカテゴリ/プラットフォーム値
- Markdownフォーマット
完全な例
markdown
---
name: TypeScript Best Practices
description: Guidelines for writing type-safe, maintainable TypeScript code
version: 1.0.0
author: TypeScript Community
license: MIT
platforms:
- claude-code
- codex
categories:
- development
- frontend
- backend
tags:
- typescript
- javascript
- types
---
# TypeScript Best Practices
## Context
This skill provides guidelines for writing high-quality TypeScript code.
## Guidelines
### Type Safety
- Always define explicit types for function parameters
- Avoid using `any` type
- Use type guards for runtime checks
### Code Organization
- One export per file for main modules
- Group related types in a `types.ts` file
- Use barrel exports for public APIs
## Do's and Don'ts
### Do
- Use strict mode
- Define interfaces for object shapes
- Use generics for reusable code
### Don't
- Suppress TypeScript errors with `@ts-ignore`
- Use `any` as a quick fix
- Mix JavaScript and TypeScript in the same project
## Examples
### Good: Explicit Types
\`\`\`typescript
function greet(name: string): string {
return \`Hello, \${name}!\`;
}
\`\`\`
### Bad: Implicit Any
\`\`\`typescript
// Avoid this
function greet(name) {
return \`Hello, \${name}!\`;
}
\`\`\`