Skill Architecture
Skills are discovered from four scopes with priority-based deduplication:Skill Structure
SKILL.md Format
Skills are defined inSKILL.md files with YAML frontmatter:
YAML Frontmatter Fields
Unique skill identifier (kebab-case)
Description shown in agent selection UI
MCP server configurations (stdio or HTTP)
Tool name patterns (glob-style wildcards)
Restrict skill to specific model providers
Built-in Skills
Oh My OpenCode includes 6 built-in skills:git-master
Source:src/features/builtin-skills/skills/git-master.tsLines: 1111 LOC
Description: Git expert combining commit architecture, rebase surgery, and history archaeology
Capabilities
Capabilities
Three Modes:
- COMMIT - Atomic commits with dependency ordering
- REBASE - History rewriting and conflict resolution
- HISTORY_SEARCH - Find when/where changes were introduced
- Multi-commit default (NEVER one giant commit)
- Style detection (semantic, plain, sentence, short)
- Language detection (Korean/English)
- Dependency ordering (utilities → models → services → API → config)
- Test/implementation pairing
- Interactive squash/reorder
- Autosquash workflow
- Rebase onto (branch update)
- Conflict resolution
- Pickaxe search (
git log -S) - Regex search (
git log -G) - Git blame
- Git bisect
- File history tracking
playwright
Source:src/features/builtin-skills/skills/playwright.ts:3Lines: 312 LOC
MCP:
@playwright/mcp@latestDescription: Browser automation via Playwright MCP
Features
Features
- Page navigation and interaction
- Element selection and manipulation
- Screenshots and PDF generation
- Network interception
- Multi-browser support
- Headless/headed modes
agent-browser
Source:src/features/builtin-skills/skills/playwright.ts:17Lines: 296 LOC (embedded in playwright.ts)
CLI:
agent-browserDescription: Browser automation via agent-browser CLI
Command Reference
Command Reference
Navigation:Snapshot (page analysis):Interactions (use @refs from snapshot):Get information:Screenshots & Recording:Sessions & Profiles:
playwright-cli
Source:src/features/builtin-skills/skills/playwright-cli.tsLines: 268 LOC
CLI:
playwright-cliDescription: Lightweight Playwright CLI wrapper
dev-browser
Source:src/features/builtin-skills/dev-browser/SKILL.mdLines: 221 LOC
Description: Development browser automation patterns
frontend-ui-ux
Source:src/features/builtin-skills/skills/frontend-ui-ux.ts:3Lines: 79 LOC
Description: Designer-turned-developer for stunning UI/UX
Design Principles
Design Principles
Work Principles:
- Complete what’s asked
- Leave it better
- Study before acting
- Blend seamlessly
- Be transparent
- Typography: Distinctive fonts (avoid Arial, Inter, Roboto, Space Grotesk)
- Color: Cohesive palettes with sharp accents
- Motion: High-impact moments, scroll-triggering, CSS-first
- Spatial: Unexpected layouts, asymmetry, generous negative space
- Generic fonts
- Cliched color schemes (purple gradients on white)
- Predictable layouts
- Cookie-cutter designs
Browser Provider Selection
Browser skills are selected viabrowser_automation_engine config:
playwright
Skill Discovery
Implemented insrc/features/opencode-skill-loader/ (25 files, ~3.2k LOC)
Discovery Process
Skill Loader Files
Core Files (6)
Core Files (6)
skill-discovery.ts- Multi-scope scanningskill-directory-loader.ts- Load from directoryskill-content.ts- YAML frontmatter parsingskill-deduplication.ts- Priority-based deduplicationskill-template-resolver.ts- Variable substitutionmerger.ts- Skill definition merging
MCP Integration (3)
MCP Integration (3)
skill-mcp-config.ts- MCP server extractionsrc/features/skill-mcp-manager/- MCP lifecycle (10 files)connection.ts- stdio/HTTP client management
Type Definitions (2)
Type Definitions (2)
types.ts- LoadedSkill, SkillDefinitionskill-definition-record.ts- SkillDefinitionRecord
Skill MCP Manager
Manages MCP servers embedded in skills. Source:src/features/skill-mcp-manager/manager.tsPattern: Per-session client lifecycle
Connection Types
Configuration
Disable Skills
Custom Skill Paths
Agent Skill Assignment
Creating Custom Skills
- Create
.opencode/skills/my-skill/SKILL.md:
- Skill auto-discovered on next session
- Assign to agents via config
Source Files
- Built-in Skills:
src/features/builtin-skills/skills/ - Skill Loader:
src/features/opencode-skill-loader/(25 files) - MCP Manager:
src/features/skill-mcp-manager/(10 files) - Skill SKILL.md:
src/features/builtin-skills/*/SKILL.md
Related
MCPs
MCP system and built-in servers
Hooks
Lifecycle hooks for extending behavior