Skip to content

joelhooks/opencode-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•
β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
 β•šβ•β•β•β•β•β• β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•

    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
   β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•
   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—
   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
    β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•β•β•šβ•β•     β•šβ•β• β•šβ•β•β•β•β•β•

"These are intelligent and structured group dynamics that emerge not from a leader, but from the local interactions of the elements themselves." β€” Daniel Shiffman, The Nature of Code

A swarm of agents that learns from its mistakes.

An OpenCode configuration that turns Claude into a multi-agent system. You describe what you want. It decomposes the work, spawns parallel workers, tracks what strategies work, and adapts. Anti-patterns get detected. Proven patterns get promoted. Confidence decays unless revalidated.

Built on joelhooks/swarmtools - multi-agent orchestration with outcome-based learning.

Important

This is an OpenCode config, not a standalone tool. Everything runs inside OpenCode. The CLIs (swarm, semantic-memory, cass) are backends that agents call - not meant for direct human use.


Quick Start

1. Clone & Install

git clone https://github.com/joelhooks/opencode-config ~/.config/opencode
cd ~/.config/opencode && bun install

2. Install CLI Tools

Note

These CLIs are backends that OpenCode agents call. You install them, but the agents use them.

# Swarm orchestration (required) - agents call this for coordination
npm install -g opencode-swarm-plugin
swarm --version  # 0.30.0+

# Ollama for embeddings (required for semantic features)
brew install ollama  # or: curl -fsSL https://ollama.com/install.sh | sh
ollama serve
ollama pull nomic-embed-text

# Semantic memory (optional but recommended)
npm install -g semantic-memory
semantic-memory check

# Cross-agent session search (optional but recommended)
npm install -g cass-search
cass index
cass --version  # 0.1.35+

3. Verify

swarm doctor

4. Run Your First Swarm

Warning

All commands run inside OpenCode, not in your terminal. The swarm CLI is a backend that agents call - it's not meant for direct human use.

Start OpenCode, then type:

/swarm "Add user authentication with OAuth"

Watch it decompose β†’ spawn workers β†’ coordinate β†’ verify β†’ learn.

The agent orchestrates everything. You just describe what you want.


Version Reference

Tool Version Install Command
swarm 0.30.0 npm i -g opencode-swarm-plugin
semantic-memory latest npm i -g semantic-memory
cass 0.1.35 npm i -g cass-search
ollama 0.13.1 brew install ollama

Embedding model: nomic-embed-text (required for semantic-memory and pdf-brain)

Optional Integrations

# Kernel cloud browser (Playwright in the cloud)
opencode mcp auth kernel

# Snyk security scanning
snyk auth

What Makes This Different

The Swarm Learns

"Elaborate feedback on errors has repeatedly been found to be more effective than knowledge of results alone." β€” Jeroen van MerriΓ«nboer, Ten Steps to Complex Learning

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     LEARNING PIPELINE                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   CASS      │───▢│  Decompose  │───▢│   Execute   β”‚         β”‚
β”‚  β”‚  (history)  β”‚    β”‚  (strategy) β”‚    β”‚  (workers)  β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚         β”‚                                     β”‚                 β”‚
β”‚         β”‚                                     β–Ό                 β”‚
β”‚         β”‚                            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚         β”‚                            β”‚   Record    β”‚           β”‚
β”‚         β”‚                            β”‚  Outcome    β”‚           β”‚
β”‚         β”‚                            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚         β”‚                                     β”‚                 β”‚
β”‚         β–Ό                                     β–Ό                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚              PATTERN MATURITY                    β”‚           β”‚
β”‚  β”‚  candidate β†’ established β†’ proven β†’ deprecated   β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚                                                                 β”‚
β”‚  β€’ Confidence decay (90-day half-life)                         β”‚
β”‚  β€’ Anti-pattern inversion (>60% failure β†’ AVOID)               β”‚
β”‚  β€’ Implicit feedback (fast+success vs slow+errors)             β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Every task execution feeds the learning system:

  • Fast + success β†’ pattern gets promoted
  • Slow + retries + errors β†’ pattern gets flagged
  • >60% failure rate β†’ auto-inverted to anti-pattern
  • 90-day half-life β†’ confidence decays unless revalidated

