install_skill_or_agent
Install a skill as SKILL.md or register an MCP server in opencode.json to add capabilities to an OpenCode workspace.
Instructions
Install a skill or register an MCP server into an OpenCode workspace. For itemType='skill' this writes ${workspacePath}/.opencode/skills//SKILL.md, downloading it from sourceUrl or generating a documented boilerplate when sourceUrl is omitted. For itemType='mcp-server' this merges mcpConfig into ${workspacePath}/opencode.json under mcp., creating the file when needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Identifier for the skill directory or the mcp config key. Letters, digits, dots, underscores and dashes only. | |
| itemType | Yes | What to install. | |
| mcpConfig | No | MCP server entry to merge into opencode.json, e.g. {"type":"local","command":["npx","-y","my-server"],"enabled":true}. Omit to receive a placeholder entry. | |
| sourceUrl | No | Optional http(s) URL of a SKILL.md to download. GitHub blob/API URLs are automatically converted to raw URLs. Omit to generate a boilerplate skill. | |
| workspacePath | Yes | Absolute path (or path relative to the home directory) of the target project. |