← スキル䞀芧に戻る
ShunsukeHayashi

agent-skill-use

by ShunsukeHayashi

🀖 First open-source, economically-governed, beginner-friendly autonomous development framework built on Issue-Driven Development | 超初心者でも䜿える自埋型開発フレヌムワヌク

⭐ 13🍎 8📅 2026幎1月24日
GitHubで芋るManusで実行

SKILL.md


name: agent-skill-use description: Create and manage AI agent skills following best practices. Use when creating new skills, optimizing context, designing multi-agent systems, or implementing progressive disclosure patterns. allowed-tools: Bash, Read, Write, Grep, Glob, Edit

Agent Skill Use

Version: 1.0.0 Purpose: ベストプラクティスに基づく゚ヌゞェントスキルの䜜成・管理


Triggers

TriggerExamples
Skill Creation"create agent skill", "スキル䜜成", "new skill"
Context Optimization"optimize context", "コンテキスト最適化"
Multi-Agent Design"design multi-agent", "マルチ゚ヌゞェント蚭蚈"
Best Practices"agent best practices", "ベストプラクティス"

Reference Document

.claude/docs/AGENT_BEST_PRACTICES.md

このスキルは䞊蚘ドキュメントのパタヌンを実装したす。


Core Concepts

1. 䞉局アヌキテクチャ

┌──────────────┬─────────────────┬─────────────────┬─────────────────┐
│              │      MCP        │     Skills      │   Subagents     │
├──────────────┌─────────────────┌─────────────────┌──────────────────
│ Primary Role │ External        │ Task            │ Context         │
│              │ Connection      │ Specialization  │ Isolation       │
├──────────────┌─────────────────┌─────────────────┌──────────────────
│ Context      │ High (all tools │ Low (metadata   │ Separate        │
│ Impact       │ loaded)         │ first)          │ window          │
├──────────────┌─────────────────┌─────────────────┌──────────────────
│ Best For     │ API calls,      │ Workflows,      │ Parallel tasks, │
│              │ data access     │ procedures      │ isolation       │
└──────────────┮─────────────────┮─────────────────┮─────────────────┘

2. Progressive Disclosure

Layer 1: Index Only (~500 tokens)     ← Always loaded
    ↓
Layer 2: Skill Metadata (~1,000)      ← On demand
    ↓
Layer 3: Full Content (~5,000)        ← When activated

Workflow: Skill Creation

Phase 1: 芁件定矩

Step 1.1: スキルの目的を明確化

質問リスト:
1. このスキルは䜕を達成したすか
2. どのようなトリガヌで起動したすか
3. 必芁な入力は䜕ですか
4. 期埅する出力は䜕ですか
5. どのツヌルが必芁ですか

Step 1.2: カテゎリの遞択

CategoryUse Case
Task Automation繰り返しタスクの自動化
Code Qualityレビュヌ・テスト・リファクタ
DevOpsデプロむ・監芖・むンフラ
Contentドキュメント・コンテンツ生成
Integration倖郚サヌビス連携

Phase 2: 構造蚭蚈

Step 2.1: ディレクトリ䜜成

mkdir -p .claude/skills/[skill-name]/resources
mkdir -p .claude/skills/[skill-name]/scripts

Step 2.2: 必須ファむル構成

.claude/skills/[skill-name]/
├── SKILL.md              # Required: メむン定矩
├── resources/            # Optional: 参照ドキュメント
│   ├── templates.md      # テンプレヌト集
│   └── examples.md       # 䜿甚䟋
└── scripts/              # Optional: 実行スクリプト
    └── helper.sh         # ヘルパヌスクリプト

Phase 3: SKILL.md䜜成

Step 3.1: Frontmatter

---
name: "kebab-case-name"           # Required
description: "[Action] [Object]. Use when [trigger]."  # Required
allowed-tools: Bash, Read, Write  # Required
version: "1.0.0"                  # Optional
triggers:                         # Optional (for documentation)
  - "/command"
  - "natural language trigger"
dependencies:                     # Optional
  - "other-skill"
mcp_tools:                        # Optional (wrapped MCP tools)
  - "github.issues"
---

Step 3.2: 構造テンプレヌト

# [Skill Title]

**Version**: X.Y.Z
**Purpose**: [One-line purpose]

---

## Triggers

| Trigger | Examples |
|---------|----------|
| [Category] | "[EN]", "[JP]" |

---

## Workflow

### Phase 1: [Title]

#### Step 1.1: [Substep]
[Instructions]

---

## Best Practices

✅ GOOD: [Pattern]
❌ BAD: [Anti-pattern]

---

## Checklist

- [ ] [Item 1]
- [ ] [Item 2]

Phase 4: MCP Tool Wrapping

Step 4.1: ツヌルをスキル内にラップ

<!-- SKILL.md内 -->

## Integrated Tools

This skill wraps the following MCP tools:

| Tool | Purpose |
|------|---------|
| `github.issues.create` | Issue䜜成 |
| `github.prs.review` | PRレビュヌ |

### Tool Usage

