Back to Everything Claude Code

OpenCode ECC Plugin

.opencode/README.md

2.1.07.3 KB
Original Source

OpenCode ECC Plugin

WARNING: This README is specific to OpenCode usage. If you installed ECC via npm (e.g. npm install opencode-ecc), refer to the root README instead.

ECC plugin for OpenCode - agents, commands, hooks, and skills.

Installation

Installation Overview

There are two ways to use ECC:

  1. npm package (recommended for most users) Install via npm/bun/yarn and use the ecc-install CLI to set up rules and agents.

  2. Direct clone / plugin mode Clone the repository and run OpenCode directly inside it.

Choose the method that matches your workflow below.

Option 1: npm Package

bash
npm install ecc-universal

Add to your opencode.json:

json
{
  "plugin": ["ecc-universal"]
}

This loads the ECC OpenCode plugin module from npm:

  • hook/event integrations
  • bundled custom tools exported by the plugin

It does not auto-register the full ECC command/agent/instruction catalog in your project config. For the full OpenCode setup, either:

  • run OpenCode inside this repository, or
  • copy the relevant .opencode/commands/, .opencode/prompts/, .opencode/instructions/, and the instructions, agent, and command config entries into your own project

After installation, the ecc-install CLI is also available:

bash
npx ecc-install typescript

Option 2: Direct Use

Clone and run OpenCode in the repository:

bash
git clone https://github.com/affaan-m/ECC
cd ECC
opencode

If you also want to apply the ECC home install (node scripts/install-apply.js --target opencode --profile full), build the plugin first so the compiled payload at .opencode/dist/ exists:

bash
node scripts/build-opencode.js   # or: npm run build:opencode
node scripts/install-apply.js --target opencode --profile full

Without .opencode/dist/index.js, OpenCode will detect the slash commands but silently skip plugin hooks and tools. The installer now fails fast with a pointer to this command if the build step is missing.

Features

Agents (26)

AgentDescription
buildPrimary coding agent for development work
plannerImplementation planning
architectSystem design
code-reviewerCode review
security-reviewerSecurity analysis
tdd-guideTest-driven development
build-error-resolverBuild error fixes
e2e-runnerE2E testing
doc-updaterDocumentation
refactor-cleanerDead code cleanup
go-reviewerGo code review
go-build-resolverGo build errors
database-reviewerDatabase optimization
docs-lookupDocumentation lookup via Context7
harness-optimizerHarness config tuning
java-reviewerJava code review
java-build-resolverJava build errors
kotlin-reviewerKotlin code review
kotlin-build-resolverKotlin build errors
loop-operatorAutonomous loop execution
php-reviewerPHP code review
python-reviewerPython code review
rust-reviewerRust code review
rust-build-resolverRust build errors
cpp-reviewerC++ code review
cpp-build-resolverC++ build errors

Commands (26)

CommandDescription
/planCreate implementation plan
/tddTDD workflow
/code-reviewReview code changes
/securitySecurity review
/build-fixFix build errors
/e2eE2E tests
/refactor-cleanRemove dead code
/orchestrateMulti-agent workflow
/learnExtract patterns
/checkpointSave progress
/verifyVerification loop
/evalEvaluation
/update-docsUpdate docs
/update-codemapsUpdate codemaps
/test-coverageCoverage analysis
/setup-pmPackage manager
/go-reviewGo code review
/go-testGo TDD
/go-buildGo build fix
/skill-createGenerate skills
/instinct-statusView instincts
/instinct-importImport instincts
/instinct-exportExport instincts
/evolveCluster instincts
/promotePromote project instincts
/projectsList known projects

Plugin Hooks

HookEventPurpose
Prettierfile.editedAuto-format JS/TS
TypeScripttool.execute.afterCheck for type errors
console.logfile.editedWarn about debug statements
Notificationsession.idleDesktop notification (cross-platform)
Securitytool.execute.beforeCheck for secrets
Git Push Remindertool.execute.beforeRemind to review before pushing
Doc File Warningtool.execute.beforeWarn about unnecessary documentation
Long Command Remindertool.execute.beforeRemind about long-running commands
Session Contextsession.createdLoad project context
Console Log Auditsession.idleAudit edited files for console.log
File Watcherfile.watcher.updatedTrack file system changes
Todo Progresstodo.updatedLog task completion progress
Shell Environmentshell.envInject environment variables
Session Compactingexperimental.session.compactingPreserve context across compaction
Permission Auto-Approvepermission.askAuto-approve safe operations

Custom Tools

ToolDescription
run-testsRun test suite with options
check-coverageAnalyze test coverage
security-auditSecurity vulnerability scan
format-codeDetect formatter and return command
lint-checkDetect linter and return command
git-summaryGenerate git summary with branch, status, and diff
changed-filesList files changed in session as a navigable tree
dependency-analyzerAnalyze dependencies for outdated, vulnerable, and unused packages

Hook Event Mapping

OpenCode's plugin system maps to Claude Code hooks:

Claude CodeOpenCode
PreToolUsetool.execute.before
PostToolUsetool.execute.after
Stopsession.idle
SessionStartsession.created
SessionEndsession.deleted

OpenCode has 20+ additional events not available in Claude Code.

Hook Runtime Controls

OpenCode plugin hooks honor the same runtime controls used by Claude Code/Cursor:

bash
export ECC_HOOK_PROFILE=standard
export ECC_DISABLED_HOOKS="pre:bash:tmux-reminder,post:edit:typecheck"
  • ECC_HOOK_PROFILE: minimal, standard (default), strict
  • ECC_DISABLED_HOOKS: comma-separated hook IDs to disable

Skills

The default OpenCode config loads 11 curated ECC skills via the instructions array:

  • coding-standards
  • backend-patterns
  • frontend-patterns
  • frontend-slides
  • security-review
  • tdd-workflow
  • strategic-compact
  • eval-harness
  • verification-loop
  • api-design
  • e2e-testing

Additional specialized skills are shipped in skills/ but not loaded by default to keep OpenCode sessions lean:

  • article-writing
  • content-engine
  • market-research
  • investor-materials
  • investor-outreach

Configuration

Full configuration in opencode.json:

json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "small_model": "anthropic/claude-haiku-4-5",
  "plugin": ["./plugins"],
  "instructions": [
    "skills/tdd-workflow/SKILL.md",
    "skills/security-review/SKILL.md"
  ],
  "agent": { /* 12 agents */ },
  "command": { /* 24 commands */ }
}

License

MIT