skills/git-workflow/SKILL.md
处理 git 提交、推送、分支命名与提交信息规范;当任务涉及 commit、push、起分支或整理 commit message 时使用。
npx skillsauth add dcjanus/prompts git-workflowInstall 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.
git status -sb
Assisted-by 信息:<skill_dir> 是当前 SKILL.md 所在文件夹。脚本必须直接当作可执行命令运行,不要用 uv run python 或 python。
(cd <skill_dir> && ./scripts/codex_git_commit.py)
错误示例:
uv run python skills/git-workflow/scripts/codex_git_commit.py
python skills/git-workflow/scripts/codex_git_commit.py
git commit --only \
-m "type(scope): concise summary" \
-m "Optional body explaining the change." \
--trailer "Co-authored-by: Name <[email protected]>" \
--trailer "Assisted-by: <agent-name>:<model-name>" \
-- <paths-owned-by-current-task>
git show --name-status --oneline --no-renames HEAD
git status -sb
git push <remote> <branch>
<paths-owned-by-current-task> 只包含当前任务负责的文件或目录;多个 Agent 共用同一个 worktree 时也按这个规则执行。gen/。git add;git commit --only -- <paths> 会直接提交这些路径的当前工作区内容。type(scope): short summary,遵循 Conventional Commits。type:feat、fix、refactor、docs、test、choresummary 聚焦结果;若无合适 scope,可省略。git commit --only \
-m "type(scope)!: concise summary" \
-m "BREAKING CHANGE: describe the impact and required migration." \
--trailer "Assisted-by: <agent-name>:<model-name>" \
-- <paths-owned-by-current-task>
BREAKING CHANGE: footer 应说明影响范围和迁移方式;不要只重复标题。BREAKING CHANGE:,不要写成 BREAK CHANGE:。-m;结构化 trailer 使用 --trailer。--trailer "Assisted-by: <agent-name>:<model-name>" 追加 trailer。Co-authored-by、Reviewed-by、Assisted-by 等多个 trailer 时,重复使用 --trailer "Key: Value";不要手工用多个 -m 拼 trailer block。git show -s --format=%B HEAD | git interpret-trailers --parse 验证 trailer 解析结果。git commit -m ... 时,不要在提交标题或正文里直接放未转义的反引号 `。git switch,恢复工作区或暂存区优先使用 git restore,尽量避免 git checkout。git commit、git push 或其他写操作。.git/index.lock,先判断是否有其他活跃 Git 进程。git status -sb 确认本次提交、分支和工作区状态符合预期。data-ai
用干净的独立 subagent 反复做代码审查、由主 agent 判断审查意见价值、修复有效问题并提交推送,直到连续三轮没有有价值审查意见。适用于用户要求 review/fix loop、clean review cycle、创建新 subagent 审查当前修改、反复 review 到没有问题、或“连续三次没有有价值建议”这类任务。
tools
使用 Python CLI 与 Google Sheets API 交互以读取、更新、批量写入、追加或清空 Google Sheets 在线表格;适用于需要通过 OAuth 授权操作 Google Workspace 表格的场景。
development
为当前 Codex thread 设置名称;仅当用户手动调用或明确要求命名、重命名、整理当前 Codex 会话标题时使用,永远不要自动调用。
testing
编写或更新 GitHub/GitLab Issue、PR、MR 的标题与正文;适用于创建、修改、重写 reviewer-facing 描述、Risks、Breaking Change、避免低价值验证噪声与本地路径泄露等场景。PR/MR 正文默认禁止 Validation;只有 CI/diff 看不到的高信噪比行为证据才允许写。