Guide for creating effective agent skills. Use when you want to create a new skill, improve an existing skill, or learn best practices for skill development...
This skill provides guidance for creating effective skills that extend agent capabilities with specialized knowledge, workflows, and tools.
Skills are modular, self-contained packages that extend agent capabilities by providing:
Think of skills as "onboarding guides" that transform a general-purpose agent into a specialized one equipped with procedural knowledge.
Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
āāā SKILL.md (required)
ā āāā YAML frontmatter (name, description, tags, tools)
ā āāā Markdown instructions
āāā Bundled Resources (optional)
āāā scripts/ - Executable code (run with skills_execute)
āāā references/ - Documentation (load with skills_read)
Skills use a three-level loading system:
Keep SKILL.md lean. Move detailed content to references/.
Before creating, understand concrete examples:
Ask clarifying questions if scope is unclear.
Use skills_init to create the full template structure:
skills_init(
name: "my-skill",
description: "Initial description",
directory: ".opencode/skills"
)
This creates:
Fill in the TODO placeholders. Key sections:
Frontmatter - Critical for discoverability:
---
name: my-skill
description: What it does and WHEN to use it. Be specific about triggering scenarios.
tags:
- category
- domain
tools:
- tool_names_used
---
When to Use - Specific triggering scenarios:
## When to Use This Skill
- When working on X type of task
- When files matching Y pattern are involved
- When the user asks about Z topic
Instructions - Actionable, imperative form:
## Instructions
1. Read the configuration file first
2. Check for existing patterns before creating
3. Always validate output before completing
Examples - Realistic user requests:
## Examples
### Example: Realistic Scenario
**User**: "Help me do X"
**Process**:
1. First step
2. Second step
3. Final step
scripts/ - Executable helpers:
skills_executereferences/ - On-demand documentation:
skills_readskills_use to load the skillThe name and description determine when the skill triggers:
Good descriptions:
Bad descriptions:
Use imperative/infinitive form throughout:
| Tool | Use When |
|---|---|
skills_init |
Want full template structure with TODOs |
skills_create |
Have complete content ready to write |
swarm_learn |
Converting learned patterns to skills |
| Tool | Use For |
|---|---|
skills_list |
Discover available skills |
skills_use |
Activate a skill by loading its content |
skills_read |
Load a reference file from a skill |
skills_update |
Modify an existing skill |
skills_delete |
Remove an obsolete skill |
| Tool | Use For |
|---|---|
skills_execute |
Run a script from a skill |
skills_add_script |
Add a new script to a skill |
When you discover something reusable during work:
swarm_learn - Document the learningcreate_skill=true or skills_initSkills make swarms smarter over time by preserving learned knowledge for future agents.