本文へ移動
cccskills
無料GitHub で公開

creating-skills

Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context injection and subagent execution.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md5.9 KB
  • references/official_best_practices.md5.3 KB
  • references/skill_examples.md4.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Creating skills

Guide for creating Claude Code skills following Anthropic's official best practices.

Quick start

# 1. Create skill directory
mkdir -p ~/.claude/skills/<skill-name>

# 2. Create SKILL.md with frontmatter
cat > ~/.claude/skills/<skill-name>/SKILL.md << 'EOF'
---
name: <skill-name>
description: <What it does>. Use when <trigger phrases>. <Key capabilities>.
---

# <Skill title>

<Instructions for the skill workflow>
EOF

# 3. Add optional resources as needed
mkdir -p ~/.claude/skills/<skill-name>/{scripts,references,assets}

SKILL.md structure

Frontmatter (YAML between --- markers)

FieldRequiredDescription
nameNoDisplay name. Defaults to directory name. Lowercase, hyphens, max 64 chars.
descriptionRecommendedWhat + when + capabilities. Max 1024 chars. Determines when Claude activates the skill.
allowed-toolsNoTools Claude can use without asking permission when skill is active.
argument-hintNoAutocomplete hint for arguments. Example: [issue-number]
disable-model-invocationNotrue to prevent auto-invocation (manual /name only).
user-invocableNofalse to hide from / menu (background knowledge only).
modelNoModel override when skill is active.
contextNofork to run in isolated subagent context.
agentNoSubagent type when context: fork. Built-in: Explore, Plan, general-purpose.
hooksNoLifecycle hooks scoped to this skill.

Invocation control matrix

ConfigurationUser can invokeClaude can invoke
(defaults)YesYes
disable-model-invocation: trueYesNo
user-invocable: falseNoYes

Description formula

<What it does>. Use when <trigger phrases>. <Key capabilities>.

Include action verbs ("create", "handle"), user intent ("wants to", "needs to"), and domain keywords users would say.

Directory structure

skill-name/
├── SKILL.md              # Required: instructions (keep under 500 lines)
├── scripts/              # Optional: executable code (deterministic, token-efficient)
├── references/           # Optional: docs loaded into context on demand
└── assets/               # Optional: files used in output, NOT loaded into context
                          #   (templates, images, fonts, boilerplate)

Progressive disclosure (3-level loading)

  1. Metadata (name + description) - always in context (~100 tokens per skill)
  2. SKILL.md body - loaded when skill triggers (keep under 5k words)
  3. Bundled resources - loaded as needed by Claude

Reference supporting files from SKILL.md so Claude knows they exist. Keep references one level deep. For files over 100 lines, include a table of contents.

Scripts vs references vs assets

TypePurposeLoaded into context?
scripts/Deterministic operations, complex processingNo (executed via bash)
references/Documentation Claude reads while workingYes, on demand
assets/Templates, images, fonts for outputNo (copied/used in output)

Only create scripts when they add value: complex multi-step processing, repeated code generation, deterministic reliability. Not for single-command wrappers.

Dynamic features

Context injection

Inject shell command output into skill content before loading:

## Recent commits
!`git log --oneline -5 2>/dev/null`

The output replaces the directive when the skill loads.

String substitutions

Pass arguments to skills invoked via /skill-name arg1 arg2:

VariableValue
$ARGUMENTSFull argument string
$ARGUMENTS[0], $ARGUMENTS[1]Individual arguments
$1, $2Shorthand for $ARGUMENTS[N]

Subagent execution

Run a skill in isolated context with context: fork:

---
name: deep-research
description: Research a topic thoroughly.
context: fork
agent: Explore
---

Degrees of freedom

Match specificity to the task's fragility:

LevelWhen to useExample
High (text instructions)Multiple valid approaches, context-dependent"Analyze the code and suggest improvements"
Medium (pseudocode/scripts with params)Preferred pattern exists, some variation OKScript with configurable parameters
Low (specific scripts, few params)Fragile operations, consistency criticalExact sequence of API calls

Naming conventions

  • Lowercase, hyphens between words, max 64 chars
  • Styles: gerund (processing-pdfs), noun phrase (github-pr-creation), prefixed group (github-pr-*)

Important rules

  • ALWAYS write descriptions that include WHAT + WHEN triggers + capabilities
  • ALWAYS keep SKILL.md under 500 lines, split to references when approaching
  • ALWAYS reference bundled files from SKILL.md so Claude discovers them
  • NEVER duplicate info between SKILL.md and reference files
  • NEVER create wrapper scripts for single commands
  • NEVER include extraneous files (README.md, CHANGELOG.md, INSTALLATION_GUIDE.md, QUICK_REFERENCE.md)
  • NEVER explain things Claude already knows (standard libraries, common tools, basic patterns)

References

  • references/official_best_practices.md - Principles, anti-patterns, quality checklist, testing
  • references/skill_examples.md - Concrete skill examples with new features

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Creates, supersedes and validates decision records (ADRs) against the convention a collection already follows, instead of imposing a published one. Use when the user wants to record a decision, write an ADR, supersede an existing decision, audit or lint a decisions folder, check that an ADR index is in sync, or asks "why did we decide X". Deduces the filename scheme, section set and status vocabulary from the records already there; ships a validator with an exit code, so the audit is a check and not an opinion.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Creates git commits following Conventional Commits format with type/scope/subject. Use when user wants to commit changes, create commit, save work, or stage and commit. Enforces project-specific conventions from CLAUDE.md.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing PRs, use github-pr-merge instead.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Merges GitHub Pull Requests after validating pre-merge checklist. Use when user wants to merge PR, close PR, finalize PR, complete merge, approve and merge, or execute merge. Runs pre-merge validation (tests, lint, CI, comments), confirms with user, merges with proper format, handles post-merge cleanup.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Handles PR review comments and feedback resolution. Use when user wants to resolve PR comments, handle review feedback, fix review comments, address PR review, check review status, respond to reviewer, verify PR readiness, review PR comments, analyze review feedback, evaluate PR comments, assess review suggestions, or triage PR comments. Fetches comments via GitHub CLI, classifies by severity, applies fixes with user confirmation, commits with proper format, replies to threads.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Prevents private infrastructure details (node hostnames, internal project names, local usernames and personal emails, absolute home paths, private and VPN IP ranges) from leaking into public repositories through commits, PRs, docs or release artifacts. Use when working in a public or soon-to-be-public repo, before commits or releases, when writing deployment docs for an OSS project, or when the user asks to "set up the privacy guard", "install privacy-guard", "check for leaks", "protect this public repo". Bootstraps a pre-commit hook backed by a gitignored local denylist plus gitleaks.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

fvadicamo のスキルをすべて見る

このスキルの問題を報告する