Tool definitions are loaded only when this skill is activated,
following progressive disclosure pattern.

Step 4.2: Tool Index (Full Definitionではなく)

<!-- resources/tool-index.md -->

# Tool Index

## Available Tools
- `tool.name` - Brief description
- `tool.name2` - Brief description

Full definitions loaded on demand.

Phase 5: Subagent統合必芁な堎合

Step 5.1: Subagent䜿甚刀断

Task received
    │
    ▌
┌─────────────────┐
│ Parallel tasks  │──Yes──► Use Subagent
│ (>3 independent)│
└────────┬────────┘
         │ No
         ▌
┌─────────────────┐
│ Security        │──Yes──► Use Subagent
│ isolation needed│
└────────┬────────┘
         │ No
         ▌
┌─────────────────┐
│ Long-running    │──Yes──► Use Subagent
│ background task │
└────────┬────────┘
         │ No
         ▌
Use Skills instead (default)

Step 5.2: Subagent Spawn定矩

# agents/[agent-name]/AGENT.md frontmatter
---
name: "parallel-executor"
type: "subagent"
spawn_conditions:
  - "independent_tasks > 3"
  - "explicit_parallel_request"
context_inheritance: "minimal"
---

Workflow: Context Optimization

Step 1: 珟状分析

# スキル数ずサむズを確認
find .claude/skills -name "SKILL.md" -exec wc -l {} \;

# MCPツヌル数を確認
grep -r "mcp_tools" .claude/skills/

Step 2: Index䜜成

<!-- .claude/overview.md -->
---
version: "1.0"
last_updated: "YYYY-MM-DD"
---

# Project Agent Configuration

## Available Skills

| Skill | Description | Triggers |
|-------|-------------|----------|
| skill-1 | Brief desc | /cmd, "phrase" |
| skill-2 | Brief desc | /cmd, "phrase" |

## Loading Rules

1. Always load: This overview only
2. On skill trigger: Load SKILL.md metadata
3. On execution: Load full skill content

Step 3: Token削枛の確認

MetricTarget
Base context<15,000 tokens
Skill load time<500ms
Token reduction>30%

Workflow: Multi-Agent Design

Team Structure

┌─────────────┐
│ Coordinator │
│   (Lead)    │
└──────┬──────┘
       │
┌──────┎──────┬───────────────┐
│             │               │
▌             ▌               ▌
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Planning │ │ Execution│ │  Review  │
│  Team    │ │   Team   │ │   Team   │
└──────────┘ └──────────┘ └──────────┘

A2A Message Format

{
  "message_id": "uuid-v4",
  "from_agent": "coordinator",
  "to_agent": "execution-team",
  "intent": "execute_task",
  "payload": {
    "task_id": "task-123",
    "description": "Task description",
    "priority": "high"
  }
}

Naming Rules

Required

RuleExample
Kebab-casemy-skill
Lowercasecode-reviewer
Descriptivetest-generator

Forbidden

WordReason
claudeTrademark
anthropicCompany name
mcpProtocol name

Validation Checklist

Structure

  • Directory at .claude/skills/[name]/
  • SKILL.md has valid frontmatter
  • Name is kebab-case, no forbidden words

Content

  • Description has action + trigger
  • Triggers cover EN and JP
  • Steps are clear and actionable
  • Best practices documented

Integration

  • MCP tools wrapped (not loaded directly)
  • Subagent criteria defined (if needed)
  • Index updated in overview.md

Quick Reference

Create New Skill

# 1. Create directory
mkdir -p .claude/skills/my-skill/resources

# 2. Create SKILL.md
cat > .claude/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: Does X. Use when Y.
allowed-tools: Bash, Read, Write
---

# My Skill

**Version**: 1.0.0
**Purpose**: [Purpose]

## Workflow

### Step 1: [Title]
[Instructions]
EOF

# 3. Update overview
echo "| my-skill | Does X | /my, \"do x\" |" >> .claude/overview.md

Validate Skill

# Check frontmatter
head -n 6 .claude/skills/my-skill/SKILL.md

# Test trigger (in Claude)
# "do x" → Skill should activate

  • .claude/docs/AGENT_BEST_PRACTICES.md - 完党なベストプラクティス
  • .claude/skills/skill-creator/SKILL.md - 基本スキル䜜成
  • .claude/skills/README.md - スキルむンデックス

スコア

総合スコア

75/100

リポゞトリの品質指暙に基づく評䟡

✓SKILL.md

SKILL.mdファむルが含たれおいる

+20
✓LICENSE

ラむセンスが蚭定されおいる

+10
✓説明文

100文字以䞊の説明がある

+10
○人気

GitHub Stars 100以䞊

0/15
✓最近の掻動

3ヶ月以内に曎新

+5
○フォヌク

10回以䞊フォヌクされおいる

0/5
✓Issue管理

オヌプンIssueが50未満

+5
✓蚀語

プログラミング蚀語が蚭定されおいる

+5
✓タグ

1぀以䞊のタグが蚭定されおいる

+5

レビュヌ

💬

レビュヌ機胜は近日公開予定です