Skip to content
Back to search

everything-claude-code

MarketplaceWorks with Claude CodeGitHub

Battle-tested Claude Code configurations from an Anthropic hackathon winner — agents, skills, hooks, commands, and rules evolved over 10+ months of intensive daily use

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tpavanipradeep--everything-claude-code/badge.svg)](/listings/tpavanipradeep--everything-claude-code)

HTML

<a href="/listings/tpavanipradeep--everything-claude-code"><img src="/api/listings/tpavanipradeep--everything-claude-code/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Get up and running in under 2 minutes:

Step 1: Install the Plugin

# Add marketplace
/plugin marketplace add affaan-m/everything-claude-code

# Install plugin
/plugin install everything-claude-code@everything-claude-code

Step 2: Install Rules (Required)

> ⚠️ **Important:** Claude Code plugins cannot distribute `rules` automatically. Install them manually:

# Clone the repo first
git clone https://github.com/affaan-m/everything-claude-code.git
cd everything-claude-code

# Install dependencies (pick your package manager)
npm install        # or: pnpm install | yarn install | bun install

# macOS/Linux
./install.sh typescript    # or python or golang or swift or php
# ./install.sh typescript python golang swift php
# ./install.sh --target cursor typescript
# ./install.sh --target antigravity typescript
# Windows PowerShell
.\install.ps1 typescript   # or python or golang or swift or php
# .\install.ps1 typescript python golang swift php
# .\install.ps1 --target cursor typescript
# .\install.ps1 --target antigravity typescript

# npm-installed compatibility entrypoint also works cross-platform
npx ecc-install typescript

For manual install instructions see the README in the `rules/` folder.

Step 3: Start Using

# Try a command (plugin install uses namespaced form)
/everything-claude-code:plan "Add user authentication"

# Manual install (Option 2) uses the shorter form:
# /plan "Add user authentication"

# Check available commands
/plugin list everything-claude-code@everything-claude-code

✨ **That's it!** You now have access to 25 agents, 108 skills, and 57 commands.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 49 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "everything-claude-code",
  4. "description": "Battle-tested Claude Code configurations from an Anthropic hackathon winner — agents, skills, hooks, commands, and rules evolved over 10+ months of intensive daily use",
  5. "owner": {
  6. "name": "Affaan Mustafa",
  7. "email": "me@affaanmustafa.com"
  8. },
  9. "metadata": {
  10. "description": "Battle-tested Claude Code configurations from an Anthropic hackathon winner"
  11. },
  12. "plugins": [
  13. {
  14. "name": "everything-claude-code",
  15. "source": "./",
  16. "description": "The most comprehensive Claude Code plugin — 14+ agents, 56+ skills, 33+ commands, and production-ready hooks for TDD, security scanning, code review, and continuous learning",
  17. "version": "1.8.0",
  18. "author": {
  19. "name": "Affaan Mustafa",
  20. "email": "me@affaanmustafa.com"
  21. },
  22. "homepage": "https://github.com/affaan-m/everything-claude-code",
  23. "repository": "https://github.com/affaan-m/everything-claude-code",
  24. "license": "MIT",
  25. "keywords": [
  26. "agents",
  27. "skills",
  28. "hooks",
  29. "commands",
  30. "tdd",
  31. "code-review",
  32. "security",
  33. "best-practices"
  34. ],
  35. "category": "workflow",
  36. "tags": [
  37. "agents",
  38. "skills",
  39. "hooks",
  40. "commands",
  41. "tdd",
  42. "code-review",
  43. "security",
  44. "best-practices"
  45. ],
  46. "strict": false
  47. }
  48. ]
  49. }
