skill-creation
Skill Creation Guide
Generate properly formatted SKILL.md files that help AI agents perform domain-specific tasks effectively.
File Structure
Every skill must have:
- YAML frontmatter with required fields
- Markdown body with clear instructions
- Progressive disclosure (concise main file, detailed references separate)
Optional directories:
scripts/: Executable code agents can run. Keep scripts self-contained or document dependencies, and include clear error handling.references/: On-demand documentation (for example,REFERENCE.md, templates, domain notes). Keep files focused and small for efficient context usage.assets/: Static resources such as templates, diagrams, and data files.
Recommended layout:
skill-name/
├── SKILL.md
├── scripts/ # Optional
├── references/ # Optional
├── assets/ # Optional
└── ...
Frontmatter Requirements
SKILL.md must start with YAML frontmatter, followed by Markdown instructions.
Required Fields
---
name: skill-name
description: What this skill does and when to use it.
---
name field rules:
- 1-64 characters
- Lowercase alphanumeric characters and hyphens only
- No leading/trailing hyphens
- No consecutive hyphens (
--) - Must match parent directory name
description field rules:
- 1-1024 characters
- Include WHAT the skill does
- Include WHEN to use it (trigger keywords)
- Be specific about use cases
Optional Fields
Optional frontmatter fields and constraints:
license: License name or reference to a bundled license filecompatibility: 1-500 characters when present; describe environment requirements only when neededmetadata: Key-value mapping for additional metadataallowed-tools: Space-delimited list of pre-approved tools (experimental; support varies by agent)
license: Apache-2.0
compatibility: Requires git, docker, and internet access
metadata:
author: org-name
version: "1.0"
allowed-tools: Bash(git:*) Bash(jq:*) Read
Body Content Guidelines
Structure:
- Clear overview of capability
- Step-by-step instructions
- Examples with inputs/outputs
- Edge cases and considerations
Best Practices:
- Keep main SKILL.md under 500 lines (~5000 tokens)
- Use bullet points for scanability
- Include code examples where helpful
- Reference external files for detailed content
- Write for progressive disclosure
Progressive Disclosure Pattern
Optimize for efficient context usage:
- Metadata (~100 tokens): name + description loaded at startup
- Instructions (<5000 tokens): Full SKILL.md loaded when activated
- Resources (as needed): Reference files loaded on demand
Move detailed content to separate files:
references/REFERENCE.md- Technical detailsscripts/- Executable codeassets/- Templates, data files
Common Patterns
Good Description Examples
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDFs, document extraction, or form filling.
description: Write automated tests using RSpec, Capybara, and FactoryBot for Rails applications. Use when implementing features, fixing bugs, or when testing is mentioned.
Poor Description Examples
description: Helps with PDFs. # Too vague, no trigger keywords
description: A comprehensive system... # Doesn't say what it does
File References
Use relative paths from skill root:
See [detailed reference](references/REFERENCE.md) for more.
Run the script: scripts/process.py
Keep references one level deep - avoid nested chains.
Validation Checklist
Before finalizing a SKILL.md:
- Frontmatter has valid
nameanddescription - Name matches directory name
- Name follows character rules (lowercase alphanumeric + hyphens, no
--) - Description includes both what and when
- Description has relevant trigger keywords
- Optional fields follow spec limits (
compatibility<= 500 chars,allowed-toolsis space-delimited) - Main body is under 500 lines
- Instructions are actionable and clear
- Examples included where helpful
- Detailed content moved to reference files
- File references use relative paths
Validate with skills-ref validate ./my-skill when available.
More from rolemodel/rolemodel-skills
bem-structure
Expert guidance for writing, refactoring, and structuring CSS using BEM (Block Element Modifier) methodology. Provides proper CSS class naming conventions, component structure, and Optics design system integration for maintainable, scalable stylesheets.
83optics-context
Use the Optics design framework for styling applications. Apply Optics classes for layout, spacing, typography, colors, and components. Use when working on CSS, styling views, or implementing design system guidelines.
37routing-patterns
Review, generate, and update Rails routes following professional patterns and best practices. Covers RESTful resource routing, route concerns for code reusability, shallow nesting strategies, and advanced route configurations.
28turbo-fetch
Implement dynamic form updates using Turbo Streams and Stimulus. Use when forms need to update fields based on user selections without full page reloads, such as cascading dropdowns, conditional fields, or dynamic option lists.
27stimulus-controllers
Create and register Stimulus controllers for interactive JavaScript features. Use when adding client-side interactivity, dynamic UI updates, or when the user mentions Stimulus controllers or JavaScript behavior.
26controller-patterns
Review and update existing Rails controllers and generate new controllers following professional patterns and best practices. Covers RESTful conventions, authorization patterns, proper error handling, and maintainable code organization.
26