skill-creator
Guide for creating effective opencode skills. Use for creating or updating skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations. Examples: - user: "Create a skill for git workflows" → define SKILL.md with instructions and examples - user: "Add examples to my skill" → follow the user: "query" → action pattern - user: "Update skill description" → use literal block scalar and trigger contexts - user: "Structure a complex skill" → organize with scripts/ and references/ directories - user: "Validate my skill" → check structure, frontmatter, and discovery triggers
What this skill does
# Skill Creator
Create opencode skills that extend agent capabilities with specialized knowledge and workflows.
<overview>
## What Skills Provide
- **Specialized workflows** - Multi-step procedures for specific domains
- **Tool integrations** - Instructions for file formats, APIs, libraries
- **Domain expertise** - Company-specific knowledge, schemas, business logic
- **Bundled resources** - Reusable scripts, references, and assets
## Skill Locations
| Scope | Path |
|-------|------|
| Project | `.opencode/skill/<name>/SKILL.md` |
| Global | `~/.config/opencode/skill/<name>/SKILL.md` |
- **Project skills**: Team-shared, repo-specific (e.g., `our-api-patterns`, `project-deploy`)
- **Global skills**: Personal tools for all projects (e.g., `pdf-editor`, `commit-helper`)
For project paths, OpenCode walks up from cwd to git worktree root.
</overview>
<structure>
## Skill Structure
```
skill-name/
├── SKILL.md # Required - frontmatter + instructions
├── scripts/ # Optional - executable code (Python/Bash)
├── references/ # Optional - docs loaded on-demand
└── assets/ # Optional - templates, images, fonts
```
### SKILL.md Format
```yaml
---
name: skill-name
description: [Self-contained workflow summary — see guidelines below]
---
# Instructions here (markdown body)
```
**Name**: Short, hyphen-case identifier. Should be descriptive but concise (max 64 chars).
**Description**: Agent sees this + the name before loading. Must be self-contained with:
- What workflow/capabilities it provides
- "Use proactively when" trigger contexts
- 3-5 concrete examples
**CRITICAL: The `description` field is the primary trigger mechanism.**
Skills are **SOPs/workflows**, NOT agents. DO NOT use role descriptions like "You are a..." or "[Role] expert."
Before loading, the agent sees only the **name** and **description** in `<available_skills>`:
```
<available_skills>
<skill>
<name>skill-name</name>
<description>...</description>
</skill>
</available_skills>
```
The description must be self-contained — agents won't load a skill just to "see what it does."
**Name + description should work together:**
- **Name**: Short, hyphen-case identifier (e.g., `typescript-advanced`)
- **Description**: Self-contained workflow summary with capabilities, triggers, and examples
**Description pattern (LLM-optimized):**
```yaml
---
name: skill-name
description: |-
[Action verb/capabilities]. Use for [specific cases]. Use proactively when [contexts].
Examples:
- user: "query" → action
- user: "query" → action
---
```
Dense, machine-parseable, specific. Avoid prose.
**CRITICAL YAML SYNTAX:** Multi-line descriptions with examples MUST use literal block scalar (`|-`). The hyphen strips the trailing newline. Do NOT use plain YAML with unquoted colons or lists:
```yaml
# ❌ WRONG - breaks YAML parsing
description: Handle plugins. Examples:
- user: "..." → action
# ✅ CORRECT - use |- for multi-line
description: |-
Handle plugins.
Examples:
- user: "..." → action
```
**Example:**
```yaml
---
name: typescript-advanced
description: |-
Handle TypeScript 5.9 advanced typing, generics, strict configs, type errors, migrations,
erasable syntax compliance, and test writing. Use proactively for complex generics,
conditional types, utility types, TS compiler config, or test authoring.
Examples:
- user: "Create a type-safe event emitter" → implement with generics and mapped types
- user: "Migrate to strict TypeScript" → add discriminated unions, exhaustive checks
- user: "Build typed API client from OpenAPI" → generate request/response types with inference
- user: "Write unit tests" → create strict, typed tests with realistic fixtures
---
```
**Requirements:**
- Start with action verb (NOT "You are" or "[Role] expert")
- List specific capabilities (vague "helps with X" = ignored)
- Include "Use proactively when" trigger contexts
- Provide 3-5 concrete `user: "..." → ...` examples
- Use `|-` literal block scalar for multi-line descriptions (plain YAML with lists/colons breaks parsing)
- Dense, LLM-parseable — description alone must justify loading
**Reduce redundancy:** Don't repeat description content in SKILL.md body.
### Bundled Resources
| Directory | Purpose | When to use |
|-----------|---------|-------------|
| `scripts/` | Reusable Python/Bash code | Same code rewritten repeatedly |
| `references/` | Docs, schemas, API specs | Info agent needs while working |
| `assets/` | Templates, images, fonts | Files used in output (not loaded) |
**MUST NOT include**: README.md, CHANGELOG.md, INSTALLATION_GUIDE.md, or other auxiliary docs. Skills contain only what the agent needs to do the job.
</structure>
<principles>
## Core Principles
### Be Concise
The context window is shared. Only add info the agent doesn't already have.
- Challenge each paragraph: "Does this justify its token cost?"
- Prefer examples over explanations
- SHOULD keep SKILL.md under 500 lines
### Match Freedom to Fragility
| Freedom Level | Format | Use When |
|---------------|--------|----------|
| High | Text instructions | Multiple valid approaches |
| Medium | Pseudocode/parameterized scripts | Preferred pattern exists |
| Low | Specific scripts | Fragile ops, consistency critical |
### Progressive Disclosure
1. **Metadata** (name + description) - Always loaded (~100 words)
- The `description` is the PRIMARY discovery mechanism
- Agents see this and decide whether to load the skill
- If description is vague, the skill will never be used
2. **SKILL.md body** - Loaded when skill triggers
- Core workflow and detailed instructions
- Keep focused on what the agent needs to do the work
3. **Bundled resources** - Loaded on-demand by agent
- Move variant-specific details to `references/`
Keep core workflow in SKILL.md. Move variant-specific details to `references/`.
**Example structure:**
```
cloud-deploy/
├── SKILL.md (workflow + provider selection)
└── references/
├── aws.md
├── gcp.md
└── azure.md
```
Agent loads only the relevant provider file.
</principles>
<workflow>
## Creation Process
1. **Understand** → Gather concrete usage examples
2. **Plan** → Identify reusable scripts/references/assets
3. **Initialize** → Create directory and SKILL.md manually
4. **Edit** → Write SKILL.md frontmatter + body, add resources
5. **Validate** → Verify the skill loads and triggers correctly
6. **Iterate** → Test, improve, repeat
### Step 1: Understand
Gather concrete examples of how the skill will be used. Ask:
- "What should this skill do?"
- "What requests should trigger it?"
- "Can you give example user queries?"
Skip only if usage patterns are already clear.
### Step 2: Plan
For each use case, identify reusable resources:
| If you find yourself... | Add to... |
|-------------------------|-----------|
| Rewriting same code | `scripts/` |
| Re-discovering schemas/docs | `references/` |
| Copying same templates | `assets/` |
**Examples:**
- `pdf-editor`: "Rotate this PDF" → `scripts/rotate_pdf.py`
- `bigquery`: "How many users today?" → `references/schema.md`
- `frontend-builder`: "Build me a todo app" → `assets/react-template/`
### Step 3: Initialize
Create the skill directory and SKILL.md manually:
```bash
# Global skill (personal tools)
mkdir -p ~/.config/opencode/skill/my-skill
# Project skill (team-specific)
mkdir -p .opencode/skill/my-skill
```
Create `SKILL.md` with frontmatter:
```yaml
---
name: my-skill
description: |-
[Workflow/capabilities]. Use for [specific cases]. Use proactively when [contexts].
Examples:
- user: "query" → action
- user: "query" → action
---
# [Skill Name]
[Instructions start here]
```
**Description template example:**
```yaml
---
name: typescript-advanced
description: |-
Handle TypeScript 5.9 advanced typing, generics, strict configs, type errors, migrations,
and test writing. Use proactively for complex generics, condiRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.