ayush-opencode
v0.2.2
Published
Custom OpenCode agents (explorer, librarian, oracle, ui-planner) with orchestration injection for Build/Plan agents
Maintainers
Readme
ayush-opencode
Custom OpenCode plugin with specialized subagents and orchestration injection.
Features
- 4 Custom Subagents: Explorer, Librarian, Oracle, UI-Planner
- Auto-Loaded MCP Servers: exa, grep_app, sequential-thinking (no manual config needed!)
- Orchestration Injection: Automatically teaches Build/Plan agents how to delegate tasks
- Portable: Install on any machine via opencode.json
Installation
Just add to your opencode.json — OpenCode will auto-install the plugin:
{
"plugin": ["[email protected]"]
}That's it! Restart OpenCode and the plugin is ready to use.
Plugin Versioning & Updates
Important: OpenCode does NOT auto-update plugins. You must pin versions for reliable updates.
Recommended: Pin the Version
{
"plugin": ["[email protected]"]
}Why pin versions? OpenCode uses Bun's lockfile which pins resolved versions. If you use "ayush-opencode" without a version, it resolves to "latest" once and never updates even when new versions are published.
Upgrading to a New Version
Simply change the version in your config and restart OpenCode:
// Change from:
"plugin": ["[email protected]"]
// To:
"plugin": ["[email protected]"]OpenCode will detect the version mismatch and install the new version automatically.
If You're Stuck on an Old Version
If you previously used an unpinned version, clear the cache:
rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lockThen restart OpenCode with a pinned version in your config.
Agents
@explorer
Fast codebase search specialist. Use for:
- "Where is X implemented?"
- "Find all files containing Y"
- Pattern matching and locating implementations
Model: anthropic/claude-haiku-4-5
@librarian
Open-source research agent. Use for:
- "How does library X work?"
- "Show me implementation examples"
- Finding official documentation
Model: anthropic/claude-sonnet-4-5
@oracle
Strategic technical advisor. Use for:
- Architecture decisions
- Code review and debugging strategy
- Technical trade-offs analysis
Model: openai/gpt-5.2-high
@ui-planner
Designer-turned-developer. Use for:
- Beautiful UI/UX implementation
- Frontend aesthetics and animations
- Visual design without mockups
Model: google/gemini-3-pro-high
Orchestration
This plugin automatically injects delegation guidelines into OpenCode's Build and Plan agents. After installation, these agents will know when and how to delegate tasks to the specialized subagents.
Example Delegations
| User Request | Delegated To | |--------------|--------------| | "How does React Query handle caching?" | @librarian | | "Where is the auth middleware?" | @explorer | | "Should I use Redux or Zustand?" | @oracle | | "Make this dashboard look better" | @ui-planner |
Configuration (Optional)
You can customize agent models or disable agents by creating a config file.
Config File Locations
| Location | Priority | Use Case |
|----------|----------|----------|
| ~/.config/opencode/ayush-opencode.json | Base | User-level defaults |
| .opencode/ayush-opencode.json | Override | Project-specific settings |
Project config overrides user config when both exist.
Config Options
{
"agents": {
"explorer": { "model": "anthropic/claude-haiku-4-5" },
"librarian": { "model": "anthropic/claude-sonnet-4-5" },
"oracle": { "model": "openai/gpt-5.2-high" },
"ui-planner": { "model": "google/gemini-3-pro-high" }
},
"disabled_agents": [],
"disabled_mcps": []
}Override Models
To use different models for specific agents:
{
"agents": {
"explorer": { "model": "anthropic/claude-sonnet-4" },
"oracle": { "model": "openai/gpt-4o" }
}
}Disable Agents
To disable specific agents:
{
"disabled_agents": ["oracle", "ui-planner"]
}Available agent names: explorer, librarian, oracle, ui-planner
Auto-Loaded MCP Servers
This plugin automatically loads the following MCP servers — no manual configuration needed!
| MCP Server | Type | Description |
|------------|------|-------------|
| exa | HTTP Streamable | Web search, code context, URL crawling (no API key required) |
| grep_app | Remote | GitHub code search across millions of repos |
| sequential-thinking | Local | Structured reasoning for complex problems |
How It Works
When you install this plugin, these MCP servers are automatically injected into OpenCode's config:
- Your other MCPs are preserved — If you have
supabase,memcontext, or any custom MCPs, they continue to work - Conflicts use our config — If you have
exaconfigured differently, our version takes priority - Disable if needed — Use
disabled_mcpsconfig to opt-out (see below)
Disable Specific MCPs
If you want to keep your own MCP config for a server we provide:
{
"disabled_mcps": ["exa"]
}Available MCP names: exa, grep_app, sequential-thinking
This will skip injecting our exa config, allowing your custom one to remain.
Development
# Install dependencies
bun install
# Build
bun run build
# Type check
bun run typecheckCredits & Acknowledgments
This plugin was built with inspiration and learnings from:
OpenCode — The CLI tool this plugin extends. Check out their documentation and plugin development guide.
oh-my-opencode by YeonGyu Kim — A fantastic OpenCode plugin that pioneered many orchestration patterns used here. The agent delegation strategies, parallel execution patterns, and prompt structuring were heavily influenced by their work.
License
MIT
