From agent-alchemy-opencode-tools
Updates existing OpenCode agents to current platform best practices, fixes deprecated patterns like invalid frontmatter, and validates results. Useful for modernizing agent files on update or migration requests.
npx claudepluginhub sequenzia/agent-alchemy --plugin agent-alchemy-opencode-toolsThis skill is limited to using the following tools:
You are initiating the OpenCode agent update workflow. This process locates an existing agent, researches current platform best practices, analyzes the agent for outdated patterns, and applies updates with validation.
Guides interactive creation of OpenCode-compatible agents via structured interview for name, purpose, mode, model tier, temperature, steps; configures permissions, generates and validates markdown file.
Audits Claude Code agents for violations, gaps, and improvements across 7 dimensions like description quality and frontmatter, outputting structured repair plans.
Evolves existing agent definitions by refining persona/skills/tools in-place or creating advanced variants, assessing best practices, updating metadata, and syncing registry. Use for outdated skills, feedback gaps, tool changes, or scope sharpening.
Share bugs, ideas, or general feedback.
You are initiating the OpenCode agent update workflow. This process locates an existing agent, researches current platform best practices, analyzes the agent for outdated patterns, and applies updates with validation.
IMPORTANT: You MUST use the AskUserQuestion tool for ALL questions to the user. Never ask questions through regular text output.
Read the OpenCode platform overview and agent guide:
${CLAUDE_PLUGIN_ROOT}/references/platform-overview.md${CLAUDE_PLUGIN_ROOT}/references/agent-guide.mdFind the agent to update.
If $ARGUMENTS is provided:
{name}.md in known directoriesIf no arguments:
Glob for .opencode/agents/*.mdGlob for ~/.config/opencode/agents/*.mdAskUserQuestion:
Read the selected agent file and store its contents.
Spawn the researcher agent to check latest documentation:
Task:
subagent_type: "agent-alchemy-opencode-tools:oc-researcher"
prompt: |
Research the latest OpenCode documentation for agent format compatibility.
Artifact type: agent
Current artifact content:
---
{contents of the agent file}
---
Specific questions:
1. Are there any new agent frontmatter fields?
2. Have permission syntax rules changed?
3. Are there new agent modes or capabilities?
4. Any changes to subagent behavior or limitations?
Reference guide: ${CLAUDE_PLUGIN_ROOT}/references/agent-guide.md
Compare the existing agent against current best practices:
| Issue | Detection | Fix |
|---|---|---|
name field present | Should not exist — name from filename | Remove |
skills field present | Skills not assignable to agents | Remove |
Invalid mode value | Must be primary, subagent, or all (default: all) | Fix or default to all |
| Wrong model format | Must be provider/model-id | Convert |
| Temperature out of range | Must be 0.0-1.0 | Clamp to valid range |
top_p out of range | Must be 0.0-1.0 if present | Clamp to valid range |
| Invalid permission syntax | Values must be allow/ask/deny/true/false | Fix syntax |
Missing description | Required field | Add based on agent content |
| Issue | Detection | Fix |
|---|---|---|
Subagent uses question | Subagents can't use question tool | Add note or restructure |
| Claude Code tool names | AskUserQuestion instead of question | Convert to OpenCode names |
mcp__ format | Double-underscore MCP naming | Convert to single-underscore |
${CLAUDE_PLUGIN_ROOT} refs | Claude Code path variable | Remove or convert |
| Missing purpose statement | No clear first sentence | Add purpose statement |
| No output format section | Agent should specify output | Add output format |
| Issue | Detection | Fix |
|---|---|---|
| Glob pattern syntax errors | Invalid patterns in permission rules | Fix syntax |
| Overly permissive subagent | Subagent with full write/bash access | Suggest tightening |
| Missing common tools | No read/glob/grep permissions set | Add basic permissions |
Present the analysis organized by severity:
## Update Analysis: {agent-name}
### Errors (must fix)
{list with explanations}
### Warnings (should fix)
{list with explanations}
### Suggestions
{list with explanations}
### Research Notes
{findings from researcher agent}
Use AskUserQuestion for approval:
Apply changes based on user selection:
Edit to modify the agent fileSpawn the validator agent:
Task:
subagent_type: "agent-alchemy-opencode-tools:oc-validator"
prompt: |
Validate the following OpenCode artifact:
Type: agent
Path: {path to updated file}
Reference guide: ${CLAUDE_PLUGIN_ROOT}/references/agent-guide.md
Present validation results and a before/after summary of changes.
CRITICAL: Complete ALL 7 phases before finishing.