mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool
- AGENTS.md: universal cross-tool file read by Claude Code, Cursor, Codex, and OpenCode - .cursor/: 15 hook events via hooks.json, 16 hook scripts with DRY adapter pattern, 29 rules (9 common + 20 language-specific) with Cursor YAML frontmatter - .codex/: reference config.toml, Codex-specific AGENTS.md supplement, 10 skills ported to .agents/skills/ with openai.yaml metadata - .opencode/: 3 new tools (format-code, lint-check, git-summary), 3 new hooks (shell.env, experimental.session.compacting, permission.ask), expanded instructions, version bumped to 1.6.0 - README: fixed Cursor section, added Codex section, added cross-tool parity table - install.sh: now copies hooks.json + hooks/ for --target cursor
This commit is contained in:
141
README.md
141
README.md
@@ -774,31 +774,102 @@ Please contribute! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
||||
|
||||
## Cursor IDE Support
|
||||
|
||||
ecc-universal includes pre-translated configurations for [Cursor IDE](https://cursor.com). The `.cursor/` directory contains rules, agents, skills, commands, and MCP configs adapted for Cursor's format.
|
||||
ECC provides **full Cursor IDE support** with hooks, rules, agents, skills, commands, and MCP configs adapted for Cursor's native format.
|
||||
|
||||
### Quick Start (Cursor)
|
||||
|
||||
```bash
|
||||
# Install the package
|
||||
npm install ecc-universal
|
||||
|
||||
# Install for your language(s)
|
||||
./install.sh --target cursor typescript
|
||||
./install.sh --target cursor python golang
|
||||
./install.sh --target cursor python golang swift
|
||||
```
|
||||
|
||||
### What's Translated
|
||||
### What's Included
|
||||
|
||||
| Component | Claude Code → Cursor | Parity |
|
||||
|-----------|---------------------|--------|
|
||||
| Rules | YAML frontmatter added, paths flattened | Full |
|
||||
| Agents | Model IDs expanded, tools → readonly flag | Full |
|
||||
| Skills | No changes needed (identical standard) | Identical |
|
||||
| Commands | Path references updated, multi-* stubbed | Partial |
|
||||
| MCP Config | Env interpolation syntax updated | Full |
|
||||
| Hooks | No equivalent in Cursor | See alternatives |
|
||||
| Component | Count | Details |
|
||||
|-----------|-------|---------|
|
||||
| Hook Events | 15 | sessionStart, beforeShellExecution, afterFileEdit, beforeMCPExecution, beforeSubmitPrompt, and 10 more |
|
||||
| Hook Scripts | 16 | Thin Node.js scripts delegating to `scripts/hooks/` via shared adapter |
|
||||
| Rules | 29 | 9 common (alwaysApply) + 20 language-specific (TypeScript, Python, Go, Swift) |
|
||||
| Agents | Shared | Via AGENTS.md at root (read by Cursor natively) |
|
||||
| Skills | Shared | Via AGENTS.md at root |
|
||||
| Commands | Shared | `.cursor/commands/` if installed |
|
||||
| MCP Config | Shared | `.cursor/mcp.json` if installed |
|
||||
|
||||
See [.cursor/README.md](.cursor/README.md) for details and [.cursor/MIGRATION.md](.cursor/MIGRATION.md) for the full migration guide.
|
||||
### Hook Architecture (DRY Adapter Pattern)
|
||||
|
||||
Cursor has **more hook events than Claude Code** (20 vs 8). The `.cursor/hooks/adapter.js` module transforms Cursor's stdin JSON to Claude Code's format, allowing existing `scripts/hooks/*.js` to be reused without duplication.
|
||||
|
||||
```
|
||||
Cursor stdin JSON → adapter.js → transforms → scripts/hooks/*.js
|
||||
(shared with Claude Code)
|
||||
```
|
||||
|
||||
Key hooks:
|
||||
- **beforeShellExecution** — Blocks dev servers outside tmux (exit 2), git push review
|
||||
- **afterFileEdit** — Auto-format + TypeScript check + console.log warning
|
||||
- **beforeSubmitPrompt** — Detects secrets (sk-, ghp_, AKIA patterns) in prompts
|
||||
- **beforeTabFileRead** — Blocks Tab from reading .env, .key, .pem files (exit 2)
|
||||
- **beforeMCPExecution / afterMCPExecution** — MCP audit logging
|
||||
|
||||
### Rules Format
|
||||
|
||||
Cursor rules use YAML frontmatter with `description`, `globs`, and `alwaysApply`:
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: "TypeScript coding style extending common rules"
|
||||
globs: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
|
||||
alwaysApply: false
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Codex CLI Support
|
||||
|
||||
ECC provides **first-class Codex CLI support** with a reference configuration, Codex-specific AGENTS.md supplement, and 10 ported skills.
|
||||
|
||||
### Quick Start (Codex)
|
||||
|
||||
```bash
|
||||
# Copy the reference config to your home directory
|
||||
cp .codex/config.toml ~/.codex/config.toml
|
||||
|
||||
# Run Codex in the repo — AGENTS.md is auto-detected
|
||||
codex
|
||||
```
|
||||
|
||||
### What's Included
|
||||
|
||||
| Component | Count | Details |
|
||||
|-----------|-------|---------|
|
||||
| Config | 1 | `.codex/config.toml` — model, permissions, MCP servers, persistent instructions |
|
||||
| AGENTS.md | 2 | Root (universal) + `.codex/AGENTS.md` (Codex-specific supplement) |
|
||||
| Skills | 10 | `.agents/skills/` — SKILL.md + agents/openai.yaml per skill |
|
||||
| MCP Servers | 4 | GitHub, Context7, Memory, Sequential Thinking (command-based) |
|
||||
| Profiles | 2 | `strict` (read-only sandbox) and `yolo` (full auto-approve) |
|
||||
|
||||
### Skills
|
||||
|
||||
Skills at `.agents/skills/` are auto-loaded by Codex:
|
||||
|
||||
| Skill | Description |
|
||||
|-------|-------------|
|
||||
| tdd-workflow | Test-driven development with 80%+ coverage |
|
||||
| security-review | Comprehensive security checklist |
|
||||
| coding-standards | Universal coding standards |
|
||||
| frontend-patterns | React/Next.js patterns |
|
||||
| backend-patterns | API design, database, caching |
|
||||
| e2e-testing | Playwright E2E tests |
|
||||
| eval-harness | Eval-driven development |
|
||||
| strategic-compact | Context management |
|
||||
| api-design | REST API design patterns |
|
||||
| verification-loop | Build, test, lint, typecheck, security |
|
||||
|
||||
### Key Limitation
|
||||
|
||||
Codex CLI does **not yet support hooks** ([GitHub Issue #2109](https://github.com/openai/codex/issues/2109), 430+ upvotes). Security enforcement is instruction-based via `persistent_instructions` in config.toml and the sandbox permission system.
|
||||
|
||||
---
|
||||
|
||||
@@ -823,12 +894,12 @@ The configuration is automatically detected from `.opencode/opencode.json`.
|
||||
| Feature | Claude Code | OpenCode | Status |
|
||||
|---------|-------------|----------|--------|
|
||||
| Agents | ✅ 13 agents | ✅ 12 agents | **Claude Code leads** |
|
||||
| Commands | ✅ 32 commands | ✅ 24 commands | **Claude Code leads** |
|
||||
| Skills | ✅ 48 skills | ✅ 16 skills | **Claude Code leads** |
|
||||
| Hooks | ✅ 3 phases | ✅ 20+ events | **OpenCode has more!** |
|
||||
| Rules | ✅ 8 rules | ✅ 8 rules | **Full parity** |
|
||||
| MCP Servers | ✅ Full | ✅ Full | **Full parity** |
|
||||
| Custom Tools | ✅ Via hooks | ✅ Native support | **OpenCode is better** |
|
||||
| Commands | ✅ 33 commands | ✅ 24 commands | **Claude Code leads** |
|
||||
| Skills | ✅ 50+ skills | ✅ 37 skills | **Claude Code leads** |
|
||||
| Hooks | ✅ 8 event types | ✅ 11 events | **OpenCode has more!** |
|
||||
| Rules | ✅ 29 rules | ✅ 13 instructions | **Claude Code leads** |
|
||||
| MCP Servers | ✅ 14 servers | ✅ Full | **Full parity** |
|
||||
| Custom Tools | ✅ Via hooks | ✅ 6 native tools | **OpenCode is better** |
|
||||
|
||||
### Hook Support via Plugins
|
||||
|
||||
@@ -910,6 +981,34 @@ Then add to your `opencode.json`:
|
||||
|
||||
---
|
||||
|
||||
## Cross-Tool Feature Parity
|
||||
|
||||
ECC is the **first plugin to maximize every major AI coding tool**. Here's how each harness compares:
|
||||
|
||||
| Feature | Claude Code | Cursor IDE | Codex CLI | OpenCode |
|
||||
|---------|------------|------------|-----------|----------|
|
||||
| **Agents** | 13 | Shared (AGENTS.md) | Shared (AGENTS.md) | 12 |
|
||||
| **Commands** | 33 | Shared | Instruction-based | 24 |
|
||||
| **Skills** | 50+ | Shared | 10 (native format) | 37 |
|
||||
| **Hook Events** | 8 types | 15 types | None yet | 11 types |
|
||||
| **Hook Scripts** | 9 scripts | 16 scripts (DRY adapter) | N/A | Plugin hooks |
|
||||
| **Rules** | 29 (common + lang) | 29 (YAML frontmatter) | Instruction-based | 13 instructions |
|
||||
| **Custom Tools** | Via hooks | Via hooks | N/A | 6 native tools |
|
||||
| **MCP Servers** | 14 | Shared (mcp.json) | 4 (command-based) | Full |
|
||||
| **Config Format** | settings.json | hooks.json + rules/ | config.toml | opencode.json |
|
||||
| **Context File** | CLAUDE.md + AGENTS.md | AGENTS.md | AGENTS.md | AGENTS.md |
|
||||
| **Secret Detection** | Hook-based | beforeSubmitPrompt hook | Sandbox-based | Hook-based |
|
||||
| **Auto-Format** | PostToolUse hook | afterFileEdit hook | N/A | file.edited hook |
|
||||
| **Version** | Plugin | Plugin | Reference config | 1.6.0 |
|
||||
|
||||
**Key architectural decisions:**
|
||||
- **AGENTS.md** at root is the universal cross-tool file (read by all 4 tools)
|
||||
- **DRY adapter pattern** lets Cursor reuse Claude Code's hook scripts without duplication
|
||||
- **Skills format** (SKILL.md with YAML frontmatter) works across Claude Code, Codex, and OpenCode
|
||||
- Codex's lack of hooks is compensated by `persistent_instructions` and sandbox permissions
|
||||
|
||||
---
|
||||
|
||||
## 📖 Background
|
||||
|
||||
I've been using Claude Code since the experimental rollout. Won the Anthropic x Forum Ventures hackathon in Sep 2025 building [zenith.chat](https://zenith.chat) with [@DRodriguezFX](https://x.com/DRodriguezFX) - entirely using Claude Code.
|
||||
|
||||
Reference in New Issue
Block a user