Cross-Agent Memory

CASS searches across ALL your AI agent histories before solving problems:

  • Indexed agents: Claude Code, Codex, Cursor, Gemini, Aider, ChatGPT, Cline, OpenCode, Amp, Pi-Agent
  • Semantic + full-text search - find past solutions even if phrased differently

Semantic Memory persists learnings across sessions with vector search:

  • Architectural decisions (store the WHY, not just WHAT)
  • Debugging breakthroughs (root cause + solution)
  • Project-specific gotchas (domain rules that tripped you up)

Cost-Optimized Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  COORDINATOR vs WORKER                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  COORDINATOR (Expensive, Long-Lived)                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
β”‚  β”‚  β€’ Sonnet context ($$$)              β”‚                       β”‚
β”‚  β”‚  β€’ NEVER edits code                  β”‚                       β”‚
β”‚  β”‚  β€’ Decomposes + orchestrates         β”‚                       β”‚
β”‚  β”‚  β€’ Monitors progress                 β”‚                       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β”‚                      β”‚                                           β”‚
β”‚                      β”œβ”€β”€β”€ spawns ───┐                            β”‚
β”‚                      β”‚               β”‚                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚  β”‚  WORKER (Disposable) β”‚  β”‚  WORKER            β”‚               β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚               β”‚
β”‚  β”‚  β”‚ Focused context β”‚ β”‚  β”‚  β”‚ Focused ctx   β”‚β”‚               β”‚
β”‚  β”‚  β”‚ Executes task   β”‚ β”‚  β”‚  β”‚ Executes task β”‚β”‚               β”‚
β”‚  β”‚  β”‚ Checkpointed    β”‚ β”‚  β”‚  β”‚ Checkpointed  β”‚β”‚               β”‚
β”‚  β”‚  β”‚ Tracks learning β”‚ β”‚  β”‚  β”‚ Tracks learn  β”‚β”‚               β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚               β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚                                                                 β”‚
β”‚  Result: 70% cost reduction, better recovery, learning signals β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Workers get disposable context. Coordinator context stays clean. Parallel work doesn't blow the context window.


Swarm Orchestration

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘
β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘
β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•šβ•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•

Built on joelhooks/swarmtools - the core innovation.

The System

Hive (git-backed work tracker):

  • Atomic epic + subtask creation
  • Status tracking (open β†’ in_progress β†’ blocked β†’ closed)
  • hive_create, hive_create_epic, hive_query, hive_close, hive_sync

Agent Mail (multi-agent coordination):

  • File reservation system (prevent edit conflicts)
  • Message passing between agents
  • Context-safe inbox (max 5 messages, bodies excluded by default)
  • swarmmail_init, swarmmail_send, swarmmail_reserve, swarmmail_release

Swarm Tools (orchestration):

  • Strategy selection + decomposition validation
  • Progress tracking (25/50/75% checkpoints)
  • Completion verification gates (UBS + typecheck + tests)
  • swarm_decompose, swarm_validate_decomposition, swarm_complete, swarm_record_outcome

Commands

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ /swarm <task>      β”‚ Decompose β†’ spawn parallel agents β†’ merge    β”‚
β”‚ /swarm-status      β”‚ Check running swarm progress                 β”‚
β”‚ /swarm-collect     β”‚ Collect and merge swarm results              β”‚
β”‚ /parallel "a" "b"  β”‚ Run explicit tasks in parallel               β”‚
β”‚                    β”‚                                              β”‚
β”‚ /debug-plus        β”‚ Debug + prevention pipeline + swarm fix      β”‚
β”‚ /fix-all           β”‚ Survey PRs + cells, dispatch agents          β”‚
β”‚ /iterate <task>    β”‚ Evaluator-optimizer loop until quality met   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Full command list: /commit, /pr-create, /worktree-task, /handoff, /checkpoint, /retro, /review-my-shit, /sweep, /focus, /rmslop, /triage, /estimate, /standup, /migrate, /repo-dive.


Custom Tools

12 MCP tools built for this config:

UBS - Ultimate Bug Scanner

Multi-language bug detection (JS/TS, Python, C++, Rust, Go, Java, Ruby):

  • Null safety, XSS, injection, async/await race conditions, memory leaks
