npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ccg-workflow

v3.2.3

Published

Claude + Codex + Gemini multi-model collaboration system - smart routing development workflow

Readme

CCG - Claude + Codex + Gemini 多模型协作

GitHub stars NPM Downloads npm version License: MIT CI codecov Claude Code Node Follow on X star Docs Ask DeepWiki

简体中文 | English | 完整文档

♥️ Sponsor

Gamma Remover

Gamma Remover — 免费浏览器本地 Gamma 水印去除工具。支持 PDF 和 PPTX,无需注册,即时出结果,100% 隐私,文件不离开你的设备。


302.AI

302.AI is a pay-as-you-go enterprise AI resource hub that offers the latest and most comprehensive AI models and APIs on the market, along with a variety of ready-to-use online AI applications.


CCG 是什么?

CCG 是 Claude Code 的工作流引擎。 它让 Claude 变成多模型编排器 —— Claude 保持主控地位,通过 Go 编译的 codeagent-wrapper 将专业任务分发给 Codex(OpenAI)、Gemini(Google)和 Grok(xAI)。

一条命令,描述你要做什么,引擎自动处理一切。

npx ccg-workflow    # 60 秒安装

架构

Claude Code 是主控编排器。它分析你的意图、选择策略、管理整个工作流。Hook 引擎每轮注入状态,确保 Claude 永不丢失上下文 —— 即使上下文被压缩。codeagent-wrapper(编译的 Go 二进制)作为桥梁,将 Claude 连接到外部模型进行并行分析和审查。

工作流程

你: /ccg:go 给这个 API 加 JWT 认证

CCG 引擎:
  1. 读取项目上下文(git 状态、技术栈、文件结构)
  2. 分类:功能 / L 复杂度 / 后端 / 高风险
  3. 选择策略:full-collaborate(全协作)
  4. 创建 .ccg/tasks/add-jwt-auth/task.json
  5. 启动双模型并行分析(Codex + Gemini)
  6. 生成计划 → 硬停等你审批
  7. 派生 Agent Teams Builder 并行实施
  8. 运行质量关卡 + 双模型交叉审查
  9. 报告结果

每一轮,Hook 自动注入:
  <ccg-state>
  任务: add-jwt-auth (进行中)
  策略: full-collaborate
  阶段: 4-实施
  </ccg-state>

10 种内置策略

引擎根据任务类型和复杂度自动选择最佳策略:

| 策略 | 适用场景 | 外部模型 | Agent Teams | |------|---------|:---:|:---:| | direct-fix | 简单 bug,单文件 | — | — | | quick-implement | 小功能,范围明确 | — | — | | guided-develop | 中等功能,需要规划 | 单模型 | — | | full-collaborate | 复杂功能,跨模块 | 双模型并行 | ✓ | | debug-investigate | 复杂 bug,原因未知 | 双模型诊断 | — | | refactor-safely | 代码重构 | 双模型审查 | — | | deep-research | 技术调研 | 双模型探索 | — | | optimize-measure | 性能优化 | 可选 | — | | review-audit | 代码审查 | 双模型交叉审查 | — | | git-action | commit、rollback、分支 | — | — |

简单任务零开销快速执行。复杂任务调动全部引擎能力。

核心能力

Hook 引擎 — 永不丢失上下文

4 个 JavaScript Hook 为每个 Claude Code 会话注入状态:

| Hook | 触发时机 | 作用 | |------|---------|------| | workflow-state.js | 每轮用户消息 | 注入当前任务状态面包屑 | | session-start.js | 会话开始/压缩 | 重新注入完整项目上下文 | | subagent-context.js | Agent/Bash 调用 | 将 spec 直接注入子 agent 的 prompt | | skill-router.js | 每轮用户消息 | 按关键词自动注入域知识 |

上下文在压缩后自动恢复。子 agent 出生即带 spec。零状态丢失。

任务系统 — 持久化生命周期

中等及以上复杂度的任务获得持久化目录:

.ccg/tasks/add-jwt-auth/
├── task.json         # 状态、策略、阶段、门控
├── requirements.md   # 增强需求
├── plan.md           # 已审批的实施计划
├── context.jsonl     # 子 agent 注入的 spec 文件
├── review.md         # 审查结果
└── research/         # 持久化研究成果

