Skip to main content

git-split-commit-pr

Split mixed Git changes into public-safe, reviewable commits and PRs when the user requests publication or cleanup. Preserve unrelated work; merging is separate.

Source facts

Repository
huangruiteng/CS-Notes
Last source activity
October 14, 2026 at 17:30
Detected SKILL.md language
Chinese
Stars
4,015
Forks
486

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
git-split-commit-pr
description
Split mixed Git changes into public-safe, reviewable commits and PRs when the user requests publication or cleanup. Preserve unrelated work; merging is separate.
# 拆分提交与 PR 先检查 status、分支、remote、upstream、diff 和未跟踪文件。将路径分为功能代码、公开文档、验证、私有状态、无关修改。保留用户现有内容;需要隔离时从正确基线使用干净 worktree,不靠 reset 清场。 涉及素材队列时,先按共同基线、本地与远端区分未提交新增和远端缺失;已有笔记或助手读取不等于用户读完。公开副本不是 lifecycle authority,归档必须逐条核验用户声明。在 CS-Notes 的同步任务中使用 `sync-notes` 与仓库三方对账工具,不临时重写差集归档脚本。 按评审者理解的功能切分,不按修改时间分组。同一文件混杂内容时做 hunk 级补丁;不把整份脏文件覆盖到远端最新版本。小规模重构只服务当前提交,避免顺便重写无关部分。 提交前逐项检查候选文件和 staged diff:凭证、私有 URL、设备路径、账号、内部项目细节、运行日志、图片元数据和引用目标。扫描命中需要人工判断;无命中不是公开安全的证明。只暂存明确路径,保留不确定项。 运行与改动相关的测试和 `git diff --check`,核对实际 staged 内容后提交。用户已授权的 push/PR 可以直接推进;默认分支前缀 `codex/`。PR 描述围绕问题、最终行为和验证结果,诚实标注未运行项与重要限制。 提交后验证远端 head 与本地一致;可用时将 PR 附到当前任务。合并需要用户授权并满足仓库规则,不因 PR 创建成功自动合并。不 force push,不为整理提交覆盖、删除或藏匿无关修改。
View on GitHub