packages/opencode-swarm-plugin/examples/skill/skill-creator/SKILL.md
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. Helps codify learned patterns into reusable, discoverable skills.
npx skillsauth add joelhooks/swarm-tools skill-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
development
Patterns for testing code effectively. Use when breaking dependencies for testability, adding tests to existing code, understanding unfamiliar code through characterization tests, or deciding how to structure tests. Covers seams, dependency injection, test doubles, and safe refactoring techniques from Michael Feathers.
tools
Principles for building reusable coding systems. Use when designing modules, APIs, CLIs, or any code meant to be used by others. Based on "A Philosophy of Software Design" by John Ousterhout. Covers deep modules, complexity management, and design red flags.
development
Multi-agent coordination patterns for OpenCode swarm workflows. Use when working on complex tasks that benefit from parallelization, when coordinating multiple agents, or when managing task decomposition. Do NOT use for simple single-agent tasks.
development
Meta-skill for generating new skills with proper format and structure. Use when creating new skills for the swarm system or when agents need to generate skill scaffolds. Ensures skills follow conventions (frontmatter format, directory structure, bundled resources).