跳到正文
Skillpedia
通用编程6.0k · #14522

ccg-workflow

它能做什么

这项技能说明如何分阶段完成较大的编码任务,在分析、设计、构建、调试、测试和审阅中使用专门的角色。适合面对整个功能、重构或原因不明的错误的开发者。

适用场景

  • ✓当任务是完整功能、重构,或原因未知的错误时。
  • ✓当改动大到一次直接尝试只能是猜测的时候。
  • ✓当你想为任务在快速、标准和深入的工作流之间做选择的时候。

技能链接

https://github.com/fengshao1227/ccg-workflow/blob/main/dsh-ccg/skills/ccg-workflow/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/fengshao1227/ccg-workflow/blob/main/dsh-ccg/skills/ccg-workflow/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请用分阶段工作流规划并构建我支付模块的重构,开始前先告诉我成本。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会根据任务规模选择模式,说明该模式使用的模型调用次数,等待你批准,然后按顺序运行各个阶段。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

CCG workflow

Seven role tools are available, each running a child agent on its own model with its own expert persona. This is how to chain them so the work converges instead of sprawling.

Skip all of this for small, obvious work. A one-line fix, a rename, a question you can answer by reading two files — do it yourself. Delegation buys depth, and it costs a round trip and a fresh context. Spend it only where depth is the thing you lack.

Picking a gear

Four modes. The user should not have to name one: read what they asked for, pick, say which you picked in a line, and — for anything past Direct — say what it costs and wait for a yes. They are paying per model call.

Mode For Runs
Direct a one-line fix, a rename, a question you can answer by reading you, alone
Standard an ordinary feature, a bug with a known cause, a contained refactor design → build → review
Deep a design with real alternatives, an unclear bug, a migration, anything expensive to get wrong analyze → design → build → test → review
Team work that splits across files and will keep developing ccg_team — several specialists at once, each owning its own files

A role holding several models answers with all of them at once, so Deep costs more than its phase count suggests — quote the real number of model calls, not the number of phases. If the user names a mode, run that one. If a phase changes what you believe, say so and re-pick rather than finishing a plan you no longer believe in.

Deep and Team are not a ranking. Deep buys certainty about one thing by asking several models about it. Team buys throughput on several things by running colleagues at once. A hard question is Deep even if it is small; a wide job is Team even if every part is easy. Something both hard and wide is Deep first — settle the design and the contracts — then Team to build it.

The loop

Phase Tool Ends when
1. Understand ccg_analyze you can state the constraints and the options with their trade-offs
2. Design ccg_design the interfaces and the boundaries are settled
3. Build ccg_build the code exists and its verify command passes
4. Verify ccg_review + the gates findings are triaged and the criticals are gone

Diagnose before you build when the cause is unknown (ccg_debug), and treat ccg_optimize and ccg_test as phases of their own when the task is performance or coverage rather than a feature.

Not every task needs four phases. A well-understood change is design → build → review. An investigation may be analyze → debug and stop there, with no code at all.

Writing a brief

A child sees none of this conversation. It gets your prompt and nothing else, so an under-specified brief is the main way this goes wrong. Every brief carries:

  • The goal — one sentence on what the child must produce.
  • The anchors — the exact files, symbols and commands it should start from. Paths, not descriptions.
  • The constraints — what it must not change, the conventions to follow, the decisions already made (and by whom).
  • The shape of the answer — a diff, a report, a ranked list. Say which.

Bad: "look at the auth code and improve it." Good: "In src/auth/session.ts, the refresh path drops the CSRF token when a retry follows a 401 (see refreshSession, lines 40-80). Diagnose the root cause. Do not change code. Report ranked hypotheses with the minimal test that would confirm each."

The quality gates

Bundled beside this skill, each runnable through the shell and each documenting its own arguments:

Gate Use it after
verify-change any change — analyses the diff and flags docs that drifted
verify-quality a complex or refactored module — complexity, duplication, naming, length
verify-security new modules, auth/crypto/input handling, anything touching secrets
verify-module a newly created module — structure and required docs
gen-docs creating a module — scaffolds its README and DESIGN

They are deterministic scanners, not opinions: run them before ccg_review so the reviewer spends its turn on judgement rather than on what a script already knows. A gate's findings are input to your decision, not a verdict — a flagged line can still be correct.

What stays with you

Delegate the turn, never the decision.

  • **Choosing betwe
常见问题

小任务也需要它吗?

不需要。小而明显的改动应直接完成,无需使用这个工作流。

消耗模型调用之前会询问我吗?

会。除直接模式之外,它会说明成本并等待你同意。

有哪些模式?

直接、标准、深入和团队模式,从单次修复到多个专家同时工作。

详情

作者的原始描述

How to run a non-trivial change end to end with the CCG role tools (ccg_analyze / ccg_design / ccg_build / ccg_debug / ccg_optimize / ccg_review / ccg_test) and the verify-* quality gates. Use when a task is a whole feature, a refactor, a bug whose cause is not yet known, or any change large enough that one straight-through attempt would be a guess.

repo: fengshao1227/ccg-workflow

热度

GitHub 星标
6.0k
排名
#14522
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能