ubs_scan(staged=true)  # Before commit
ubs_scan(path="src/")  # After AI generates code

CASS - Cross-Agent Session Search

cass_search(query="authentication error", limit=5)
cass_search(query="useEffect cleanup", agent="claude", days=7)

Semantic Memory

semantic-memory_store(information="OAuth tokens need 5min buffer", tags="auth,tokens")
semantic-memory_find(query="token refresh", limit=5)
semantic-memory_find(query="token refresh", expand=true)  # Full content

Others

  • repo-autopsy_* - Deep GitHub repo analysis (AST grep, blame, hotspots, secrets)
  • repo-crawl_* - GitHub API exploration (README, files, search)
  • pdf-brain_* - PDF & Markdown knowledge base (URLs supported, --expand for context)
  • typecheck - TypeScript check with grouped errors
  • git-context - Branch, status, commits in one call

MCP Servers

Server Purpose
next-devtools Next.js dev server integration (routes, errors, build)
chrome-devtools Browser automation, DOM inspection, network monitoring
context7 Library documentation lookup (npm, PyPI, Maven)
fetch Web fetching with markdown conversion
snyk Security scanning (SCA, SAST, IaC, containers)
kernel Cloud browser automation, Playwright, app deployment

Agents

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Agent           β”‚ Model             β”‚ Purpose                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ swarm/planner   β”‚ claude-sonnet-4-5 β”‚ Strategic task decomposition   β”‚
β”‚ swarm/worker    β”‚ claude-sonnet-4-5 β”‚ Parallel task implementation   β”‚
β”‚ explore         β”‚ claude-haiku-4-5  β”‚ Fast search (read-only)        β”‚
β”‚ archaeologist   β”‚ claude-sonnet-4-5 β”‚ Codebase exploration (r/o)     β”‚
β”‚ beads           β”‚ claude-haiku      β”‚ Issue tracker (locked down)    β”‚
β”‚ refactorer      β”‚ default           β”‚ Pattern migration              β”‚
β”‚ reviewer        β”‚ default           β”‚ Code review (read-only)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Skills (On-Demand Knowledge)

"Legacy code is simply code without tests." β€” Michael Feathers, Working Effectively with Legacy Code

Skill When to Use
testing-patterns Adding tests, breaking dependencies, characterization tests
swarm-coordination Multi-agent decomposition, parallel work
cli-builder Building CLIs, argument parsing, subcommands
learning-systems Confidence decay, pattern maturity
skill-creator Meta-skill for creating new skills
system-design Architecture decisions, module boundaries
skills_use(name="testing-patterns")
skills_use(name="cli-builder", context="building a new CLI tool")

Tip

testing-patterns includes 25 dependency-breaking techniques from Feathers' Working Effectively with Legacy Code. Gold for getting gnarly code under test.


Knowledge Files

File Topics
tdd-patterns.md RED-GREEN-REFACTOR, characterization tests
error-patterns.md Known error signatures + solutions
prevention-patterns.md Debug-to-prevention workflow
nextjs-patterns.md RSC, caching, App Router gotchas
effect-patterns.md Services, Layers, Schema, error handling
testing-patterns.md Test strategies, mocking, fixtures
typescript-patterns.md Type-level programming, inference, narrowing

Load via @knowledge/file-name.md references when relevant.


Directory Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        ~/.config/opencode                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  command/           25 slash commands (/swarm, /debug, etc.)    β”‚
β”‚  tool/              12 custom MCP tools (cass, ubs, etc.)       β”‚
β”‚  plugin/            swarm.ts (orchestration)                    β”‚
β”‚  agent/             specialized subagents (worker, planner...)  β”‚
β”‚  knowledge/         context files (tdd, effect, nextjs, etc.)   β”‚
β”‚  skills/            7 injectable knowledge packages             β”‚
β”‚  opencode.jsonc     main config (models, MCP servers, perms)    β”‚
β”‚  AGENTS.md          workflow instructions + tool preferences    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Credits


License

MIT


"One person's pattern can be another person's primitive building block." β€” Eric Evans, Domain-Driven Design

About

Personal OpenCode configuration - commands, tools, agents, knowledge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published