Creates new skills for Opencode following established conventions. Use when the user wants to create a new skill, extend an existing skill, or needs guidance on Opencode's skill architecture...
Guide for creating skills compatible with Opencode's agent system.
Skills in Opencode are modular knowledge packages that extend agent capabilities. They follow a structure optimized for both human review and agent consumption:
skill-name/
āāā SKILL.md # Core skill definition (metadata + core instructions)
āāā rules/ # Specific rules and patterns
ā āāā rule-1.md
ā āāā rule-2.md
āāā AGENTS.md # Expanded reference for agents
Use this skill when:
Opencode shares the context window across system prompt, conversation, skills metadata, and user requests.
Rule of thumb: Only add what Claude doesn't already know. Challenge every paragraph.
Required frontmatter:
---
name: skill-name
description: Clear description of what the skill does and when to use it. Include triggers.
---
Body sections:
Individual rule files for specific patterns. Each rule:
Frontmatter format:
---
title: Rule Title
impact: HIGH|MEDIUM|LOW
impactDescription: Brief impact statement
tags: tag1, tag2, tag3
---
Expanded reference document combining all rules. Optimized for:
Gather concrete examples from the user:
Determine:
mkdir -p skill-name/{rules,scripts,references,assets}
touch skill-name/SKILL.md skill-name/AGENTS.md
Frontmatter requirements:
name: kebab-case, descriptivedescription: Complete "when to use" - Claude reads only this for triggeringBody structure:
# Skill Name
## Overview
Brief description of what this skill provides.
## When to Use
List of triggers and contexts that activate this skill.
## Core Concepts
Essential domain knowledge (concise).
## Rules
Reference to rule files with brief context.
## Quick Reference
Common patterns and examples.
Create individual rule files in rules/:
Expand all rules into a single document for agent reference:
Verify:
skill-name/
āāā SKILL.md # Valid frontmatter, concise body
āāā rules/
ā āāā *.md # Valid frontmatter, code examples
āāā AGENTS.md # Full rule expansion
Keep SKILL.md under 500 lines. Move details to:
rules/*.md for specific patternsreferences/*.md for domain documentationscripts/*.sh or *.py for deterministic operationsls -F and frontmatter checkAfter creation:
rules/new-rule.md with frontmatter| Component | Purpose | Size Limit |
|---|---|---|
| SKILL.md | Triggering + core workflow | <500 lines |
| rules/*.md | Specific patterns | Unlimited |
| AGENTS.md | Full reference | Unlimited |
| scripts/* | Deterministic code | N/A |
| references/* | Domain docs | N/A |
kebab-case (e.g., react-best-practices)kebab-case with descriptive name (e.g., rerender-defer-reads.md)UPPERCASE.md for major docs (e.g., GUIDELINES.md)kebab-case.{sh,py,js}Skills are discovered via:
description matching user request.cursor/skills/, .agents/skills/, .opencode/skills/Ensure descriptions and tags cover: