Production-grade configuration for OpenCode — multi-agent orchestration, a skills library, TypeScript plugins, and project templates for building and shipping software safely.
OpenCode Config transforms OpenCode from a single-agent coding assistant into a production-grade orchestration system. It provides:
- Multi-agent organization — specialized agents for strategy, architecture, development, operations, quality, security, and finance
- 23 production skills — battle-tested workflows for architecture decisions, code review, deployment, incident response, and more
- TypeScript plugins — background agents, notifications, workspace management, and git worktree integration
- Project templates — ready-made archetypes for SaaS platforms, CLI tools, backend services, frontend apps, libraries, and infrastructure
| Tool | Required | Notes |
|---|---|---|
| OpenCode | Yes | Must be installed and working |
| AgentMemory | Recommended | Persistent memory layer with knowledge graph — requires an LLM API key |
This repo does not install OpenCode. It assumes you already have it.
Organization Agents — strategic and operational roles that plan, review, and govern:
| Agent | Role |
|---|---|
ceo |
Strategy, prioritization, and cross-functional coordination |
cto |
Architecture decisions, technology selection, and technical strategy |
devops |
Infrastructure, CI/CD, deployment pipelines, and observability |
finance |
Cost analysis, optimization, and build-vs-buy decisions |
pm |
Feature lifecycle, planning, and milestone tracking |
qa |
Test strategy, bug triage, and quality gates |
security |
Threat modeling, security review, and policy enforcement |
Execution Agents — hands-on implementation roles:
| Agent | Role |
|---|---|
coder |
Implementation, refactoring, and bug fixes |
researcher |
External research, API discovery, and documentation |
reviewer |
Code review against quality standards |
scribe |
Documentation, changelogs, and human-facing prose |
Production-ready workflows that agents invoke for structured decision-making and execution:
| Skill | Purpose |
|---|---|
architecture-principles |
System architecture principles and technology selection criteria |
architecture-lifecycle |
RFCs and ADRs for systematic architecture decisions |
chezmoi-expert |
Expert chezmoi dotfiles management with templates and secrets |
bug-lifecycle |
Triage, fix, and verify bugs through a structured process |
code-philosophy |
The 5 Laws of Elegant Defense — backend code quality standards |
code-review |
Comprehensive review methodology with severity classification |
continuous-improvement |
Pattern analysis and process improvement recommendations |
cost-optimization |
Cost analysis, optimization, and build-vs-buy framework |
decision-framework |
Lightweight decision-making for evaluating trade-offs |
decision-history |
Capture decisions with rationale, tradeoffs, and consequences |
deployment-lifecycle |
Staged rollout and rollback for safe releases |
feature-lifecycle |
Structured process for implementing new features |
frontend-philosophy |
The 5 Pillars of Intentional UI — frontend quality standards |
incident-lifecycle |
Production incident response with minimal impact |
org-audit |
Record organization routing effectiveness and agent selection accuracy |
org-governance |
Shared governance, separation of duties, and interaction patterns |
org-routing |
Agent routing — when to consult each organization role |
plan-protocol |
Guidelines for creating and managing implementation plans |
plan-review |
Criteria for reviewing plans against quality standards |
postmortem |
Analyze completed work for successes, failures, and root causes |
security-policies |
Security policies, threat modeling, and dependency review |
TypeScript plugins that extend OpenCode's runtime capabilities:
| Plugin | Purpose |
|---|---|
background-agents |
Run agents asynchronously for long-running tasks |
notify |
Desktop and terminal notifications for agent events |
workspace |
Multi-project workspace management and context switching |
worktree |
Git worktree integration for parallel branch workflows |
Project Archetypes — scaffolding for common project types:
saas-platform— multi-tenant SaaS with auth, billing, and APIcli-tool— command-line application with argument parsingbackend-service— REST/GraphQL service with database integrationfrontend-app— SPA with routing, state management, and UI kitlibrary— reusable package with build, test, and publish setupinfrastructure— IaC for cloud resources and deployment pipelines
Component Templates — reusable patterns for common building blocks.
Workflow Templates — pre-configured agent chains for recurring tasks.
Slash commands available in OpenCode sessions:
| Command | Purpose |
|---|---|
/review |
Trigger a structured code review |
Configuration profiles for different contexts:
- Default — full orchestration with all agents, skills, and plugins
- Workspace — project-specific overrides for agent permissions, tools, and context
MCP tools for agent operations:
- Delegation — parallel background work with async result retrieval
- Memory — long-term context storage, search, and consolidation
- Web Search — real-time information retrieval
git clone https://github.com/aadil96/opencode-config.git
cd opencode-config
./scripts/setup.sh- Checks prerequisites — verifies OpenCode is installed and AgentMemory is available
- Backs up existing config — copies
~/.config/opencode/to~/.config/opencode.bak.<timestamp>/ - Installs everything — agents, skills, plugins, templates, commands, and profiles
- Asks before overwriting — prompts on conflicts, never silently replaces your config
- Offers AgentMemory systemd setup — optional background service for the memory layer
The script is idempotent — safe to run multiple times.
The memory layer works best with AgentMemory running as a background service. A systemd service template is provided and the setup script can install it automatically.
AgentMemory requires an LLM API key for graph extraction and consolidation. Set one of these environment variables:
| Provider | Environment Variable |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Anthropic | ANTHROPIC_API_KEY |
GOOGLE_API_KEY |
|
| Ollama | OLLAMA_BASE_URL |
See AgentMemory LLM Providers for the full list.
If you already have configuration in ~/.config/opencode/, the setup script will:
- Always back up your existing config to a timestamped backup directory
- Ask before overwriting any file that already exists
- Skip files you choose not to overwrite
- Never delete your existing config — backups are always preserved
You can always restore from backup:
rm -rf ~/.config/opencode/
mv ~/.config/opencode.bak.<timestamp>/ ~/.config/opencode/See CONTRIBUTING.md for guidelines on adding agents, skills, plugins, and templates.
MIT — see LICENSE.