质量关卡 — 内置安全与质量检查

| 关卡 | 触发条件 | |------|---------| | /ccg:verify-security | 新模块、安全相关变更 | | /ccg:verify-quality | 变更超过 30 行 | | /ccg:verify-change | 文档同步检查 | | /ccg:verify-module | 模块结构检查 | | /ccg:gen-docs | 自动生成 README + DESIGN |

100+ 域知识秘典

当你的消息提到安全、缓存、RAG、Kubernetes 等关键词时,对应的知识文件自动注入。10 大领域,61 个文件:

安全 · 架构 · DevOps · AI/MLOps · 开发语言 · 前端设计 · 基础设施 · 移动端 · 数据工程 · 编排

命令

核心命令(v3.0 默认安装 13 个)

| 命令 | 说明 | |------|------| | /ccg:go | 智能入口 — 描述你要做什么,引擎自动处理 | | /ccg:commit | 智能 Conventional Commit | | /ccg:rollback | 交互式回滚 | | /ccg:clean-branches | 清理已合并分支 | | /ccg:worktree | Worktree 管理 | | /ccg:init | 初始化项目 CLAUDE.md | | /ccg:context | 项目上下文管理 |

OpenSpec 集成

| 命令 | 说明 | |------|------| | /ccg:spec-init | 初始化 OPSX 环境 | | /ccg:spec-research | 需求 → 约束集 | | /ccg:spec-plan | 零决策可执行计划 | | /ccg:spec-impl | 按规范实施 + 归档 | | /ccg:spec-review | 双模型交叉审查 |

Legacy 模式(额外 18 个命令)

包括 /ccg:workflow/ccg:plan/ccg:execute/ccg:frontend/ccg:backend/ccg:analyze/ccg:debug/ccg:optimize/ccg:test/ccg:review/ccg:team 等。

快速开始

# 安装(交互式 4 步向导)
npx ccg-workflow

# 或非交互式使用默认配置
npx ccg-workflow init --skip-prompt

需要 Node.js 20+Claude Code CLI。Codex CLI、Gemini CLI 和 Grok CLI 为可选(启用多模型功能)。

CLI 命令大全

npx ccg-workflow                          # 交互式菜单
npx ccg-workflow init                     # 4 步安装向导
npx ccg-workflow doctor                   # 环境健康检查
npx ccg-workflow status                   # 安装概况
npx ccg-workflow codex-mode install       # 安装 Codex 主导模式
npx ccg-workflow codex-mode uninstall     # 卸载 Codex 主导模式
npx ccg-workflow uninstall                # 卸载 CCG
npx ccg-workflow config mcp               # 配置 MCP Token
npx ccg-workflow diagnose-mcp             # 诊断 MCP 问题

配置

~/.claude/
├── commands/ccg/          # 斜杠命令
├── hooks/ccg/             # Hook 脚本(5 个文件)
├── skills/ccg/            # 质量关卡 + 100+ 域知识
├── rules/                 # 自动触发规则
├── .ccg/
│   ├── config.toml        # 模型路由、MCP、性能配置
│   ├── engine/            # 10 个策略文件 + 模型路由器
│   └── prompts/           # 专家提示词(codex/gemini/claude)
└── bin/codeagent-wrapper  # 多模型桥接(Go 二进制)

环境变量

~/.claude/settings.json"env" 中设置:

| 变量 | 默认值 | 说明 | |------|--------|------| | CODEX_TIMEOUT | 7200 | Wrapper 超时(秒) | | CODEAGENT_POST_MESSAGE_DELAY | 5 | 完成后延迟(秒) | | CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS | 未设置 | 设为 1 启用 Agent Teams 并行 |

更新 / 卸载

npx ccg-workflow@latest     # 更新到最新版
npx ccg-workflow doctor     # 更新后健康检查
npx ccg-workflow uninstall  # 彻底卸载

致谢

贡献者

联系

Star 历史

Star History Chart

许可证

MIT


v3.2.3 | Issues | Contributing