README.md · README · 1,316 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. **Language:** English | [简体中文](README.zh-CN.md) | [繁體中文](docs/zh-TW/README.md) | [日本語](docs/ja-JP/README.md) | [한국어](docs/ko-KR/README.md)
  2. # Everything Claude Code
  3. [![Stars](https://img.shields.io/github/stars/affaan-m/everything-claude-code?style=flat)](https://github.com/affaan-m/everything-claude-code/stargazers)
  4. [![Forks](https://img.shields.io/github/forks/affaan-m/everything-claude-code?style=flat)](https://github.com/affaan-m/everything-claude-code/network/members)
  5. [![Contributors](https://img.shields.io/github/contributors/affaan-m/everything-claude-code?style=flat)](https://github.com/affaan-m/everything-claude-code/graphs/contributors)
  6. [![npm ecc-universal](https://img.shields.io/npm/dw/ecc-universal?label=ecc-universal%20weekly%20downloads&logo=npm)](https://www.npmjs.com/package/ecc-universal)
  7. [![npm ecc-agentshield](https://img.shields.io/npm/dw/ecc-agentshield?label=ecc-agentshield%20weekly%20downloads&logo=npm)](https://www.npmjs.com/package/ecc-agentshield)
  8. [![GitHub App Install](https://img.shields.io/badge/GitHub%20App-150%20installs-2ea44f?logo=github)](https://github.com/marketplace/ecc-tools)
  9. [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
  10. ![Shell](https://img.shields.io/badge/-Shell-4EAA25?logo=gnu-bash&logoColor=white)
  11. ![TypeScript](https://img.shields.io/badge/-TypeScript-3178C6?logo=typescript&logoColor=white)
  12. ![Python](https://img.shields.io/badge/-Python-3776AB?logo=python&logoColor=white)
  13. ![Go](https://img.shields.io/badge/-Go-00ADD8?logo=go&logoColor=white)
  14. ![Java](https://img.shields.io/badge/-Java-ED8B00?logo=openjdk&logoColor=white)
  15. ![Perl](https://img.shields.io/badge/-Perl-39457E?logo=perl&logoColor=white)
  16. ![Markdown](https://img.shields.io/badge/-Markdown-000000?logo=markdown&logoColor=white)
  17. > **50K+ stars** | **6K+ forks** | **30 contributors** | **5 languages supported** | **Anthropic Hackathon Winner**
  18. ---
  19. <div align="center">
  20. **🌐 Language / 语言 / 語言**
  21. [**English**](README.md) | [简体中文](README.zh-CN.md) | [繁體中文](docs/zh-TW/README.md) | [日本語](docs/ja-JP/README.md) | [한국어](docs/ko-KR/README.md)
  22. </div>
  23. ---
  24. **The performance optimization system for AI agent harnesses. From an Anthropic hackathon winner.**
  25. Not just configs. A complete system: skills, instincts, memory optimization, continuous learning, security scanning, and research-first development. Production-ready agents, hooks, commands, rules, and MCP configurations evolved over 10+ months of intensive daily use building real products.
  26. Works across **Claude Code**, **Codex**, **Cowork**, and other AI agent harnesses.
  27. ---
  28. ## The Guides
  29. This repo is the raw code only. The guides explain everything.
  30. <table>
  31. <tr>
  32. <td width="50%">
  33. <a href="https://x.com/affaanmustafa/status/2012378465664745795">
  34. <img src="https://github.com/user-attachments/assets/1a471488-59cc-425b-8345-5245c7efbcef" alt="The Shorthand Guide to Everything Claude Code" />
  35. </a>
  36. </td>
  37. <td width="50%">
  38. <a href="https://x.com/affaanmustafa/status/2014040193557471352">
  39. <img src="https://github.com/user-attachments/assets/c9ca43bc-b149-427f-b551-af6840c368f0" alt="The Longform Guide to Everything Claude Code" />
  40. </a>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td align="center"><b>Shorthand Guide</b><br/>Setup, foundations, philosophy. <b>Read this first.</b></td>
  45. <td align="center"><b>Longform Guide</b><br/>Token optimization, memory persistence, evals, parallelization.</td>
  46. </tr>
  47. </table>
  48. | Topic | What You'll Learn |
  49. |-------|-------------------|
  50. | Token Optimization | Model selection, system prompt slimming, background processes |
  51. | Memory Persistence | Hooks that save/load context across sessions automatically |
  52. | Continuous Learning | Auto-extract patterns from sessions into reusable skills |
  53. | Verification Loops | Checkpoint vs continuous evals, grader types, pass@k metrics |
  54. | Parallelization | Git worktrees, cascade method, when to scale instances |
  55. | Subagent Orchestration | The context problem, iterative retrieval pattern |
  56. ---
  57. ## What's New
  58. ### v1.8.0 — Harness Performance System (Mar 2026)
  59. - **Harness-first release** — ECC is now explicitly framed as an agent harness performance system, not just a config pack.
  60. - **Hook reliability overhaul** — SessionStart root fallback, Stop-phase session summaries, and script-based hooks replacing fragile inline one-liners.
  61. - **Hook runtime controls** — `ECC_HOOK_PROFILE=minimal|standard|strict` and `ECC_DISABLED_HOOKS=...` for runtime gating without editing hook files.
  62. - **New harness commands** — `/harness-audit`, `/loop-start`, `/loop-status`, `/quality-gate`, `/model-route`.
  63. - **NanoClaw v2** — model routing, skill hot-load, session branch/search/export/compact/metrics.
  64. - **Cross-harness parity** — behavior tightened across Claude Code, Cursor, OpenCode, and Codex app/CLI.
  65. - **997 internal tests passing** — full suite green after hook/runtime refactor and compatibility updates.
  66. ### v1.7.0 — Cross-Platform Expansion & Presentation Builder (Feb 2026)
  67. - **Codex app + CLI support** — Direct `AGENTS.md`-based Codex support, installer targeting, and Codex docs
  68. - **`frontend-slides` skill** — Zero-dependency HTML presentation builder with PPTX conversion guidance and strict viewport-fit rules
  69. - **5 new generic business/content skills** — `article-writing`, `content-engine`, `market-research`, `investor-materials`, `investor-outreach`
  70. - **Broader tool coverage** — Cursor, Codex, and OpenCode support tightened so the same repo ships cleanly across all major harnesses
  71. - **992 internal tests** — Expanded validation and regression coverage across plugin, hooks, skills, and packaging
  72. ### v1.6.0 — Codex CLI, AgentShield & Marketplace (Feb 2026)
  73. - **Codex CLI support** — New `/codex-setup` command generates `codex.md` for OpenAI Codex CLI compatibility
  74. - **7 new skills** — `search-first`, `swift-actor-persistence`, `swift-protocol-di-testing`, `regex-vs-llm-structured-text`, `content-hash-cache-pattern`, `cost-aware-llm-pipeline`, `skill-stocktake`
  75. - **AgentShield integration** — `/security-scan` skill runs AgentShield directly from Claude Code; 1282 tests, 102 rules
  76. - **GitHub Marketplace** — ECC Tools GitHub App live at [github.com/marketplace/ecc-tools](https://github.com/marketplace/ecc-tools) with free/pro/enterprise tiers
  77. - **30+ community PRs merged** — Contributions from 30 contributors across 6 languages
  78. - **978 internal tests** — Expanded validation suite across agents, skills, commands, hooks, and rules
  79. ### v1.4.1 — Bug Fix (Feb 2026)
  80. - **Fixed instinct import content loss** — `parse_instinct_file()` was silently dropping all content after frontmatter (Action, Evidence, Examples sections) during `/instinct-import`. Fixed by community contributor @ericcai0814 ([#148](https://github.com/affaan-m/everything-claude-code/issues/148), [#161](https://github.com/affaan-m/everything-claude-code/pull/161))
  81. ### v1.4.0 — Multi-Language Rules, Installation Wizard & PM2 (Feb 2026)
  82. - **Interactive installation wizard** — New `configure-ecc` skill provides guided setup with merge/overwrite detection
  83. - **PM2 & multi-agent orchestration** — 6 new commands (`/pm2`, `/multi-plan`, `/multi-execute`, `/multi-backend`, `/multi-frontend`, `/multi-workflow`) for managing complex multi-service workflows
  84. - **Multi-language rules architecture** — Rules restructured from flat files into `common/` + `typescript/` + `python/` + `golang/` directories. Install only the languages you need
  85. - **Chinese (zh-CN) translations** — Complete translation of all agents, commands, skills, and rules (80+ files)
  86. - **GitHub Sponsors support** — Sponsor the project via GitHub Sponsors
  87. - **Enhanced CONTRIBUTING.md** — Detailed PR templates for each contribution type
  88. ### v1.3.0 — OpenCode Plugin Support (Feb 2026)
  89. - **Full OpenCode integration** — 12 agents, 24 commands, 16 skills with hook support via OpenCode's plugin system (20+ event types)
  90. - **3 native custom tools** — run-tests, check-coverage, security-audit
  91. - **LLM documentation** — `llms.txt` for comprehensive OpenCode docs
  92. ### v1.2.0 — Unified Commands & Skills (Feb 2026)
  93. - **Python/Django support** — Django patterns, security, TDD, and verification skills
  94. - **Java Spring Boot skills** — Patterns, security, TDD, and verification for Spring Boot
  95. - **Session management** — `/sessions` command for session history
  96. - **Continuous learning v2** — Instinct-based learning with confidence scoring, import/export, evolution
  97. See the full changelog in [Releases](https://github.com/affaan-m/everything-claude-code/releases).
  98. ---
  99. ## 🚀 Quick Start
  100. Get up and running in under 2 minutes:
  101. ### Step 1: Install the Plugin
  102. ```bash
  103. # Add marketplace
  104. /plugin marketplace add affaan-m/everything-claude-code
  105. # Install plugin
  106. /plugin install everything-claude-code@everything-claude-code
  107. ```
  108. ### Step 2: Install Rules (Required)
  109. > ⚠️ **Important:** Claude Code plugins cannot distribute `rules` automatically. Install them manually:
  110. ```bash
  111. # Clone the repo first
  112. git clone https://github.com/affaan-m/everything-claude-code.git
  113. cd everything-claude-code
  114. # Install dependencies (pick your package manager)
  115. npm install # or: pnpm install | yarn install | bun install
  116. # macOS/Linux
  117. ./install.sh typescript # or python or golang or swift or php
  118. # ./install.sh typescript python golang swift php
  119. # ./install.sh --target cursor typescript
  120. # ./install.sh --target antigravity typescript
  121. ```
  122. ```powershell
  123. # Windows PowerShell
  124. .\install.ps1 typescript # or python or golang or swift or php
  125. # .\install.ps1 typescript python golang swift php
  126. # .\install.ps1 --target cursor typescript
  127. # .\install.ps1 --target antigravity typescript
  128. # npm-installed compatibility entrypoint also works cross-platform
  129. npx ecc-install typescript
  130. ```
  131. For manual install instructions see the README in the `rules/` folder.
  132. ### Step 3: Start Using
  133. ```bash
  134. # Try a command (plugin install uses namespaced form)
  135. /everything-claude-code:plan "Add user authentication"
  136. # Manual install (Option 2) uses the shorter form:
  137. # /plan "Add user authentication"
  138. # Check available commands
  139. /plugin list everything-claude-code@everything-claude-code
  140. ```
  141. ✨ **That's it!** You now have access to 25 agents, 108 skills, and 57 commands.
  142. ---
  143. ## 🌐 Cross-Platform Support
  144. This plugin now fully supports **Windows, macOS, and Linux**, alongside tight integration across major IDEs (Cursor, OpenCode, Antigravity) and CLI harnesses. All hooks and scripts have been rewritten in Node.js for maximum compatibility.
  145. ### Package Manager Detection
  146. The plugin automatically detects your preferred package manager (npm, pnpm, yarn, or bun) with the following priority:
  147. 1. **Environment variable**: `CLAUDE_PACKAGE_MANAGER`
  148. 2. **Project config**: `.claude/package-manager.json`
  149. 3. **package.json**: `packageManager` field
  150. 4. **Lock file**: Detection from package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
  151. 5. **Global config**: `~/.claude/package-manager.json`
  152. 6. **Fallback**: First available package manager
  153. To set your preferred package manager:
  154. ```bash
  155. # Via environment variable
  156. export CLAUDE_PACKAGE_MANAGER=pnpm
  157. # Via global config
  158. node scripts/setup-package-manager.js --global pnpm
  159. # Via project config
  160. node scripts/setup-package-manager.js --project bun
  161. # Detect current setting
  162. node scripts/setup-package-manager.js --detect
  163. ```
  164. Or use the `/setup-pm` command in Claude Code.
  165. ### Hook Runtime Controls
  166. Use runtime flags to tune strictness or disable specific hooks temporarily:
  167. ```bash
  168. # Hook strictness profile (default: standard)
  169. export ECC_HOOK_PROFILE=standard
  170. # Comma-separated hook IDs to disable
  171. export ECC_DISABLED_HOOKS="pre:bash:tmux-reminder,post:edit:typecheck"
  172. ```
  173. ---
  174. ## 📦 What's Inside
  175. This repo is a **Claude Code plugin** - install it directly or copy components manually.
  176. ```
  177. everything-claude-code/
  178. |-- .claude-plugin/ # Plugin and marketplace manifests
  179. | |-- plugin.json # Plugin metadata and component paths
  180. | |-- marketplace.json # Marketplace catalog for /plugin marketplace add
  181. |
  182. |-- agents/ # Specialized subagents for delegation
  183. | |-- planner.md # Feature implementation planning
  184. | |-- architect.md # System design decisions
  185. | |-- tdd-guide.md # Test-driven development
  186. | |-- code-reviewer.md # Quality and security review
  187. | |-- security-reviewer.md # Vulnerability analysis
  188. | |-- build-error-resolver.md
  189. | |-- e2e-runner.md # Playwright E2E testing
  190. | |-- refactor-cleaner.md # Dead code cleanup
  191. | |-- doc-updater.md # Documentation sync
  192. | |-- go-reviewer.md # Go code review
  193. | |-- go-build-resolver.md # Go build error resolution
  194. | |-- python-reviewer.md # Python code review (NEW)
  195. | |-- database-reviewer.md # Database/Supabase review (NEW)
  196. |
  197. |-- skills/ # Workflow definitions and domain knowledge
  198. | |-- coding-standards/ # Language best practices
  199. | |-- clickhouse-io/ # ClickHouse analytics, queries, data engineering
  200. | |-- backend-patterns/ # API, database, caching patterns
  201. | |-- frontend-patterns/ # React, Next.js patterns
  202. | |-- frontend-slides/ # HTML slide decks and PPTX-to-web presentation workflows (NEW)
  203. | |-- article-writing/ # Long-form writing in a supplied voice without generic AI tone (NEW)
  204. | |-- content-engine/ # Multi-platform social content and repurposing workflows (NEW)
  205. | |-- market-research/ # Source-attributed market, competitor, and investor research (NEW)
  206. | |-- investor-materials/ # Pitch decks, one-pagers, memos, and financial models (NEW)
  207. | |-- investor-outreach/ # Personalized fundraising outreach and follow-up (NEW)
  208. | |-- continuous-learning/ # Auto-extract patterns from sessions (Longform Guide)
  209. | |-- continuous-learning-v2/ # Instinct-based learning with confidence scoring
  210. | |-- iterative-retrieval/ # Progressive context refinement for subagents
  211. | |-- strategic-compact/ # Manual compaction suggestions (Longform Guide)
  212. | |-- tdd-workflow/ # TDD methodology
  213. | |-- security-review/ # Security checklist
  214. | |-- eval-harness/ # Verification loop evaluation (Longform Guide)
  215. | |-- verification-loop/ # Continuous verification (Longform Guide)
  216. | |-- videodb/ # Video and audio: ingest, search, edit, generate, stream (NEW)
  217. | |-- golang-patterns/ # Go idioms and best practices
  218. | |-- golang-testing/ # Go testing patterns, TDD, benchmarks
  219. | |-- cpp-coding-standards/ # C++ coding standards from C++ Core Guidelines (NEW)
  220. | |-- cpp-testing/ # C++ testing with GoogleTest, CMake/CTest (NEW)
  221. | |-- django-patterns/ # Django patterns, models, views (NEW)
  222. | |-- django-security/ # Django security best practices (NEW)
  223. | |-- django-tdd/ # Django TDD workflow (NEW)
  224. | |-- django-verification/ # Django verification loops (NEW)
  225. | |-- laravel-patterns/ # Laravel architecture patterns (NEW)
  226. | |-- laravel-security/ # Laravel security best practices (NEW)
  227. | |-- laravel-tdd/ # Laravel TDD workflow (NEW)
  228. | |-- laravel-verification/ # Laravel verification loops (NEW)
  229. | |-- python-patterns/ # Python idioms and best practices (NEW)
  230. | |-- python-testing/ # Python testing with pytest (NEW)
  231. | |-- springboot-patterns/ # Java Spring Boot patterns (NEW)
  232. | |-- springboot-security/ # Spring Boot security (NEW)
  233. | |-- springboot-tdd/ # Spring Boot TDD (NEW)
  234. | |-- springboot-verification/ # Spring Boot verification (NEW)
  235. | |-- configure-ecc/ # Interactive installation wizard (NEW)
  236. | |-- security-scan/ # AgentShield security auditor integration (NEW)
  237. | |-- java-coding-standards/ # Java coding standards (NEW)
  238. | |-- jpa-patterns/ # JPA/Hibernate patterns (NEW)
  239. | |-- postgres-patterns/ # PostgreSQL optimization patterns (NEW)
  240. | |-- nutrient-document-processing/ # Document processing with Nutrient API (NEW)
  241. | |-- project-guidelines-example/ # Template for project-specific skills
  242. | |-- database-migrations/ # Migration patterns (Prisma, Drizzle, Django, Go) (NEW)
  243. | |-- api-design/ # REST API design, pagination, error responses (NEW)
  244. | |-- deployment-patterns/ # CI/CD, Docker, health checks, rollbacks (NEW)
  245. | |-- docker-patterns/ # Docker Compose, networking, volumes, container security (NEW)
  246. | |-- e2e-testing/ # Playwright E2E patterns and Page Object Model (NEW)
  247. | |-- content-hash-cache-pattern/ # SHA-256 content hash caching for file processing (NEW)
  248. | |-- cost-aware-llm-pipeline/ # LLM cost optimization, model routing, budget tracking (NEW)
  249. | |-- regex-vs-llm-structured-text/ # Decision framework: regex vs LLM for text parsing (NEW)
  250. | |-- swift-actor-persistence/ # Thread-safe Swift data persistence with actors (NEW)
  251. | |-- swift-protocol-di-testing/ # Protocol-based DI for testable Swift code (NEW)
  252. | |-- search-first/ # Research-before-coding workflow (NEW)
  253. | |-- skill-stocktake/ # Audit skills and commands for quality (NEW)
  254. | |-- liquid-glass-design/ # iOS 26 Liquid Glass design system (NEW)
  255. | |-- foundation-models-on-device/ # Apple on-device LLM with FoundationModels (NEW)
  256. | |-- swift-concurrency-6-2/ # Swift 6.2 Approachable Concurrency (NEW)
  257. | |-- perl-patterns/ # Modern Perl 5.36+ idioms and best practices (NEW)
  258. | |-- perl-security/ # Perl security patterns, taint mode, safe I/O (NEW)
  259. | |-- perl-testing/ # Perl TDD with Test2::V0, prove, Devel::Cover (NEW)
  260. | |-- autonomous-loops/ # Autonomous loop patterns: sequential pipelines, PR loops, DAG orchestration (NEW)
  261. | |-- plankton-code-quality/ # Write-time code quality enforcement with Plankton hooks (NEW)
  262. |
  263. |-- commands/ # Slash commands for quick execution
  264. | |-- tdd.md # /tdd - Test-driven development
  265. | |-- plan.md # /plan - Implementation planning
  266. | |-- e2e.md # /e2e - E2E test generation
  267. | |-- code-review.md # /code-review - Quality review
  268. | |-- build-fix.md # /build-fix - Fix build errors
  269. | |-- refactor-clean.md # /refactor-clean - Dead code removal
  270. | |-- learn.md # /learn - Extract patterns mid-session (Longform Guide)
  271. | |-- learn-eval.md # /learn-eval - Extract, evaluate, and save patterns (NEW)
  272. | |-- checkpoint.md # /checkpoint - Save verification state (Longform Guide)
  273. | |-- verify.md # /verify - Run verification loop (Longform Guide)
  274. | |-- setup-pm.md # /setup-pm - Configure package manager
  275. | |-- go-review.md # /go-review - Go code review (NEW)
  276. | |-- go-test.md # /go-test - Go TDD workflow (NEW)
  277. | |-- go-build.md # /go-build - Fix Go build errors (NEW)
  278. | |-- skill-create.md # /skill-create - Generate skills from git history (NEW)
  279. | |-- instinct-status.md # /instinct-status - View learned instincts (NEW)
  280. | |-- instinct-import.md # /instinct-import - Import instincts (NEW)
  281. | |-- instinct-export.md # /instinct-export - Export instincts (NEW)
  282. | |-- evolve.md # /evolve - Cluster instincts into skills
  283. | |-- pm2.md # /pm2 - PM2 service lifecycle management (NEW)
  284. | |-- multi-plan.md # /multi-plan - Multi-agent task decomposition (NEW)
  285. | |-- multi-execute.md # /multi-execute - Orchestrated multi-agent workflows (NEW)
  286. | |-- multi-backend.md # /multi-backend - Backend multi-service orchestration (NEW)
  287. | |-- multi-frontend.md # /multi-frontend - Frontend multi-service orchestration (NEW)
  288. | |-- multi-workflow.md # /multi-workflow - General multi-service workflows (NEW)
  289. | |-- orchestrate.md # /orchestrate - Multi-agent coordination
  290. | |-- sessions.md # /sessions - Session history management
  291. | |-- eval.md # /eval - Evaluate against criteria
  292. | |-- test-coverage.md # /test-coverage - Test coverage analysis
  293. | |-- update-docs.md # /update-docs - Update documentation
  294. | |-- update-codemaps.md # /update-codemaps - Update codemaps
  295. | |-- python-review.md # /python-review - Python code review (NEW)
  296. |
  297. |-- rules/ # Always-follow guidelines (copy to ~/.claude/rules/)
  298. | |-- README.md # Structure overview and installation guide
  299. | |-- common/ # Language-agnostic principles
  300. | | |-- coding-style.md # Immutability, file organization
  301. | | |-- git-workflow.md # Commit format, PR process
  302. | | |-- testing.md # TDD, 80% coverage requirement
  303. | | |-- performance.md # Model selection, context management
  304. | | |-- patterns.md # Design patterns, skeleton projects
  305. | | |-- hooks.md # Hook architecture, TodoWrite
  306. | | |-- agents.md # When to delegate to subagents
  307. | | |-- security.md # Mandatory security checks
  308. | |-- typescript/ # TypeScript/JavaScript specific
  309. | |-- python/ # Python specific
  310. | |-- golang/ # Go specific
  311. | |-- swift/ # Swift specific
  312. | |-- php/ # PHP specific (NEW)
  313. |
  314. |-- hooks/ # Trigger-based automations
  315. | |-- README.md # Hook documentation, recipes, and customization guide
  316. | |-- hooks.json # All hooks config (PreToolUse, PostToolUse, Stop, etc.)
  317. | |-- memory-persistence/ # Session lifecycle hooks (Longform Guide)
  318. | |-- strategic-compact/ # Compaction suggestions (Longform Guide)
  319. |
  320. |-- scripts/ # Cross-platform Node.js scripts (NEW)
  321. | |-- lib/ # Shared utilities
  322. | | |-- utils.js # Cross-platform file/path/system utilities
  323. | | |-- package-manager.js # Package manager detection and selection
  324. | |-- hooks/ # Hook implementations
  325. | | |-- session-start.js # Load context on session start
  326. | | |-- session-end.js # Save state on session end
  327. | | |-- pre-compact.js # Pre-compaction state saving
  328. | | |-- suggest-compact.js # Strategic compaction suggestions
  329. | | |-- evaluate-session.js # Extract patterns from sessions
  330. | |-- setup-package-manager.js # Interactive PM setup
  331. |
  332. |-- tests/ # Test suite (NEW)
  333. | |-- lib/ # Library tests
  334. | |-- hooks/ # Hook tests
  335. | |-- run-all.js # Run all tests
  336. |
  337. |-- contexts/ # Dynamic system prompt injection contexts (Longform Guide)
  338. | |-- dev.md # Development mode context
  339. | |-- review.md # Code review mode context
  340. | |-- research.md # Research/exploration mode context
  341. |
  342. |-- examples/ # Example configurations and sessions
  343. | |-- CLAUDE.md # Example project-level config
  344. | |-- user-CLAUDE.md # Example user-level config
  345. | |-- saas-nextjs-CLAUDE.md # Real-world SaaS (Next.js + Supabase + Stripe)
  346. | |-- go-microservice-CLAUDE.md # Real-world Go microservice (gRPC + PostgreSQL)
  347. | |-- django-api-CLAUDE.md # Real-world Django REST API (DRF + Celery)
  348. | |-- laravel-api-CLAUDE.md # Real-world Laravel API (PostgreSQL + Redis) (NEW)
  349. | |-- rust-api-CLAUDE.md # Real-world Rust API (Axum + SQLx + PostgreSQL) (NEW)
  350. |
  351. |-- mcp-configs/ # MCP server configurations
  352. | |-- mcp-servers.json # GitHub, Supabase, Vercel, Railway, etc.
  353. |
  354. |-- marketplace.json # Self-hosted marketplace config (for /plugin marketplace add)
  355. ```
  356. ---
  357. ## 🛠️ Ecosystem Tools
  358. ### Skill Creator
  359. Two ways to generate Claude Code skills from your repository:
  360. #### Option A: Local Analysis (Built-in)
  361. Use the `/skill-create` command for local analysis without external services:
  362. ```bash
  363. /skill-create # Analyze current repo
  364. /skill-create --instincts # Also generate instincts for continuous-learning
  365. ```
  366. This analyzes your git history locally and generates SKILL.md files.
  367. #### Option B: GitHub App (Advanced)
  368. For advanced features (10k+ commits, auto-PRs, team sharing):
  369. [Install GitHub App](https://github.com/apps/skill-creator) | [ecc.tools](https://ecc.tools)
  370. ```bash
  371. # Comment on any issue:
  372. /skill-creator analyze
  373. # Or auto-triggers on push to default branch
  374. ```
  375. Both options create:
  376. - **SKILL.md files** - Ready-to-use skills for Claude Code
  377. - **Instinct collections** - For continuous-learning-v2
  378. - **Pattern extraction** - Learns from your commit history
  379. ### AgentShield — Security Auditor
  380. > Built at the Claude Code Hackathon (Cerebral Valley x Anthropic, Feb 2026). 1282 tests, 98% coverage, 102 static analysis rules.
  381. Scan your Claude Code configuration for vulnerabilities, misconfigurations, and injection risks.
  382. ```bash
  383. # Quick scan (no install needed)
  384. npx ecc-agentshield scan
  385. # Auto-fix safe issues
  386. npx ecc-agentshield scan --fix
  387. # Deep analysis with three Opus 4.6 agents
  388. npx ecc-agentshield scan --opus --stream
  389. # Generate secure config from scratch
  390. npx ecc-agentshield init
  391. ```
  392. **What it scans:** CLAUDE.md, settings.json, MCP configs, hooks, agent definitions, and skills across 5 categories — secrets detection (14 patterns), permission auditing, hook injection analysis, MCP server risk profiling, and agent config review.
  393. **The `--opus` flag** runs three Claude Opus 4.6 agents in a red-team/blue-team/auditor pipeline. The attacker finds exploit chains, the defender evaluates protections, and the auditor synthesizes both into a prioritized risk assessment. Adversarial reasoning, not just pattern matching.
  394. **Output formats:** Terminal (color-graded A-F), JSON (CI pipelines), Markdown, HTML. Exit code 2 on critical findings for build gates.
  395. Use `/security-scan` in Claude Code to run it, or add to CI with the [GitHub Action](https://github.com/affaan-m/agentshield).
  396. [GitHub](https://github.com/affaan-m/agentshield) | [npm](https://www.npmjs.com/package/ecc-agentshield)
  397. ### 🔬 Plankton — Write-Time Code Quality Enforcement
  398. Plankton (credit: @alxfazio) is a recommended companion for write-time code quality enforcement. It runs formatters and 20+ linters on every file edit via PostToolUse hooks, then spawns Claude subprocesses (routed to Haiku/Sonnet/Opus by violation complexity) to fix issues the main agent missed. Three-phase architecture: auto-format silently (40-50% of issues), collect remaining violations as structured JSON, delegate fixes to a subprocess. Includes config protection hooks that prevent agents from modifying linter configs to pass instead of fixing code. Supports Python, TypeScript, Shell, YAML, JSON, TOML, Markdown, and Dockerfile. Use alongside AgentShield for security + quality coverage. See `skills/plankton-code-quality/` for full integration guide.
  399. ### 🧠 Continuous Learning v2
  400. The instinct-based learning system automatically learns your patterns:
  401. ```bash
  402. /instinct-status # Show learned instincts with confidence
  403. /instinct-import <file> # Import instincts from others
  404. /instinct-export # Export your instincts for sharing
  405. /evolve # Cluster related instincts into skills
  406. ```
  407. See `skills/continuous-learning-v2/` for full documentation.
  408. ---
  409. ## 📋 Requirements
  410. ### Claude Code CLI Version
  411. **Minimum version: v2.1.0 or later**
  412. This plugin requires Claude Code CLI v2.1.0+ due to changes in how the plugin system handles hooks.
  413. Check your version:
  414. ```bash
  415. claude --version
  416. ```
  417. ### Important: Hooks Auto-Loading Behavior
  418. > ⚠️ **For Contributors:** Do NOT add a `"hooks"` field to `.claude-plugin/plugin.json`. This is enforced by a regression test.
  419. Claude Code v2.1+ **automatically loads** `hooks/hooks.json` from any installed plugin by convention. Explicitly declaring it in `plugin.json` causes a duplicate detection error:
  420. ```
  421. Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file
  422. ```
  423. **History:** This has caused repeated fix/revert cycles in this repo ([#29](https://github.com/affaan-m/everything-claude-code/issues/29), [#52](https://github.com/affaan-m/everything-claude-code/issues/52), [#103](https://github.com/affaan-m/everything-claude-code/issues/103)). The behavior changed between Claude Code versions, leading to confusion. We now have a regression test to prevent this from being reintroduced.
  424. ---
  425. ## 📥 Installation
  426. ### Option 1: Install as Plugin (Recommended)
  427. The easiest way to use this repo - install as a Claude Code plugin:
  428. ```bash
  429. # Add this repo as a marketplace
  430. /plugin marketplace add affaan-m/everything-claude-code
  431. # Install the plugin
  432. /plugin install everything-claude-code@everything-claude-code
  433. ```
  434. Or add directly to your `~/.claude/settings.json`:
  435. ```json
  436. {
  437. "extraKnownMarketplaces": {
  438. "everything-claude-code": {
  439. "source": {
  440. "source": "github",
  441. "repo": "affaan-m/everything-claude-code"
  442. }
  443. }
  444. },
  445. "enabledPlugins": {
  446. "everything-claude-code@everything-claude-code": true
  447. }
  448. }
  449. ```
  450. This gives you instant access to all commands, agents, skills, and hooks.
  451. > **Note:** The Claude Code plugin system does not support distributing `rules` via plugins ([upstream limitation](https://code.claude.com/docs/en/plugins-reference)). You need to install rules manually:
  452. >
  453. > ```bash
  454. > # Clone the repo first
  455. > git clone https://github.com/affaan-m/everything-claude-code.git
  456. >
  457. > # Option A: User-level rules (applies to all projects)
  458. > mkdir -p ~/.claude/rules
  459. > cp -r everything-claude-code/rules/common/* ~/.claude/rules/
  460. > cp -r everything-claude-code/rules/typescript/* ~/.claude/rules/ # pick your stack
  461. > cp -r everything-claude-code/rules/python/* ~/.claude/rules/
  462. > cp -r everything-claude-code/rules/golang/* ~/.claude/rules/
  463. > cp -r everything-claude-code/rules/php/* ~/.claude/rules/
  464. >
  465. > # Option B: Project-level rules (applies to current project only)
  466. > mkdir -p .claude/rules
  467. > cp -r everything-claude-code/rules/common/* .claude/rules/
  468. > cp -r everything-claude-code/rules/typescript/* .claude/rules/ # pick your stack
  469. > ```
  470. ---
  471. ### 🔧 Option 2: Manual Installation
  472. If you prefer manual control over what's installed:
  473. ```bash
  474. # Clone the repo
  475. git clone https://github.com/affaan-m/everything-claude-code.git
  476. # Copy agents to your Claude config
  477. cp everything-claude-code/agents/*.md ~/.claude/agents/
  478. # Copy rules (common + language-specific)
  479. cp -r everything-claude-code/rules/common/* ~/.claude/rules/
  480. cp -r everything-claude-code/rules/typescript/* ~/.claude/rules/ # pick your stack
  481. cp -r everything-claude-code/rules/python/* ~/.claude/rules/
  482. cp -r everything-claude-code/rules/golang/* ~/.claude/rules/
  483. cp -r everything-claude-code/rules/php/* ~/.claude/rules/
  484. # Copy commands
  485. cp everything-claude-code/commands/*.md ~/.claude/commands/
  486. # Copy skills (core vs niche)
  487. # Recommended (new users): core/general skills only
  488. cp -r everything-claude-code/.agents/skills/* ~/.claude/skills/
  489. cp -r everything-claude-code/skills/search-first ~/.claude/skills/
  490. # Optional: add niche/framework-specific skills only when needed
  491. # for s in django-patterns django-tdd laravel-patterns springboot-patterns; do
  492. # cp -r everything-claude-code/skills/$s ~/.claude/skills/
  493. # done
  494. ```
  495. #### Add hooks to settings.json
  496. Copy the hooks from `hooks/hooks.json` to your `~/.claude/settings.json`.
  497. #### Configure MCPs
  498. Copy desired MCP servers from `mcp-configs/mcp-servers.json` to your `~/.claude.json`.
  499. **Important:** Replace `YOUR_*_HERE` placeholders with your actual API keys.
  500. ---
  501. ## 🎯 Key Concepts
  502. ### Agents
  503. Subagents handle delegated tasks with limited scope. Example:
  504. ```markdown
  505. ---
  506. name: code-reviewer
  507. description: Reviews code for quality, security, and maintainability
  508. tools: ["Read", "Grep", "Glob", "Bash"]
  509. model: opus
  510. ---
  511. You are a senior code reviewer...
  512. ```
  513. ### Skills
  514. Skills are workflow definitions invoked by commands or agents:
  515. ```markdown
  516. # TDD Workflow
  517. 1. Define interfaces first
  518. 2. Write failing tests (RED)
  519. 3. Implement minimal code (GREEN)
  520. 4. Refactor (IMPROVE)
  521. 5. Verify 80%+ coverage
  522. ```
  523. ### Hooks
  524. Hooks fire on tool events. Example - warn about console.log:
  525. ```json
  526. {
  527. "matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
  528. "hooks": [{
  529. "type": "command",
  530. "command": "#!/bin/bash\ngrep -n 'console\\.log' \"$file_path\" && echo '[Hook] Remove console.log' >&2"
  531. }]
  532. }
  533. ```
  534. ### Rules
  535. Rules are always-follow guidelines, organized into `common/` (language-agnostic) + language-specific directories:
  536. ```
  537. rules/
  538. common/ # Universal principles (always install)
  539. typescript/ # TS/JS specific patterns and tools
  540. python/ # Python specific patterns and tools
  541. golang/ # Go specific patterns and tools
  542. swift/ # Swift specific patterns and tools
  543. php/ # PHP specific patterns and tools
  544. ```
  545. See [`rules/README.md`](rules/README.md) for installation and structure details.
  546. ---
  547. ## 🗺️ Which Agent Should I Use?
  548. Not sure where to start? Use this quick reference:
  549. | I want to... | Use this command | Agent used |
  550. |--------------|-----------------|------------|
  551. | Plan a new feature | `/everything-claude-code:plan "Add auth"` | planner |
  552. | Design system architecture | `/everything-claude-code:plan` + architect agent | architect |
  553. | Write code with tests first | `/tdd` | tdd-guide |
  554. | Review code I just wrote | `/code-review` | code-reviewer |
  555. | Fix a failing build | `/build-fix` | build-error-resolver |
  556. | Run end-to-end tests | `/e2e` | e2e-runner |
  557. | Find security vulnerabilities | `/security-scan` | security-reviewer |
  558. | Remove dead code | `/refactor-clean` | refactor-cleaner |
  559. | Update documentation | `/update-docs` | doc-updater |
  560. | Review Go code | `/go-review` | go-reviewer |
  561. | Review Python code | `/python-review` | python-reviewer |
  562. | Audit database queries | *(auto-delegated)* | database-reviewer |
  563. ### Common Workflows
  564. **Starting a new feature:**
  565. ```
  566. /everything-claude-code:plan "Add user authentication with OAuth"
  567. → planner creates implementation blueprint
  568. /tdd → tdd-guide enforces write-tests-first
  569. /code-review → code-reviewer checks your work
  570. ```
  571. **Fixing a bug:**
  572. ```
  573. /tdd → tdd-guide: write a failing test that reproduces it
  574. → implement the fix, verify test passes
  575. /code-review → code-reviewer: catch regressions
  576. ```
  577. **Preparing for production:**
  578. ```
  579. /security-scan → security-reviewer: OWASP Top 10 audit
  580. /e2e → e2e-runner: critical user flow tests
  581. /test-coverage → verify 80%+ coverage
  582. ```
  583. ---
  584. ## ❓ FAQ
  585. <details>
  586. <summary><b>How do I check which agents/commands are installed?</b></summary>
  587. ```bash
  588. /plugin list everything-claude-code@everything-claude-code
  589. ```
  590. This shows all available agents, commands, and skills from the plugin.
  591. </details>
  592. <details>
  593. <summary><b>My hooks aren't working / I see "Duplicate hooks file" errors</b></summary>
  594. This is the most common issue. **Do NOT add a `"hooks"` field to `.claude-plugin/plugin.json`.** Claude Code v2.1+ automatically loads `hooks/hooks.json` from installed plugins. Explicitly declaring it causes duplicate detection errors. See [#29](https://github.com/affaan-m/everything-claude-code/issues/29), [#52](https://github.com/affaan-m/everything-claude-code/issues/52), [#103](https://github.com/affaan-m/everything-claude-code/issues/103).
  595. </details>
  596. <details>
  597. <summary><b>Can I use ECC with Claude Code on a custom API endpoint or model gateway?</b></summary>
  598. Yes. ECC does not hardcode Anthropic-hosted transport settings. It runs locally through Claude Code's normal CLI/plugin surface, so it works with:
  599. - Anthropic-hosted Claude Code
  600. - Official Claude Code gateway setups using `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN`
  601. - Compatible custom endpoints that speak the Anthropic API Claude Code expects
  602. Minimal example:
  603. ```bash
  604. export ANTHROPIC_BASE_URL=https://your-gateway.example.com
  605. export ANTHROPIC_AUTH_TOKEN=your-token
  606. claude
  607. ```
  608. If your gateway remaps model names, configure that in Claude Code rather than in ECC. ECC's hooks, skills, commands, and rules are model-provider agnostic once the `claude` CLI is already working.
  609. Official references:
  610. - [Claude Code LLM gateway docs](https://docs.anthropic.com/en/docs/claude-code/llm-gateway)
  611. - [Claude Code model configuration docs](https://docs.anthropic.com/en/docs/claude-code/model-config)
  612. </details>
  613. <details>
  614. <summary><b>My context window is shrinking / Claude is running out of context</b></summary>
  615. Too many MCP servers eat your context. Each MCP tool description consumes tokens from your 200k window, potentially reducing it to ~70k.
  616. **Fix:** Disable unused MCPs per project:
  617. ```json
  618. // In your project's .claude/settings.json
  619. {
  620. "disabledMcpServers": ["supabase", "railway", "vercel"]
  621. }
  622. ```
  623. Keep under 10 MCPs enabled and under 80 tools active.
  624. </details>
  625. <details>
  626. <summary><b>Can I use only some components (e.g., just agents)?</b></summary>
  627. Yes. Use Option 2 (manual installation) and copy only what you need:
  628. ```bash
  629. # Just agents
  630. cp everything-claude-code/agents/*.md ~/.claude/agents/
  631. # Just rules
  632. cp -r everything-claude-code/rules/common/* ~/.claude/rules/
  633. ```
  634. Each component is fully independent.
  635. </details>
  636. <details>
  637. <summary><b>Does this work with Cursor / OpenCode / Codex / Antigravity?</b></summary>
  638. Yes. ECC is cross-platform:
  639. - **Cursor**: Pre-translated configs in `.cursor/`. See [Cursor IDE Support](#cursor-ide-support).
  640. - **OpenCode**: Full plugin support in `.opencode/`. See [OpenCode Support](#-opencode-support).
  641. - **Codex**: First-class support for both macOS app and CLI, with adapter drift guards and SessionStart fallback. See PR [#257](https://github.com/affaan-m/everything-claude-code/pull/257).
  642. - **Antigravity**: Tightly integrated setup for workflows, skills, and flatten rules in `.agent/`.
  643. - **Claude Code**: Native — this is the primary target.
  644. </details>
  645. <details>
  646. <summary><b>How do I contribute a new skill or agent?</b></summary>
  647. See [CONTRIBUTING.md](CONTRIBUTING.md). The short version:
  648. 1. Fork the repo
  649. 2. Create your skill in `skills/your-skill-name/SKILL.md` (with YAML frontmatter)
  650. 3. Or create an agent in `agents/your-agent.md`
  651. 4. Submit a PR with a clear description of what it does and when to use it
  652. </details>
  653. ---
  654. ## 🧪 Running Tests
  655. The plugin includes a comprehensive test suite:
  656. ```bash
  657. # Run all tests
  658. node tests/run-all.js
  659. # Run individual test files
  660. node tests/lib/utils.test.js
  661. node tests/lib/package-manager.test.js
  662. node tests/hooks/hooks.test.js
  663. ```
  664. ---
  665. ## 🤝 Contributing
  666. **Contributions are welcome and encouraged.**
  667. This repo is meant to be a community resource. If you have:
  668. - Useful agents or skills
  669. - Clever hooks
  670. - Better MCP configurations
  671. - Improved rules
  672. Please contribute! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  673. ### Ideas for Contributions
  674. - Language-specific skills (Rust, C#, Kotlin, Java) — Go, Python, Perl, Swift, and TypeScript already included
  675. - Framework-specific configs (Rails, FastAPI, NestJS) — Django, Spring Boot, Laravel already included
  676. - DevOps agents (Kubernetes, Terraform, AWS, Docker)
  677. - Testing strategies (different frameworks, visual regression)
  678. - Domain-specific knowledge (ML, data engineering, mobile)
  679. ---
  680. ## Cursor IDE Support
  681. ECC provides **full Cursor IDE support** with hooks, rules, agents, skills, commands, and MCP configs adapted for Cursor's native format.
  682. ### Quick Start (Cursor)
  683. ```bash
  684. # macOS/Linux
  685. ./install.sh --target cursor typescript
  686. ./install.sh --target cursor python golang swift php
  687. ```
  688. ```powershell
  689. # Windows PowerShell
  690. .\install.ps1 --target cursor typescript
  691. .\install.ps1 --target cursor python golang swift php
  692. ```
  693. ### What's Included
  694. | Component | Count | Details |
  695. |-----------|-------|---------|
  696. | Hook Events | 15 | sessionStart, beforeShellExecution, afterFileEdit, beforeMCPExecution, beforeSubmitPrompt, and 10 more |
  697. | Hook Scripts | 16 | Thin Node.js scripts delegating to `scripts/hooks/` via shared adapter |
  698. | Rules | 34 | 9 common (alwaysApply) + 25 language-specific (TypeScript, Python, Go, Swift, PHP) |
  699. | Agents | Shared | Via AGENTS.md at root (read by Cursor natively) |
  700. | Skills | Shared + Bundled | Via AGENTS.md at root and `.cursor/skills/` for translated additions |
  701. | Commands | Shared | `.cursor/commands/` if installed |
  702. | MCP Config | Shared | `.cursor/mcp.json` if installed |
  703. ### Hook Architecture (DRY Adapter Pattern)
  704. 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.
  705. ```
  706. Cursor stdin JSON → adapter.js → transforms → scripts/hooks/*.js
  707. (shared with Claude Code)
  708. ```
  709. Key hooks:
  710. - **beforeShellExecution** — Blocks dev servers outside tmux (exit 2), git push review
  711. - **afterFileEdit** — Auto-format + TypeScript check + console.log warning
  712. - **beforeSubmitPrompt** — Detects secrets (sk-, ghp_, AKIA patterns) in prompts
  713. - **beforeTabFileRead** — Blocks Tab from reading .env, .key, .pem files (exit 2)
  714. - **beforeMCPExecution / afterMCPExecution** — MCP audit logging
  715. ### Rules Format
  716. Cursor rules use YAML frontmatter with `description`, `globs`, and `alwaysApply`:
  717. ```yaml
  718. ---
  719. description: "TypeScript coding style extending common rules"
  720. globs: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
  721. alwaysApply: false
  722. ---
  723. ```
  724. ---
  725. ## Codex macOS App + CLI Support
  726. ECC provides **first-class Codex support** for both the macOS app and CLI, with a reference configuration, Codex-specific AGENTS.md supplement, and shared skills.
  727. ### Quick Start (Codex App + CLI)
  728. ```bash
  729. # Run Codex CLI in the repo — AGENTS.md and .codex/ are auto-detected
  730. codex
  731. # Optional: copy the global-safe defaults to your home directory
  732. cp .codex/config.toml ~/.codex/config.toml
  733. ```
  734. Codex macOS app:
  735. - Open this repository as your workspace.
  736. - The root `AGENTS.md` is auto-detected.
  737. - `.codex/config.toml` and `.codex/agents/*.toml` work best when kept project-local.
  738. - The reference `.codex/config.toml` intentionally does not pin `model` or `model_provider`, so Codex uses its own current default unless you override it.
  739. - Optional: copy `.codex/config.toml` to `~/.codex/config.toml` for global defaults; keep the multi-agent role files project-local unless you also copy `.codex/agents/`.
  740. ### What's Included
  741. | Component | Count | Details |
  742. |-----------|-------|---------|
  743. | Config | 1 | `.codex/config.toml` — top-level approvals/sandbox/web_search, MCP servers, notifications, profiles |
  744. | AGENTS.md | 2 | Root (universal) + `.codex/AGENTS.md` (Codex-specific supplement) |
  745. | Skills | 16 | `.agents/skills/` — SKILL.md + agents/openai.yaml per skill |
  746. | MCP Servers | 4 | GitHub, Context7, Memory, Sequential Thinking (command-based) |
  747. | Profiles | 2 | `strict` (read-only sandbox) and `yolo` (full auto-approve) |
  748. | Agent Roles | 3 | `.codex/agents/` — explorer, reviewer, docs-researcher |
  749. ### Skills
  750. Skills at `.agents/skills/` are auto-loaded by Codex:
  751. | Skill | Description |
  752. |-------|-------------|
  753. | tdd-workflow | Test-driven development with 80%+ coverage |
  754. | security-review | Comprehensive security checklist |
  755. | coding-standards | Universal coding standards |
  756. | frontend-patterns | React/Next.js patterns |
  757. | frontend-slides | HTML presentations, PPTX conversion, visual style exploration |
  758. | article-writing | Long-form writing from notes and voice references |
  759. | content-engine | Platform-native social content and repurposing |
  760. | market-research | Source-attributed market and competitor research |
  761. | investor-materials | Decks, memos, models, and one-pagers |
  762. | investor-outreach | Personalized outreach, follow-ups, and intro blurbs |
  763. | backend-patterns | API design, database, caching |
  764. | e2e-testing | Playwright E2E tests |
  765. | eval-harness | Eval-driven development |
  766. | strategic-compact | Context management |
  767. | api-design | REST API design patterns |
  768. | verification-loop | Build, test, lint, typecheck, security |
  769. ### Key Limitation
  770. Codex does **not yet provide Claude-style hook execution parity**. ECC enforcement there is instruction-based via `AGENTS.md`, optional `model_instructions_file` overrides, and sandbox/approval settings.
  771. ### Multi-Agent Support
  772. Current Codex builds support experimental multi-agent workflows.
  773. - Enable `features.multi_agent = true` in `.codex/config.toml`
  774. - Define roles under `[agents.<name>]`
  775. - Point each role at a file under `.codex/agents/`
  776. - Use `/agent` in the CLI to inspect or steer child agents
  777. ECC ships three sample role configs:
  778. | Role | Purpose |
  779. |------|---------|
  780. | `explorer` | Read-only codebase evidence gathering before edits |
  781. | `reviewer` | Correctness, security, and missing-test review |
  782. | `docs_researcher` | Documentation and API verification before release/docs changes |
  783. ---
  784. ## 🔌 OpenCode Support
  785. ECC provides **full OpenCode support** including plugins and hooks.
  786. ### Quick Start
  787. ```bash
  788. # Install OpenCode
  789. npm install -g opencode
  790. # Run in the repository root
  791. opencode
  792. ```
  793. The configuration is automatically detected from `.opencode/opencode.json`.
  794. ### Feature Parity
  795. | Feature | Claude Code | OpenCode | Status |
  796. |---------|-------------|----------|--------|
  797. | Agents | ✅ 25 agents | ✅ 12 agents | **Claude Code leads** |
  798. | Commands | ✅ 57 commands | ✅ 31 commands | **Claude Code leads** |
  799. | Skills | ✅ 108 skills | ✅ 37 skills | **Claude Code leads** |
  800. | Hooks | ✅ 8 event types | ✅ 11 events | **OpenCode has more!** |
  801. | Rules | ✅ 29 rules | ✅ 13 instructions | **Claude Code leads** |
  802. | MCP Servers | ✅ 14 servers | ✅ Full | **Full parity** |
  803. | Custom Tools | ✅ Via hooks | ✅ 6 native tools | **OpenCode is better** |
  804. ### Hook Support via Plugins
  805. OpenCode's plugin system is MORE sophisticated than Claude Code with 20+ event types:
  806. | Claude Code Hook | OpenCode Plugin Event |
  807. |-----------------|----------------------|
  808. | PreToolUse | `tool.execute.before` |
  809. | PostToolUse | `tool.execute.after` |
  810. | Stop | `session.idle` |
  811. | SessionStart | `session.created` |
  812. | SessionEnd | `session.deleted` |
  813. **Additional OpenCode events**: `file.edited`, `file.watcher.updated`, `message.updated`, `lsp.client.diagnostics`, `tui.toast.show`, and more.
  814. ### Available Commands (31+)
  815. | Command | Description |
  816. |---------|-------------|
  817. | `/plan` | Create implementation plan |
  818. | `/tdd` | Enforce TDD workflow |
  819. | `/code-review` | Review code changes |
  820. | `/build-fix` | Fix build errors |
  821. | `/e2e` | Generate E2E tests |
  822. | `/refactor-clean` | Remove dead code |
  823. | `/orchestrate` | Multi-agent workflow |
  824. | `/learn` | Extract patterns from session |
  825. | `/checkpoint` | Save verification state |
  826. | `/verify` | Run verification loop |
  827. | `/eval` | Evaluate against criteria |
  828. | `/update-docs` | Update documentation |
  829. | `/update-codemaps` | Update codemaps |
  830. | `/test-coverage` | Analyze coverage |
  831. | `/go-review` | Go code review |
  832. | `/go-test` | Go TDD workflow |
  833. | `/go-build` | Fix Go build errors |
  834. | `/python-review` | Python code review (PEP 8, type hints, security) |
  835. | `/multi-plan` | Multi-model collaborative planning |
  836. | `/multi-execute` | Multi-model collaborative execution |
  837. | `/multi-backend` | Backend-focused multi-model workflow |
  838. | `/multi-frontend` | Frontend-focused multi-model workflow |
  839. | `/multi-workflow` | Full multi-model development workflow |
  840. | `/pm2` | Auto-generate PM2 service commands |
  841. | `/sessions` | Manage session history |
  842. | `/skill-create` | Generate skills from git |
  843. | `/instinct-status` | View learned instincts |
  844. | `/instinct-import` | Import instincts |
  845. | `/instinct-export` | Export instincts |
  846. | `/evolve` | Cluster instincts into skills |
  847. | `/promote` | Promote project instincts to global scope |
  848. | `/projects` | List known projects and instinct stats |
  849. | `/learn-eval` | Extract and evaluate patterns before saving |
  850. | `/setup-pm` | Configure package manager |
  851. | `/harness-audit` | Audit harness reliability, eval readiness, and risk posture |
  852. | `/loop-start` | Start controlled agentic loop execution pattern |
  853. | `/loop-status` | Inspect active loop status and checkpoints |
  854. | `/quality-gate` | Run quality gate checks for paths or entire repo |
  855. | `/model-route` | Route tasks to models by complexity and budget |
  856. ### Plugin Installation
  857. **Option 1: Use directly**
  858. ```bash
  859. cd everything-claude-code
  860. opencode
  861. ```
  862. **Option 2: Install as npm package**
  863. ```bash
  864. npm install ecc-universal
  865. ```
  866. Then add to your `opencode.json`:
  867. ```json
  868. {
  869. "plugin": ["ecc-universal"]
  870. }
  871. ```
  872. That npm plugin entry enables ECC's published OpenCode plugin module (hooks/events and plugin tools).
  873. It does **not** automatically add ECC's full command/agent/instruction catalog to your project config.
  874. For the full ECC OpenCode setup, either:
  875. - run OpenCode inside this repository, or
  876. - copy the bundled `.opencode/` config assets into your project and wire the `instructions`, `agent`, and `command` entries in `opencode.json`
  877. ### Documentation
  878. - **Migration Guide**: `.opencode/MIGRATION.md`
  879. - **OpenCode Plugin README**: `.opencode/README.md`
  880. - **Consolidated Rules**: `.opencode/instructions/INSTRUCTIONS.md`
  881. - **LLM Documentation**: `llms.txt` (complete OpenCode docs for LLMs)
  882. ---
  883. ## Cross-Tool Feature Parity
  884. ECC is the **first plugin to maximize every major AI coding tool**. Here's how each harness compares:
  885. | Feature | Claude Code | Cursor IDE | Codex CLI | OpenCode |
  886. |---------|------------|------------|-----------|----------|
  887. | **Agents** | 21 | Shared (AGENTS.md) | Shared (AGENTS.md) | 12 |
  888. | **Commands** | 52 | Shared | Instruction-based | 31 |
  889. | **Skills** | 102 | Shared | 10 (native format) | 37 |
  890. | **Hook Events** | 8 types | 15 types | None yet | 11 types |
  891. | **Hook Scripts** | 20+ scripts | 16 scripts (DRY adapter) | N/A | Plugin hooks |
  892. | **Rules** | 34 (common + lang) | 34 (YAML frontmatter) | Instruction-based | 13 instructions |
  893. | **Custom Tools** | Via hooks | Via hooks | N/A | 6 native tools |
  894. | **MCP Servers** | 14 | Shared (mcp.json) | 4 (command-based) | Full |
  895. | **Config Format** | settings.json | hooks.json + rules/ | config.toml | opencode.json |
  896. | **Context File** | CLAUDE.md + AGENTS.md | AGENTS.md | AGENTS.md | AGENTS.md |
  897. | **Secret Detection** | Hook-based | beforeSubmitPrompt hook | Sandbox-based | Hook-based |
  898. | **Auto-Format** | PostToolUse hook | afterFileEdit hook | N/A | file.edited hook |
  899. | **Version** | Plugin | Plugin | Reference config | 1.8.0 |
  900. **Key architectural decisions:**
  901. - **AGENTS.md** at root is the universal cross-tool file (read by all 4 tools)
  902. - **DRY adapter pattern** lets Cursor reuse Claude Code's hook scripts without duplication
  903. - **Skills format** (SKILL.md with YAML frontmatter) works across Claude Code, Codex, and OpenCode
  904. - Codex's lack of hooks is compensated by `AGENTS.md`, optional `model_instructions_file` overrides, and sandbox permissions
  905. ---
  906. ## 📖 Background
  907. 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.
  908. These configs are battle-tested across multiple production applications.
  909. ## Inspiration Credits
  910. - inspired by [zarazhangrui](https://github.com/zarazhangrui)
  911. - homunculus-inspired by [humanplane](https://github.com/humanplane)
  912. ---
  913. ## Token Optimization
  914. Claude Code usage can be expensive if you don't manage token consumption. These settings significantly reduce costs without sacrificing quality.
  915. ### Recommended Settings
  916. Add to `~/.claude/settings.json`:
  917. ```json
  918. {
  919. "model": "sonnet",
  920. "env": {
  921. "MAX_THINKING_TOKENS": "10000",
  922. "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50"
  923. }
  924. }
  925. ```
  926. | Setting | Default | Recommended | Impact |
  927. |---------|---------|-------------|--------|
  928. | `model` | opus | **sonnet** | ~60% cost reduction; handles 80%+ of coding tasks |
  929. | `MAX_THINKING_TOKENS` | 31,999 | **10,000** | ~70% reduction in hidden thinking cost per request |
  930. | `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` | 95 | **50** | Compacts earlier — better quality in long sessions |
  931. Switch to Opus only when you need deep architectural reasoning:
  932. ```
  933. /model opus
  934. ```
  935. ### Daily Workflow Commands
  936. | Command | When to Use |
  937. |---------|-------------|
  938. | `/model sonnet` | Default for most tasks |
  939. | `/model opus` | Complex architecture, debugging, deep reasoning |
  940. | `/clear` | Between unrelated tasks (free, instant reset) |
  941. | `/compact` | At logical task breakpoints (research done, milestone complete) |
  942. | `/cost` | Monitor token spending during session |
  943. ### Strategic Compaction
  944. The `strategic-compact` skill (included in this plugin) suggests `/compact` at logical breakpoints instead of relying on auto-compaction at 95% context. See `skills/strategic-compact/SKILL.md` for the full decision guide.
  945. **When to compact:**
  946. - After research/exploration, before implementation
  947. - After completing a milestone, before starting the next
  948. - After debugging, before continuing feature work
  949. - After a failed approach, before trying a new one
  950. **When NOT to compact:**
  951. - Mid-implementation (you'll lose variable names, file paths, partial state)
  952. ### Context Window Management
  953. **Critical:** Don't enable all MCPs at once. Each MCP tool description consumes tokens from your 200k window, potentially reducing it to ~70k.
  954. - Keep under 10 MCPs enabled per project
  955. - Keep under 80 tools active
  956. - Use `disabledMcpServers` in project config to disable unused ones
  957. ### Agent Teams Cost Warning
  958. Agent Teams spawns multiple context windows. Each teammate consumes tokens independently. Only use for tasks where parallelism provides clear value (multi-module work, parallel reviews). For simple sequential tasks, subagents are more token-efficient.
  959. ---
  960. ## ⚠️ Important Notes
  961. ### Token Optimization
  962. Hitting daily limits? See the **[Token Optimization Guide](docs/token-optimization.md)** for recommended settings and workflow tips.
  963. Quick wins:
  964. ```json
  965. // ~/.claude/settings.json
  966. {
  967. "model": "sonnet",
  968. "env": {
  969. "MAX_THINKING_TOKENS": "10000",
  970. "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50",
  971. "CLAUDE_CODE_SUBAGENT_MODEL": "haiku"
  972. }
  973. }
  974. ```
  975. Use `/clear` between unrelated tasks, `/compact` at logical breakpoints, and `/cost` to monitor spending.
  976. ### Customization
  977. These configs work for my workflow. You should:
  978. 1. Start with what resonates
  979. 2. Modify for your stack
  980. 3. Remove what you don't use
  981. 4. Add your own patterns
  982. ---
  983. ## 💜 Sponsors
  984. This project is free and open source. Sponsors help keep it maintained and growing.
  985. [**Become a Sponsor**](https://github.com/sponsors/affaan-m) | [Sponsor Tiers](SPONSORS.md) | [Sponsorship Program](SPONSORING.md)
  986. ---
  987. ## 🌟 Star History
  988. [![Star History Chart](https://api.star-history.com/svg?repos=affaan-m/everything-claude-code&type=Date)](https://star-history.com/#affaan-m/everything-claude-code&Date)
  989. ---
  990. ## 🔗 Links
  991. - **Shorthand Guide (Start Here):** [The Shorthand Guide to Everything Claude Code](https://x.com/affaanmustafa/status/2012378465664745795)
  992. - **Longform Guide (Advanced):** [The Longform Guide to Everything Claude Code](https://x.com/affaanmustafa/status/2014040193557471352)
  993. - **Follow:** [@affaanmustafa](https://x.com/affaanmustafa)
  994. - **zenith.chat:** [zenith.chat](https://zenith.chat)
  995. - **Skills Directory:** awesome-agent-skills (community-maintained directory of agent skills)
  996. ---
  997. ## 📄 License
  998. MIT - Use freely, modify as needed, contribute back if you can.
  999. ---
  1000. **Star this repo if it helps. Read both guides. Build something great.**
scripts/codex/install-global-git-hooks.sh · Bundled script · 63 lines · 2 findings marked
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. # Install ECC git safety hooks globally via core.hooksPath.
  4. # Usage:
  5. # ./scripts/codex/install-global-git-hooks.sh
  6. # ./scripts/codex/install-global-git-hooks.sh --dry-run
  7. MODE="apply"
  8. if [[ "${1:-}" == "--dry-run" ]]; then
  9. MODE="dry-run"
  10. fi
  11. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  12. REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
  13. SOURCE_DIR="$REPO_ROOT/scripts/codex-git-hooks"
  14. DEST_DIR="${ECC_GLOBAL_HOOKS_DIR:-$HOME/.codex/git-hooks}"
  15. STAMP="$(date +%Y%m%d-%H%M%S)"
  16. BACKUP_DIR="$HOME/.codex/backups/git-hooks-$STAMP"
  17. log() {
  18. printf '[ecc-hooks] %s\n' "$*"
  19. }
  20. run_or_echo() {
  21. if [[ "$MODE" == "dry-run" ]]; then
  22. printf '[dry-run] %s\n' "$*"
  23. else
  24. eval "$*"
  25. fi
  26. }
  27. if [[ ! -d "$SOURCE_DIR" ]]; then
  28. log "Missing source hooks directory: $SOURCE_DIR"
  29. exit 1
  30. fi
  31. log "Mode: $MODE"
  32. log "Source hooks: $SOURCE_DIR"
  33. log "Global hooks destination: $DEST_DIR"
  34. if [[ -d "$DEST_DIR" ]]; then
  35. log "Backing up existing hooks directory to $BACKUP_DIR"
  36. run_or_echo "mkdir -p \"$BACKUP_DIR\""
  37. run_or_echo "cp -R \"$DEST_DIR\" \"$BACKUP_DIR/hooks\""
  38. fi
  39. run_or_echo "mkdir -p \"$DEST_DIR\""
  40. run_or_echo "cp \"$SOURCE_DIR/pre-commit\" \"$DEST_DIR/pre-commit\""
  41. run_or_echo "cp \"$SOURCE_DIR/pre-push\" \"$DEST_DIR/pre-push\""
  42. run_or_echo "chmod +x \"$DEST_DIR/pre-commit\" \"$DEST_DIR/pre-push\""
  43. if [[ "$MODE" == "apply" ]]; then
  44. prev_hooks_path="$(git config --global core.hooksPath || true)"
    • Note: Sets a git template or hooks folder for every repository, so its scripts run on each commit or clone
    • Line 54 on GitHub
  45. if [[ -n "$prev_hooks_path" ]]; then
  46. log "Previous global hooksPath: $prev_hooks_path"
  47. fi
  48. fi
  49. run_or_echo "git config --global core.hooksPath \"$DEST_DIR\""
    • Warning: Sets a git template or hooks folder for every repository, so its scripts run on each commit or clone
    • Line 59 on GitHub
  50. log "Installed ECC global git hooks."
  51. log "Disable per repo by creating .ecc-hooks-disable in project root."
  52. log "Temporary bypass: ECC_SKIP_PRECOMMIT=1 or ECC_SKIP_PREPUSH=1"

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.