跨 AI 编码助手的智能体增强操作系统——规则、技能与安全审计
ECC 是一套为多个 AI 编码助手(Claude Code、Cursor、Codex、OpenCode、GitHub Copilot 等)设计的智能体增强系统,被定位为“Agent 增强型操作系统”。它并非一个独立的 AI 工具,而是一个包含 260+ 技能、67+ 子智能体、提供持久化记忆、连续学习、成本优化和安全审计(AgentShield)等功能的配置与插件集合。通过统一的规则、钩子和 MCP 配置,它试图解决跨平台开发工作流中智能体行为不一致、上下文丢失和安全性不足的问题。适合深度使用 AI 编码助手的专业开发者,以及希望建立标准化 Agent 工程实践的技术团队。
ECC (Efficiency Consistency Control) is a cross-harness agent operating system originally built for Claude Code but now compatible with Cursor, Codex, OpenCode, Gemini, Zed, GitHub Copilot, and beyond. It is not merely a collection of configs — it is a complete system encompassing skills, instincts, memory optimization, continuous learning, security scanning, and research-first development. With over 211K GitHub stars and 230+ contributors, ECC is one of the most comprehensive open-source projects for agentic coding workflows.
ECC(Efficiency Consistency Control,效能·一致·控制)是一个跨智能体操作系统的开源项目。它最初为 Claude Code 设计,现在已适配 Cursor、Codex、OpenCode、Gemini、Zed、GitHub Copilot 等多种 AI 编程工具。ECC 不是一堆配置文件的堆砌——它是一套完整的体系:技能(skill)、直觉(instinct)、内存优化、持续学习、安全扫描、以及研究优先的开发方式。该项目在 GitHub 上获得了超过 21.1 万 star,有 230+ 贡献者,是智能体编码工作流方向最全面的开源项目之一。
Developers using multiple AI coding assistants currently face a fragmented experience: Claude Code has its plugin system, Cursor uses hooks and rules, Codex relies on AGENTS.md, and OpenCode has its own plugin format. Keeping workflows consistent across tools forces repetitive manual setup. ECC solves this by providing a unified, cross-harness layer that adapts each component — agents, commands, skills, hooks, rules, and MCP configs — to the target harness automatically. With a single source of truth in this repository, developers get consistent behavior whether they work in Claude Code, Cursor, or Codex CLI.
目前使用多个 AI 编程工具的开发者面临非常碎片化的体验:Claude Code 有自己的插件系统,Cursor 用 hooks 和 rules,Codex 依赖 AGENTS.md,OpenCode 又有自己的插件格式。要在不同工具间保持工作流一致,需要反复手动配置,非常痛苦。ECC 的解决方案是提供一个统一的跨智能体适配层,自动将代码库中的组件(智能体、命令、技能、钩子、规则、MCP 配置)转化为目标工具所需的格式。无论你在 Claude Code、Cursor 还是 Codex CLI 中工作,体验都是一致的。
ECC organizes its functionality into six main directories: agents (67 specialized subagents for delegation — planner, code-reviewer, security-reviewer, build-error-resolver, etc.), skills (271 workflow definitions covering everything from TDD and API design to deep learning and investor outreach), commands (maintained slash-entry compatibility with 92 entries), hooks (trigger-based automations for session start/end, compaction, and pattern extraction), rules (always-follow guidelines organized into language-agnostic common/ and language-specific directories), and MCP configurations (pre-configured server definitions for GitHub, Supabase, Context7, and more). Each component can be installed independently, giving users maximum flexibility.
ECC 的功能被组织为六个核心目录:agents(67 个专门的子智能体,可委派任务,比如 planner、code-reviewer、security-reviewer、build-error-resolver 等)、skills(271 个工作流定义,涵盖从 TDD、API 设计到深度学习和投资人推广等全面场景)、commands(保持斜杠命令兼容性,共 92 个)、hooks(基于触发的自动化机制,用于会话启动/结束、压缩、模式提取等)、rules(始终遵循的指南,分为语言无关的 common/ 和语言特定的目录)、以及 MCP 配置(为 GitHub、Supabase、Context7 等预配置的服务器定义)。每个组件都可以独立安装,用户享有最大灵活度。
ECC offers two installation paths. The recommended method is the Claude Code plugin path: run /plugin marketplace add https://github.com/affaan-m/ECC and then /plugin install ecc@ecc. The manual path uses the install.sh or install.ps1 script with different profiles: --profile full for the full suite, --profile minimal for just rules and core skills without hooks, and --profile core for the normal profile. Installing Rules requires manual copying of the desired language directories under ~/.claude/rules/ecc/ because Claude Code plugins cannot distribute rules automatically. A desktop GUI dashboard can be launched with npm run dashboard for visual exploration of all components.
ECC 提供两种安装方式。推荐使用 Claude Code 插件路径:先执行 /plugin marketplace add https://github.com/affaan-m/ECC,再运行 /plugin install ecc@ecc。手动安装方式通过 install.sh 或 install.ps1 脚本进行,提供不同配置:--profile full 安装全部组件,--profile minimal 只安装规则和核心技能(不含 hooks),--profile core 为常规配置。安装 Rules 需要手动复制对应语言目录到 ~/.claude/rules/ecc/ 下,因为 Claude Code 插件系统无法自动分发规则。另外,运行 npm run dashboard 可启动桌面 GUI 仪表盘,直观浏览所有组件。
ECC v2 ships a continuous learning v2 system based on instincts: /instinct-status shows learned patterns with confidence scores, /instinct-import and /instinct-export allow sharing instincts across sessions, and /evolve clusters related instincts into new skills. On the security side, AgentShield is an independent npm package (ecc-agentshield) that scans Claude Code configurations for vulnerabilities, misconfigurations, and injection risks. It runs 1282 tests with 102 static analysis rules across 5 categories. The --opus flag launches a three-agent red-team/blue-team/auditor pipeline for adversarial reasoning. Output formats include terminal (color-graded A-F), JSON, Markdown, and HTML.
ECC v2 带来了基于直觉的持续学习系统:/instinct-status 显示已学习的模式及其置信度,/instinct-import 和 /instinct-export 支持跨会话共享直觉,/evolve 将相关的直觉聚合并生成新的技能。在安全方面,AgentShield 是一个独立的 npm 包(ecc-agentshield),用于扫描 Claude Code 配置中的漏洞、错误配置和注入风险。它运行 1282 个测试用例,涵盖 5 个类别、102 条静态分析规则。--opus 参数会启动一个三智能体流水线(红队/蓝队/审计师),进行对抗性推理分析。输出格式包括终端(A-F 分级)、JSON、Markdown 和 HTML。
ECC shines in production engineering workflows across multiple language ecosystems (TypeScript, Python, Go, Rust, Java, Kotlin, PHP, Perl, Swift, C++, and more). With 67 agents, 271 skills, and support for 12+ coding tools, it is designed for large-scale, multi-harness teams. However, there are important caveats. Do not stack install methods — mixing /plugin install with the full manual installer causes duplicate components. The plugin cannot distribute rules automatically; they must be copied manually. If hooks appear duplicated or broken, run node scripts/ecc.js doctor before reinstalling. The Codex plugin path is still fragile upstream, and GitHub Copilot lacks hook and subagent APIs entirely. Always install ECC from official sources (GitHub, npm ecc-universal, or the GitHub App) to avoid malware risks from third-party re-uploads.
ECC 非常适合多语言生态(TypeScript、Python、Go、Rust、Java、Kotlin、PHP、Perl、Swift、C++ 等)下的生产级工程工作流。67 个智能体、271 个技能、12+ 种 AI 编码工具的支持,使其专为大规模、跨平台团队而设计。但使用时有几个重要注意事项:不要叠加安装方式——混用 /plugin install 和完整手动安装器会导致组件重复。插件无法自动分发规则,必须手动复制。如果钩子出现重复或失效,请先运行 node scripts/ecc.js doctor 再重新安装。Codex 插件路径在上游仍不稳定,GitHub Copilot 完全不支持钩子和子智能体 API。务必通过官方渠道(GitHub、npm ecc-universal 或 GitHub App)安装 ECC,避免第三方重新上传的恶意软件风险。