AgentSkillsCN

skill-creator

依据最佳实践创建并更新 Claude 技能。在构建新技能或优化现有技能时使用此方法。触发条件包括“技能创建”、“skill 创建”、“create skill”、“new skill”、“技能优化”。

SKILL.md
--- frontmatter
name: skill-creator
description: Create and update Claude skills following best practices. Use this when building new skills or improving existing ones. Triggers on "スキル作成", "skill作成", "create skill", "new skill", "スキル改善".
model: opus
context: fork
agent: general-purpose
allowed-tools: Read, Glob, Grep, Write, Edit, Bash(mkdir:*), WebFetch, WebSearch, Task

Skill Creator

Create effective skills that extend Claude's capabilities.

Core Principle

Claude is already very smart. Only add context Claude doesn't already have. Prefer concise examples over verbose explanations.

Official Documentation

Progressive Disclosure (3-Level Loading)

LevelWhatToken BudgetWhen Loaded
1. Metadataname + description~100 tokensAlways (all skills)
2. BodySKILL.md content<5000 tokensWhen skill triggers
3. Resourcesreferences/, scripts/, assets/UnlimitedOn-demand by Claude

Key insight: Keep SKILL.md lean. Move detailed content to references/.

Skill Structure

code
skill-name/
├── SKILL.md           # Required: frontmatter + instructions (<500 lines)
├── references/        # Optional: documentation (on-demand loading)
├── scripts/           # Optional: executable code
└── assets/            # Optional: templates, images

DO NOT create: README.md, CHANGELOG.md, or other auxiliary files.

SKILL.md Format

Frontmatter (Required)

yaml
---
name: kebab-case-name
description: [WHAT it does]. [WHEN to use]. Triggers on "english1", "english2", "日本語トリガー".
model: haiku|sonnet|opus
context: fork          # Required for Code Gen/Workflow, optional for Guidance
agent: general-purpose
allowed-tools: Read, Glob, Grep, Bash(specific:*)
---

Triggers must include both English AND Japanese for accessibility.

Field Constraints (Agent Skills Spec):

FieldRequiredConstraints
nameYes1-64 chars, lowercase + hyphens, must match folder name
descriptionYes1-1024 chars, WHAT + WHEN + Triggers

Model Selection (with numeric criteria):

ModelUse WhenCriteria
haikuRead-only guidance0 file writes, 0 external calls
sonnetCode generation1-3 steps, ≤2 external services
opusComplex workflows4+ steps OR 3+ services OR MCP tools

allowed-tools: Use specific patterns like Bash(git:*), Bash(gh:*), not generic Bash.

Invocation Control

yaml
disable-model-invocation: true  # User must invoke manually with /skill-name
user-invocable: false           # Only Claude can invoke (hidden from / menu)

When to use disable-model-invocation: true:

PatternExampleReason
Setup/Initrepository-setup, docusaurus-setupOne-time setup should be intentional
Release/Deployswift-releaseSide effects, requires user confirmation
Config changesautomation-configModifies project configuration
Complex creationswift-mcp-serverLarge-scale changes, user should control timing

When to keep default (auto-invocation allowed):

PatternExampleReason
Daily taskscommit-message, vigilare-taskFrequent use, "コミットメッセージ" triggers naturally
Code assistanceswift-development, documentationHelps during normal development flow
Workflow shortcutsgithub-workflow"Issue作って" should just work

Body

Concise instructions only. Move detailed content to references/.

When Invoked

Step 0: Research (if needed)

When to research:

  • Creating a new type of skill (no similar existing skill)
  • User asks for "best practices" or "latest patterns"
  • Unfamiliar domain or tool integration

Research targets (parallel):

TargetMethod
Agent Skills SpecWebFetch agentskills.io/specification
Existing skillsTask(Explore) in skills/ directory
Other marketplacesWebSearch "claude code skills marketplace"
Similar toolsWebSearch "{tool-name} claude skill"

Skip research when:

  • Simple modification to existing skill
  • Pattern already exists in this repository
  • User provides clear, complete requirements

Step 1: Gather Requirements

Essential:

  • What should the skill do?
  • Example usage scenarios?
  • What tools/commands are needed?

Invocation & scope:

  • Should it auto-invoke, or manual only? → disable-model-invocation
  • Who uses it? JP users, EN users, or both? → Triggers in description
  • Does it have side effects (deploy, release, config)? → manual only

Step 2: Determine Skill Type

Typecontext: forkmodelCriteriaExample
GuidanceOptionalhaiku0 writes, 0 servicesdocumentation
Code GenYessonnet1-3 steps, ≤2 servicesswift-development
WorkflowYesopus4+ steps OR 3+ services OR MCPvigilare-task

context: fork: Use for context isolation. Required for Code Gen/Workflow. Optional for Guidance when you want to avoid polluting the main conversation context.

Quick check: Does it use MCP tools? → opus. Does it write files? → sonnet+. Read-only? → haiku.

Step 3: Plan Structure

Identify:

  • Required allowed-tools with specific patterns
  • Reference files needed
  • Scripts or assets (if any)

Step 4: Create Skill

  1. Create directory: skills/{skill-name}/
  2. Create SKILL.md with proper frontmatter
  3. Create references/ if needed
  4. Add to .claude-plugin/marketplace.json

Step 5: Validate

Agent Skills Spec Compliance:

  • name: 1-64 chars, lowercase + hyphens only, matches folder
  • name: no leading/trailing hyphens, no consecutive hyphens (--)
  • description: 1-1024 chars, non-empty

Labee Standards:

  • description has WHAT + WHEN + Triggers (JP & EN)
  • allowed-tools uses specific patterns (not generic Bash)
  • model selected by numeric criteria (see references/output-patterns.md)
  • context: fork for workflow skills (sonnet/opus)
  • disable-model-invocation: true for setup/release/config skills

Context Efficiency:

  • SKILL.md body under 500 lines
  • No redundant explanations (Claude is smart)
  • Detailed content moved to references/
  • No non-existent reference files listed

Reference Files

Loading behavior:

  • Standard files: Claude loads on-demand when the task requires them
  • Auto-load files (_ prefix): Always loaded when skill triggers
FileLoad When
references/workflows.mdCreating skills with 3+ steps or conditional logic
references/output-patterns.mdDefining description format, allowed-tools patterns, or model selection
references/resource-patterns.mdDeciding scripts/ vs references/ vs assets/, implementing scripts
references/autonomous-refinement-loop.mdCreating skills that need self-correction (verify→fix→retry loops)

Session Learning Scripts

For Autonomous Refinement Loop enabled skills:

ScriptPurpose
scripts/init_session.tsInitialize session learning file
scripts/log_iteration.tsLog each verification attempt
scripts/finalize_session.tsFinalize session with learnings

Auto-load guidelines:

  • Use _ prefix for core rules that apply to ALL invocations (e.g., _core-rules.md)
  • Keep auto-load files small (<200 lines) to preserve token budget
  • Examples: documentation/_core-rules.md, research/_source-patterns.md