Core Principles
Concise is Key
The context window is a public good. Skills share it with system prompts, conversation history, and user requests. Default assumption: the agent is already very smart. Only add context the agent doesnβt already have. Challenge each piece of information: βDoes the agent really need this explanation?β Prefer concise examples over verbose explanations.Progressive Disclosure
Skills use a three-level loading system:- Metadata (name + description) - Always in context (~100 words)
- SKILL.md body - When skill triggers (less than 5k words)
- Bundled resources - As needed (unlimited)
Skill Structure
Every skill consists of:SKILL.md Frontmatter
The YAML frontmatter triggers your skill:- Include both what the skill does AND when to use it
- Include all βwhen to useβ information in the description (not in the body)
- The body is only loaded after triggering
Bundled Resources
Scripts (scripts/)
Executable code for tasks requiring deterministic reliability:
- When to use: Repeatedly rewritten code or deterministic operations
- Example:
scripts/rotate_pdf.pyfor PDF rotation - Benefits: Token efficient, may execute without loading into context
References (references/)
Documentation loaded as needed:
- When to use: Documentation the agent should reference while working
- Examples: API docs, database schemas, company policies
- Benefits: Keeps SKILL.md lean, loaded only when needed
- Best practice: Include grep patterns in SKILL.md for large files (>10k words)
Assets (assets/)
Files used in output, not loaded into context:
- When to use: Files that will be used in final output
- Examples: Templates, images, boilerplate code, fonts
- Benefits: Separates output resources from documentation
Creation Process
Step 1: Understand with Examples
Gather concrete examples of how the skill will be used:- What functionality should it support?
- What would users say to trigger it?
- Can you give specific usage examples?
Step 2: Plan Reusable Contents
Analyze examples to identify:- What scripts would avoid rewriting code?
- What references would provide needed context?
- What assets would be used in output?
Step 3: Initialize the Skill
Run the initialization script:Step 4: Edit the Skill
- Add reusable resources - Create scripts, references, and assets
- Test scripts - Run them to ensure they work
- Write SKILL.md - Include instructions for using the skill
- Keep it concise - Aim for less than 500 lines in SKILL.md
- Use imperative/infinitive form
- Include only essential information
- Link to references for detailed content
Step 5: Package the Skill
Package your skill for distribution:.skill file (a zip with .skill extension).
Step 6: Iterate
- Use the skill on real tasks
- Notice struggles or inefficiencies
- Update SKILL.md or resources
- Test again
Progressive Disclosure Patterns
Keep SKILL.md under 500 lines. When approaching this limit:Pattern 1: High-level guide with references
Pattern 2: Domain-specific organization
Pattern 3: Conditional details
What NOT to Include
Do not create:- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
Skill Naming
- Use lowercase letters, digits, and hyphens only
- Keep under 64 characters
- Prefer short, verb-led phrases
- Namespace by tool when helpful (e.g.,
gh-address-comments) - Name the folder exactly after the skill name