skills/cx-summary/SKILL.md
CX 工作流 — 汇总发布与闭环。手动触发或在所有任务完成后进入。 负责生成总结、同步 GitHub 镜像、清理当前 feature 指针。
npx skillsauth add m19803261706/cx-workflow cx-summaryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
只负责收尾,不参与执行态主控。
先阅读:
${CLAUDE_PLUGIN_ROOT}/core/workflow/README.md${CLAUDE_PLUGIN_ROOT}/core/workflow/protocols/summary.md/cx:cx-summary
/cx:cx-summary {功能名}
所有文件读写必须使用绝对路径。 禁止使用 ../ 相对路径。先用 git rev-parse --show-toplevel 获取绝对路径。
cx:summary 不负责补救执行问题GitHub 为同步镜像,项目级 开发文档/CX工作流 + .cx 才是真相cc adapter 收尾动作,不会擅自改写其他 runner 的 lease状态.json需求.md / 设计.md / 架构决策.md / 总结.md如果 code_review=true,必须(MUST) 使用 AskUserQuestion 工具询问:
{
"questions": [
{
"question": "闭环前做代码审查吗?",
"header": "Code Review",
"multiSelect": false,
"options": [
{
"label": "全面审查 (Recommended)",
"description": "完整检查代码质量、契约一致性和测试覆盖"
},
{
"label": "快速审查",
"description": "只检查关键路径和明显问题"
},
{
"label": "跳过",
"description": "直接进入总结阶段"
}
]
}
]
}
这一步是闭环前检查,不是执行期主控。
优先调用共享 runner:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-workflow-summary.sh \
--feature <feature-slug> \
--runner cc \
--session-id <session-id>
输出到:
开发文档/CX工作流/功能/{功能标题}/总结.md
总结只回答这些问题:
根据 github_sync 决定是否同步:
off:只保留本地local:轻量同步结果collab / full:同步关键文档和闭环结果但无论哪种模式,GitHub 都不是执行真相源。
检查 feature 的 状态.json 中的 worktree.isolation_mode:
如果 isolation_mode = "worktree"(独立工作区):
必须(MUST) 使用 AskUserQuestion 工具询问合并方式:
{
"questions": [
{
"question": "功能「{feature_title}」已完成,如何合并回主分支?",
"header": "合并方式",
"multiSelect": false,
"options": [
{
"label": "创建 Pull Request (Recommended)",
"description": "推送分支并创建 PR,适合需要 review 的场景"
},
{
"label": "直接合并到主分支",
"description": "将 worktree 分支合并回主分支并清理"
},
{
"label": "暂不合并",
"description": "保留工作区和分支,稍后手动处理"
}
]
}
]
}
选项 1(创建 PR):
git push -u origin worktree-{feature-slug}
gh pr create --title "feat: {feature_title}" --body "..."
选项 2(直接合并):
# 先退出 worktree 回到主目录
ExitWorktree(save: true)
# 在主分支合并
git merge worktree-{feature-slug}
# 清理 worktree 分支
git branch -d worktree-{feature-slug}
选项 3(暂不合并):
git worktree list 查看如果 isolation_mode = "inline"(当前分支直接开发):
如果当前在 feature worktree 中(非 inline 模式),summary 完成后提供整合选项:
使用 AskUserQuestion:
{
"questions": [{
"question": "所有任务已完成,如何处理这个 feature 分支?",
"header": "分支整合",
"multiSelect": false,
"options": [
{ "label": "Merge 回主分支", "description": "合并后删除分支和 worktree" },
{ "label": "Push + 创建 Pull Request", "description": "推送到远程,创建 PR 供审查" },
{ "label": "保留分支(稍后处理)", "description": "保持 worktree 和分支不变" },
{ "label": "丢弃(需确认)", "description": "删除分支和 worktree,放弃所有改动" }
]
}]
}
选项 1 — Merge:
git checkout main && git pull && git merge {feature-branch}
# 验证测试通过后
bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-worktree.sh cleanup --feature {slug}
git branch -d {feature-branch}
选项 2 — PR:
git push -u origin {feature-branch}
gh pr create --title "{feature-title}" --body "..."
选项 3 — 保留: 不执行任何操作。
选项 4 — 丢弃:
使用 AskUserQuestion 二次确认后:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/cx-worktree.sh cleanup --feature {slug} --force
git branch -D {feature-branch}
闭环完成后:
summarized配置.json.current_feature 清空mergedtools
CX 工作流 — 进度查看。读取项目级配置和状态文件,展示当前功能、 当前任务、阻塞原因和最近修复记录。
tools
CX 工作流 — 项目蓝图探讨。当用户提到"蓝图"、"整体规划"、"项目范围"、 "scope"、"项目探讨"、"功能方案"时触发。多轮对话探讨项目或功能方案, 将结果保存到本地 `开发文档/CX工作流/功能/{功能标题}/范围.md`, 可选同步到 GitHub Issue(基于 config.github_sync 模式)。
content-media
CX 工作流 — 需求收集与规模评估。当用户提到"新功能"、"需求"、"PRD"、 "我想做一个"、"帮我规划"、"收集需求"、"功能规划"时触发。 多轮对话收集需求,自动评估规模,保存到本地 开发文档/CX工作流/功能/{feature_title}/需求.md,并自动判断是否需要 Design。
tools
CX 工作流 — 任务规划与契约下沉。当用户提到"规划任务"、"制定计划"、 "plan"、"拆分任务"时触发。读取设计文档(小功能则读取 PRD), 生成任务分解,创建子任务文件并将契约下沉到任务中。 产物保存到本地 开发文档/CX工作流/功能/{feature_title}/任务/。