Thank you for your interest in contributing! This guide will help you add new components to the registry.
.opencode/agent/*.md) - Main AI agents.opencode/agent/subagents/*.md) - Specialized helpers.opencode/command/*.md) - Slash commands.opencode/tool/*/index.ts) - Utility tools.opencode/plugin/*.ts) - Integrations.opencode/context/**/*.md) - Context filesAll markdown files should include YAML frontmatter:
---
description: "Brief description of what this does"
mode: primary # For agents only
model: claude-4-sonnet # For agents only
temperature: 0.1 # For agents only
tools: # For agents only
read: true
edit: true
write: true
permissions: # Optional
bash:
"*": "deny"
---
# Component Name
Your component content here...
Required fields:
description - Brief description (all components)Agent-specific fields:
mode - Agent mode (primary, secondary, etc.)model - AI model to usetemperature - Temperature settingtools - Available toolspermissions - Security permissionsInclude JSDoc comments at the top:
/**
* Tool Name
*
* Brief description of what this tool does
*/
export function myTool() {
// Implementation
}
my-new-agent.mdCreate the component file in the appropriate directory:
# Example: Adding a new agent
touch .opencode/agent/my-new-agent.md
Add frontmatter and content following the structure above
Test your component:
# Validate structure
./scripts/validate-component.sh
Update the registry (automatic on merge to main):
# Manual update (optional)
./scripts/register-component.sh
When adding components, they're automatically categorized:
The auto-registration script assigns categories based on component type and location.
Install locally:
# Test the installer
./install.sh --list
Validate structure:
./scripts/validate-component.sh
Test with OpenCode:
opencode --agent your-new-agent
When you submit a PR, GitHub Actions will:
Use conventional commits:
feat: add new agent for Xfix: correct issue in Y commanddocs: update Z documentationchore: update dependenciesInclude:
Example:
## What
Adds a new `database-agent` for managing database migrations.
## Why
Automates common database tasks and ensures migration safety.
## How
- Scans migration files
- Validates migration order
- Runs migrations with rollback support
## Testing
- [x] Validated with `./scripts/validate-component.sh`
- [x] Tested with PostgreSQL and MySQL
- [x] Tested rollback scenarios
If your component depends on others, declare them in the registry:
{
"id": "my-component",
"dependencies": ["tool:env", "agent:task-manager"]
}
The installer will automatically install dependencies.
The registry is automatically updated when:
main branch.opencode/ directoryThe GitHub Action:
registry.jsonYou don't need to manually edit registry.json!
any)set -e for error handlingBy contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🎉