Language: English | 简体中文 | 繁體中文
The complete collection of Claude configs from an Anthropic hackathon winner, migrated to OpenCode.
Production-ready agents, skills, commands, rules, and MCP configurations evolved over 10+ months of intensive daily use building real products.
Migration Complete: This project has been migrated from Claude Code to OpenCode! See MIGRATION_PLAN.md for details.
This repo is the raw code only. The guides explain everything.
|
|
| Shorthand Guide Setup, foundations, philosophy. Read this first. |
Longform Guide Token optimization, memory persistence, evals, parallelization. |
| Topic | What You'll Learn |
|---|---|
| Token Optimization | Model selection, system prompt slimming, background processes |
| Memory Persistence | Hooks that save/load context across sessions automatically |
| Continuous Learning | Auto-extract patterns from sessions into reusable skills |
| Verification Loops | Checkpoint vs continuous evals, grader types, pass@k metrics |
| Parallelization | Git worktrees, cascade method, when to scale instances |
| Subagent Orchestration | The context problem, iterative retrieval pattern |
Get up and running in under 2 minutes:
git clone https://github.com/karma-works/everything-opencode.git
cd everything-opencodeOption A: Global Installation (Recommended)
# Create OpenCode config directory
mkdir -p ~/.config/opencode
# Copy configuration
cp opencode.json ~/.config/opencode/
cp -r .opencode/* ~/.config/opencode/Option B: Project-Level Installation
# Copy to your project
cp -r .opencode /path/to/your/project/
cp opencode.json /path/to/your/project/# Try a command
/plan "Add user authentication"
# Invoke an agent
@code-reviewer
# Check available commands
ls .opencode/commands/✨ That's it! You now have access to 13+ agents, 12+ skills, and 20+ commands.
This configuration supports Windows, macOS, and Linux. All scripts are written in Node.js for maximum compatibility.
Scripts automatically detect your preferred package manager (npm, pnpm, yarn, or bun) with the following priority:
- Environment variable:
OPENCODE_PACKAGE_MANAGER - Project config:
.opencode/package-manager.json - package.json:
packageManagerfield - Lock file: Detection from package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
- Global config:
~/.config/opencode/package-manager.json - Fallback: First available package manager
To set your preferred package manager:
# Via environment variable
export OPENCODE_PACKAGE_MANAGER=pnpm
# Via global config
node scripts/setup-package-manager.js --global pnpm
# Via project config
node scripts/setup-package-manager.js --project bun
# Detect current setting
node scripts/setup-package-manager.js --detectOr use the /setup-pm command.
This repo provides OpenCode configuration files - copy them to your project or global config.
everything-opencode/
|-- .opencode/ # OpenCode configuration directory
| |-- agents/ # Specialized subagents for delegation
| | |-- planner.md # Feature implementation planning
| | |-- architect.md # System design decisions
| | |-- tdd-guide.md # Test-driven development
| | |-- code-reviewer.md # Quality and security review
| | |-- security-reviewer.md # Vulnerability analysis
| | |-- build-error-resolver.md
| | |-- e2e-runner.md # Playwright E2E testing
| | |-- refactor-cleaner.md # Dead code cleanup
| | |-- doc-updater.md # Documentation sync
| | |-- go-reviewer.md # Go code review
| | |-- go-build-resolver.md # Go build error resolution
| |
| |-- commands/ # Slash commands for quick execution
| | |-- tdd.md # /tdd - Test-driven development
| | |-- plan.md # /plan - Implementation planning
| | |-- e2e.md # /e2e - E2E test generation
| | |-- code-review.md # /code-review - Quality review
| | |-- build-fix.md # /build-fix - Fix build errors
| | |-- refactor-clean.md # /refactor-clean - Dead code removal
| | |-- setup-pm.md # /setup-pm - Configure package manager
| | |-- go-review.md # /go-review - Go code review
| | |-- go-test.md # /go-test - Go TDD workflow
| | |-- go-build.md # /go-build - Fix Go build errors
| |
| |-- skills/ # Workflow definitions and domain knowledge
| | |-- coding-standards/ # Language best practices
| | |-- backend-patterns/ # API, database, caching patterns
| | |-- security-review/ # Security checklist
| | |-- eval-harness/ # Verification loop evaluation
| | |-- python-testing/ # Python testing patterns
| | |-- python-patterns/ # Python best practices
| | |-- golang-testing/ # Go testing patterns
| | |-- strategic-compact/ # Context compaction
| |
| |-- rules/ # Always-follow guidelines
| | |-- security.md # Mandatory security checks
| | |-- coding-style.md # Immutability, file organization
| | |-- testing.md # TDD, 80% coverage requirement
| | |-- git-workflow.md # Commit format, PR process
| | |-- agents.md # When to delegate to subagents
| | |-- performance.md # Model selection, context management
| | |-- hooks.md # Hook usage guidelines
| | |-- patterns.md # Design patterns
| |
| |-- AGENTS.md # Project-specific instructions
|
|-- opencode.json # OpenCode configuration file
|-- AGENTS.md # Root-level instructions
|
|-- agents/ # Source: Agent definitions (copied to .opencode/)
|-- commands/ # Source: Command definitions (copied to .opencode/)
|-- skills/ # Source: Skill definitions (copied to .opencode/)
|-- rules/ # Source: Rule definitions (copied to .opencode/)
|-- scripts/ # Cross-platform Node.js scripts
|-- mcp-configs/ # MCP server configurations
Two ways to generate Claude Code skills from your repository:
Use the /skill-create command for local analysis without external services:
/skill-create # Analyze current repo
/skill-create --instincts # Also generate instincts for continuous-learningThis analyzes your git history locally and generates SKILL.md files.
For advanced features (10k+ commits, auto-PRs, team sharing):
Install GitHub App | ecc.tools
# Comment on any issue:
/skill-creator analyze
# Or auto-triggers on push to default branchBoth options create:
- SKILL.md files - Ready-to-use skills for Claude Code
- Instinct collections - For continuous-learning-v2
- Pattern extraction - Learns from your commit history
Note: Continuous learning features (instincts, pattern extraction) are not available in OpenCode. These features were specific to Claude Code. See MIGRATION_PLAN.md for details on potential custom implementations.
This configuration requires OpenCode CLI.
Check your version:
opencode --version- Context Window Management: Don't enable all MCPs at once. Your context window can shrink significantly with too many tools enabled.
- Rule of thumb: Keep under 10 MCPs enabled per project, under 80 tools active.
- Skills: Are automatically loaded from
.opencode/skills/(backward compatible with.claude/skills/)
Install for all projects:
# Clone the repo
git clone https://github.com/karma-works/everything-opencode.git
cd everything-opencode
# Create OpenCode config directory
mkdir -p ~/.config/opencode
# Copy configuration files
cp opencode.json ~/.config/opencode/
cp -r .opencode/agents ~/.config/opencode/
cp -r .opencode/commands ~/.config/opencode/
cp -r .opencode/skills ~/.config/opencode/
cp -r .opencode/rules ~/.config/opencode/
# Optional: Copy AGENTS.md
cp AGENTS.md ~/.config/opencode/Install for a specific project:
# Clone the repo
git clone https://github.com/karma-works/everything-opencode.git
cd everything-opencode
# Copy to your project
cp -r .opencode /path/to/your/project/
cp opencode.json /path/to/your/project/
cp AGENTS.md /path/to/your/project/Or if you're already in your project directory:
# From your project root
cp -r /path/to/everything-opencode/.opencode ./
cp /path/to/everything-opencode/opencode.json ./
cp /path/to/everything-opencode/AGENTS.md ./If you prefer manual control over what's installed:
# Clone the repo
git clone https://github.com/karma-works/everything-opencode.git
# Copy specific agents
cp everything-opencode/.opencode/agents/code-reviewer.md ~/.config/opencode/agents/
# Copy specific commands
cp everything-opencode/.opencode/commands/plan.md ~/.config/opencode/commands/
# Copy specific skills
cp -r everything-opencode/.opencode/skills/python-testing ~/.config/opencode/skills/
# Copy specific rules
cp everything-opencode/.opencode/rules/security.md ~/.config/opencode/rules/Edit ~/.config/opencode/opencode.json to enable desired MCP servers:
{
"mcp": {
"github": {
"type": "local",
"command": ["npx", "-y", "@modelcontextprotocol/server-github"],
"enabled": true
}
}
}Important: Set required environment variables (e.g., GITHUB_PERSONAL_ACCESS_TOKEN) before using MCP servers.
Subagents handle delegated tasks with limited scope. Invoke with @agent-name. Example:
---
description: Reviews code for quality, security, and maintainability
mode: subagent
model: anthropic/claude-sonnet-4-5
temperature: 0.1
tools:
read: true
grep: true
glob: true
bash: true
edit: false
write: false
permission:
bash:
"git *": allow
"*": ask
---
You are a senior code reviewer...Skills are workflow definitions invoked by commands or agents:
# TDD Workflow
1. Define interfaces first
2. Write failing tests (RED)
3. Implement minimal code (GREEN)
4. Refactor (IMPROVE)
5. Verify 80%+ coverageNote: OpenCode uses a different hook system than Claude Code. Hooks are implemented as JavaScript/TypeScript plugins in .opencode/plugins/.
Example plugin structure:
// .opencode/plugins/hooks.ts
import type { Plugin } from "@opencode-ai/plugin"
export const HooksPlugin: Plugin = async ({ $ }) => {
return {
"tool.execute.after": async (input, output) => {
if (input.tool === "edit") {
console.log(`Edited: ${output.args.filePath}`)
}
}
}
}See MIGRATION_PLAN.md for details on converting Claude Code hooks to OpenCode plugins.
Rules are always-follow guidelines referenced in opencode.json:
{
"instructions": [
"~/.config/opencode/rules/security.md",
"~/.config/opencode/rules/coding-style.md",
"~/.config/opencode/rules/testing.md"
]
}Keep them modular in ~/.config/opencode/rules/ or .opencode/rules/.
The plugin includes a comprehensive test suite:
# Run all tests
node tests/run-all.js
# Run individual test files
node tests/lib/utils.test.js
node tests/lib/package-manager.test.js
node tests/hooks/hooks.test.jsContributions are welcome and encouraged.
This repo is meant to be a community resource. If you have:
- Useful agents or skills
- Clever hooks
- Better MCP configurations
- Improved rules
Please contribute! See CONTRIBUTING.md for guidelines.
- Language-specific skills (Python, Rust patterns) - Go now included!
- Framework-specific configs (Django, Rails, Laravel)
- DevOps agents (Kubernetes, Terraform, AWS)
- Testing strategies (different frameworks)
- Domain-specific knowledge (ML, data engineering, mobile)
I've been using AI coding assistants since the experimental rollout. Won the Anthropic x Forum Ventures hackathon in Sep 2025 building zenith.chat with @DRodriguezFX - entirely using AI-powered development.
These configs are battle-tested across multiple production applications and have been migrated from Claude Code to OpenCode.
Critical: Don't enable all MCPs at once. Your context window can shrink significantly with too many tools enabled.
Rule of thumb:
- Have 20-30 MCPs configured in
opencode.json - Keep under 10 enabled per project
- Under 80 tools active
Use "enabled": false in the MCP config to disable unused servers:
{
"mcp": {
"github": {
"type": "local",
"command": ["npx", "-y", "@modelcontextprotocol/server-github"],
"enabled": false
}
}
}These configs work for my workflow. You should:
- Start with what resonates
- Modify for your stack
- Remove what you don't use
- Add your own patterns
- Shorthand Guide (Start Here): The Shorthand Guide to Everything Claude Code
- Longform Guide (Advanced): The Longform Guide to Everything Claude Code
- Follow: @affaanmustafa
- zenith.chat: zenith.chat
MIT - Use freely, modify as needed, contribute back if you can.
Star this repo if it helps. Read both guides. Build something great.