This project demonstrates OpenCode's extensibility features: agents, subagents, commands, and skills.
The opencode.json enables the opencode-skills plugin:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-skills"],
"tools": {
"skills_*": false,
"skills_weather": true,
"skills_copywriting": true,
"skills_prompt-engineer": true,
"skills_agent-architect": true
}
}Restart OpenCode after cloning this repo to load everything.
| Feature | What it is | How to use |
|---|---|---|
| Primary Agent | Main conversation handler with custom behavior | Press Tab to switch |
| Subagent | Delegated task handler, can run in parallel | Type @name or auto-invoked |
| Command | Reusable prompt template | Type /name |
| Skill | External tool with bundled scripts/resources | Auto-invoked as skills_name tool |
Location: .opencode/skills/prompt-engineer/
Create production-ready prompts using a systematic 5-phase methodology.
Phases:
- Requirements Gathering (TASK, CONTEXT, OUTPUT, CONSTRAINTS, EDGE CASES)
- Structure Design (pattern selection)
- Prompt Construction (XML-tagged blocks)
- Validation (automated checks)
- Output Generation (save to
prompts/)
Structure:
prompt-engineer/
├── SKILL.md # Core instructions
├── references/
│ ├── prompt-patterns.md # PTF, COST, STAR, RRET, CoT, Few-Shot, ReAct, Constitutional
│ ├── anti-patterns.md # What to avoid
│ └── evaluation-rubric.md # Quality scoring
├── scripts/
│ └── validate-prompt.ts # Validation with token counting
└── assets/
└── prompt-template.md # Ready-to-use template
Usage:
# Validate a prompt
npx tsx .opencode/skills/prompt-engineer/scripts/validate-prompt.ts prompts/my-prompt.mdLocation: .opencode/skills/agent-architect/
Design and generate OpenCode agents with proper configuration, permissions, and MCP integration.
Features:
- Primary vs subagent mode selection
- Tool permission patterns (read-only, git-scoped, package management)
- MCP tools configuration
- Integration with prompt-engineer for system prompts
- Quality metrics and validation
Usage:
# Create a new agent
npx tsx .opencode/skills/agent-architect/scripts/init.ts my-reviewer
# Validate an agent
npx tsx .opencode/skills/agent-architect/scripts/validate.ts .opencode/agent/my-reviewer.mdLocation: .opencode/skills/copywriting/
A real-world skill for writing high-converting copy using proven marketing frameworks. This is a complete example of a production-ready skill with workflows, references, and validation.
Frameworks included:
- AIDA, PAS, BAB, FAB, 4Ps, SCQA, 4Cs (copywriting formulas)
- Schwartz's 5 Stages of Awareness
- Cialdini's 7 Principles of Persuasion
- StoryBrand SB7 Framework
- Harry Dry's Three Rules (Visualize, Falsify, Unique)
- 4U's Headline Scoring
Structure:
copywriting/
├── SKILL.md # Decision tree + workflows
├── references/
│ ├── formulas.md # All 7 copywriting formulas
│ ├── awareness.md # Schwartz's 5 stages
│ ├── persuasion.md # Cialdini's principles
│ ├── positioning.md # StoryBrand, Three Rules
│ └── validation.md # 4U's, checklist, red flags
└── scripts/
└── validate-copy.ts # CLI quality validation
Usage:
# Validate copy quality
npx tsx .opencode/skills/copywriting/scripts/validate-copy.ts "Your headline here"
# Or invoke via the copywriter agent
@copywriter Write a headline for a project management toolExample output:
Copy: "Replace stand-ups with a 1-page live plan."
Framework: PAS (Problem → Agitate → Solution)
Startup founders are problem-aware, so PAS names the pain quickly
and presents a concrete solution.
Validation: Score 3.3/4 — passed with no red flags.
Location: .opencode/skills/weather/
Fetches current weather using the Open-Meteo API. Demonstrates skills as executable external tools.
Usage:
npx tsx .opencode/skills/weather/scripts/get-weather.ts "London"Location: .opencode/agent/ask.md
A read-only codebase explorer. Ask questions about the codebase without making changes.
Usage: Press Tab to switch to the ask agent.
Location: .opencode/agent/copywriter.md
Writes user-facing copy using proven marketing frameworks. Works with the copywriting skill to apply formulas like AIDA, PAS, and StoryBrand, then validates output quality.
Usage: Type @copywriter write a headline for our new feature
What it does:
- Loads the copywriting skill with frameworks
- Assesses audience awareness level (for headlines/long-form)
- Selects appropriate formula
- Generates copy
- Validates with the 4U's scoring
- Explains which framework was used and why
Location: .opencode/command/eli5.md
Explains concepts in simple terms.
Usage: /eli5 what is a database?
| Directory | Purpose |
|---|---|
prompts/ |
Generated prompts from prompt-engineer skill |
.opencode/agent/ |
Agent definitions |
.opencode/command/ |
Command definitions |
.opencode/skills/ |
Skill definitions |
- Agents - Primary agents and subagents
- Commands - Custom slash commands
- Skills - External tools with the opencode-skills plugin
- Config - Configuration options
Each agent/command can use a different model:
| Component | Model | Rationale |
|---|---|---|
| Default | claude-opus-4.5 |
Complex tasks |
small_model |
claude-haiku-4.5 |
Lightweight tasks |
| ask agent | claude-haiku-4.5 |
Read-only, lower cost |
| copywriter | gpt-5 |
Creative writing |
Set models in frontmatter (model: provider/model-name) or in opencode.json.
By default, skills are disabled (skills_*: false). Enable specific skills:
{
"tools": {
"skills_*": false,
"skills_weather": true,
"skills_copywriting": true,
"skills_prompt-engineer": true,
"skills_agent-architect": true
}
}