This guide explains how to scaffold a Claude Code skill with YAML frontmatter, optional scripts, references, and assets. It provides a reusable SKILL.md template, validation criteria, organizational patterns, and examples for creating and packaging a skill.
91%
Does it follow best practices?
Impact
100%
2.00x1 of 3 eval scenarios. Add 2 more for a full score.
Low
Low-risk findings worth noting
Generate new Claude Code skills with correct directory structure, YAML frontmatter, and optional bundled resources.
skill-name/
├── SKILL.md # Required: Main skill file with YAML frontmatter
├── scripts/ # Optional: Executable code for deterministic tasks
├── references/ # Optional: Documentation loaded contextually
└── assets/ # Optional: Templates, images, boilerplate (not loaded into context)Create a new skill called "my-skill-name" in ~/.claude/skills/Or with a specific purpose:
Create a skill for generating release notes from git commits,
with templates for CHANGELOG.md and Slack announcementsOr via the initialization script:
python3 ${CLAUDE_SKILL_DIR}/scripts/init_skill.py <skill-name> --path <output-directory>The created SKILL.md follows this structure:
---
name: skill-name
description: "What the skill does. Use when [trigger conditions]."
effort: medium
# add disable-model-invocation: true for workflows with side effects
---
# Skill Name
## When to Use
- Trigger condition 1
- Trigger condition 2
## What This Skill Does
1. **Step 1**: Description
2. **Step 2**: Description
## How to Use
[Usage examples]
## Example
**User**: "Example prompt"
**Output**: [Example output]After creation, verify:
name is kebab-case and equals the directory name; description is a quoted string with a "Use when" clause, key use case first; only documented keys; argument-hint if the body uses \$ARGUMENTSpython3 ${CLAUDE_SKILL_DIR}/scripts/package_skill.py <path/to/skill-folder> [output-directory]| Pattern | Best For | Structure |
|---|---|---|
| Workflow-Based | Sequential procedures | Step-by-step instructions |
| Task-Based | Multiple operations | Collection of tasks |
| Reference/Guidelines | Standards, specs | Rules and examples |
| Capabilities-Based | Interrelated features | Feature descriptions |
User: "Create a skill for generating release notes with 3 output formats"
Steps:
init_skill.py release-notes-generator --path ~/.claude/skills/assets/: changelog-template.md, pr-release-template.md, slack-template.mdreferences/: tech-to-product-mappings.mdSKILL.md with usage instructionspackage_skill.py ~/.claude/skills/release-notes-generatorreferences/ for domain knowledge that doesn't change oftenassets/ so they're not auto-loaded into contextdisable-model-invocation: true on skills that commit, push, deploy, or deletef97e4f7
python3init_skill.pypackage_skill.pyIf you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.