Agent skill
opencode-skill-generator
Generate OpenCode configuration components and skills. Use this skill when you need to create or update OpenCode agents, commands, MCP servers, plugins, tools, or full agent skills following the official opencode.json schema. Supports generating supagents, commands, mcp configs, frontmatter, plugins, and tool mappings.
Install this agent skill to your Project
npx add-skill https://github.com/billlzzz10/bl1nk-mood/tree/main/.opencode/skill/opencode-skill-generator
SKILL.md
OpenCode Skill & Component Generator
This skill provides specialized workflows for generating valid OpenCode configuration snippets and full skill structures based on the opencode.json schema.
Component Generation Guide
When generating components, always refer to the schema in references/schema.json.
1. Supagent (Agent Configuration)
Agents are defined in the agent object.
- Subagent Example:
json
"researcher": { "model": "anthropic/claude-3-5-sonnet", "prompt": "You are a research assistant...", "mode": "subagent", "tools": { "websearch": true } } - Primary Agent Example:
json
"manager": { "model": "anthropic/claude-3-5-opus", "prompt": "You manage the workflow...", "mode": "primary" }
2. Command
Commands go into the command object.
- Example:
json
"review": { "template": "Please review the following code: {{selection}}", "description": "Reviews the selected code block", "agent": "reviewer" }
3. MCP (Model Context Protocol)
- Local Server:
json
"my-local-mcp": { "type": "local", "command": ["python", "/path/to/server.py"], "enabled": true } - Remote Server:
json
"my-remote-mcp": { "type": "remote", "url": "https://mcp.example.com", "enabled": true }
4. Frontmatter
Every Skill must start with this block:
---
name: name-of-skill
description: Comprehensive description for triggering.
---
5. Plugin
List of plugin names:
"plugin": [
"opencode-plugin-git",
"opencode-plugin-search"
]
6. Agent Skill (Folder Structure)
When creating a full skill:
- Create directory:
skills/<namespace>/<skill-name>/ - Create
SKILL.mdwith YAML frontmatter. - (Optional) Create
scripts/,references/,assets/.
7. Tool
Enable tools in the tools config:
"tools": {
"edit": true,
"bash": true
}
Workflow
- Identify the component type requested.
- Read references/schema.json for the exact property paths and constraints.
- Generate the JSON/YAML/Markdown content.
- For skills, verify the directory structure follows the standard.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
auto-duplicate-fixer
Automate detection and removal of duplicate files/functions in TypeScript, JavaScript, and Python projects. Safely refactor imports, validate with tests, and deploy changes with zero risk of breaking the system.
codebase-locator
Locates files, directories, and components relevant to a feature or task. Call `codebase-locator` with human language prompt describing what you're looking for. Basically a "Super Grep/Glob/LS tool" — Use it if you find yourself desiring to use one of these tools more than once.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?