git-maker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Maker Skill
Git Maker 技能
<purpose>Fast, safe commit-and-push orchestration.
- Create one or more Conventional Commits from current repository changes.
- Treat the current checkout root as the repo boundary even when the current directory is inside a linked Git worktree.
- Push successfully created commits automatically, with no confirmation step between commit and push.
- Use the fast helper first to reduce repeated repository discovery and parallelize read-only inspection.
<routing_rule>
Use when the user wants commit + push in one operation.
git-makerUse a neighboring skill instead when:
- the user asks only to commit → use
git-commit - the user asks only to push/sync commits → use
git-push - the user asks to rebase/reset/amend/rewrite history → do not use unless commit+push is also explicitly requested and the history operation is separately authorized
git-maker
</routing_rule>
<trigger_conditions>
Positive triggers:
- "commit and push"
- "commit and push these changes"
- "/git-maker"
- "make a commit and push it"
- "save and push my changes"
- Korean request meaning "commit and push"
- Korean request meaning "save the changes and upload them"
Negative triggers:
- "commit these changes" →
git-commit - "push my commits" →
git-push - "rebase this branch" → not this skill
Boundary trigger:
- "commit this, then maybe push" → use because push is conditional, not automatic
git-commit
</trigger_conditions>
<scripts>
| Script | Purpose |
|---|---|
| Fast preflight: pruned repo discovery, parallel repo status, file inventory |
| Push explicit repos without rediscovering; non-interactive; protected force-push guard |
| Commit staged or selected files in one repository |
| Legacy/discovered safe push fallback |
| Legacy repo discovery fallback |
| Legacy status fallback |
<worktree_support>
Linked Git worktrees are valid execution contexts.
- Do not require to be a directory; in linked worktrees it is usually a file pointing at the common git dir.
.git - Resolve repository scope with , not by walking to a physical
git rev-parse --show-topleveldirectory..git - Treat each linked worktree checkout root as its own commit/staging boundary because it has its own index, branch, and working tree.
- Preserve the preflight repo path from for commit and push phases; do not collapse linked worktrees to
repo|....git-common-dir - If the helper reports , continue normally unless the branch is detached or another push safety rule blocks the run.
worktree|linked
</worktree_support>
<support_file_read_order>
Read only what is needed:
- when the user asks for speed, the repo set may be large, or multiple repositories may be present.
rules/speed-and-automation.md - when Claude Code/Codex subagents can split read-only grouping, message drafting, or safety review.
rules/agent-parallelism.md - before staging/committing or when argument mode, grouping, safety, or push behavior is unclear.
rules/commit-and-push-policy.md - before reporting the run or skill refactor complete.
rules/validation.md
</support_file_read_order>
<argument_validation>
Arguments pass to the commit phase unless is present.
--force| Argument | Meaning |
|---|---|
| missing | start from current-session changes, verify against git state, group logically |
| include all uncommitted changes, group logically, leave no file behind |
| remove from commit arguments and pass only to push ( |
| other text | treat as a filter for repo discovery, file selection, staging, and commit message generation |
Stop if an explicit filter does not match actual git state.
</argument_validation>
<workflow><purpose>快速、安全的提交-推送编排工具。
- 根据当前仓库的更改创建一个或多个符合规范的提交(Conventional Commits)。
- 即使当前目录位于关联的Git工作区内,也将当前检出根目录视为仓库边界。
- 自动推送创建成功的提交,提交与推送之间无需确认步骤。
- 优先使用快速辅助工具,减少重复的仓库发现操作,并并行执行只读检查。
<routing_rule>
当用户希望一键完成提交+推送操作时,使用。
git-maker在以下情况时,请使用其他关联技能:
- 用户仅要求提交 → 使用
git-commit - 用户仅要求推送/同步提交 → 使用
git-push - 用户要求变基/重置/修正/重写提交历史 → 除非明确要求同时进行提交+推送且历史操作已单独授权,否则请勿使用
git-maker
</routing_rule>
<trigger_conditions>
正向触发词:
- "commit and push"
- "commit and push these changes"
- "/git-maker"
- "make a commit and push it"
- "save and push my changes"
- 表示“提交并推送”的韩语请求
- 表示“保存更改并上传”的韩语请求
负向触发词:
- "commit these changes" → 触发
git-commit - "push my commits" → 触发
git-push - "rebase this branch" → 不触发本技能
边界触发情况:
- "commit this, then maybe push" → 使用,因为推送是有条件的,并非自动执行
git-commit
</trigger_conditions>
<scripts>
| 脚本 | 用途 |
|---|---|
| 快速预检:精简仓库发现、并行仓库状态检查、文件清单整理 |
| 推送指定仓库,无需重新发现;非交互式;带有强制推送保护机制 |
| 在单个仓库中提交已暂存或选定的文件 |
| 遗留/自动发现的安全推送备选方案 |
| 遗留的仓库发现备选方案 |
| 遗留的状态检查备选方案 |
<worktree_support>
关联的Git工作区是有效的执行环境。
- 不要求必须是目录;在关联工作区中,它通常是指向公共Git目录的文件。
.git - 使用解析仓库范围,而非遍历查找物理
git rev-parse --show-toplevel目录。.git - 将每个关联工作区的检出根目录视为独立的提交/暂存边界,因为它有自己的索引、分支和工作区。
- 在提交和推送阶段保留预检得到的仓库路径;请勿将关联工作区合并到
repo|...。git-common-dir - 如果辅助工具报告,除非分支处于分离状态或其他推送安全规则阻止运行,否则正常继续执行。
worktree|linked
</worktree_support>
<support_file_read_order>
仅读取所需文件:
- 当用户要求提速、仓库集合可能较大或存在多个仓库时,读取。
rules/speed-and-automation.md - 当Claude Code/Codex子代理可拆分只读分组、消息撰写或安全审核工作时,读取。
rules/agent-parallelism.md - 在暂存/提交之前,或当参数模式、分组、安全规则或推送行为不明确时,读取。
rules/commit-and-push-policy.md - 在报告运行完成或技能重构完成之前,读取。
rules/validation.md
</support_file_read_order>
<argument_validation>
参数会传递到提交阶段,除非存在参数。
--force| 参数 | 含义 |
|---|---|
| 缺失 | 从当前会话的更改开始,与Git状态进行验证,按逻辑分组 |
| 包含所有未提交的更改,按逻辑分组,不遗漏任何文件 |
| 从提交参数中移除,仅传递给推送操作(使用 |
| 其他文本 | 视为仓库发现、文件选择、暂存和提交消息生成的筛选条件 |
如果明确的筛选条件与实际Git状态不匹配,则停止执行。
</argument_validation>
<workflow>Phase 1. Fast preflight
阶段1. 快速预检
Run the fast helper first:
bash
scripts/git-maker-fast.sh inspect . --jobs 4Use its repo list and file inventory to decide:
- which repositories are in scope
- whether any checkout is a linked worktree () and should still be handled at its
worktree|linkedrootrepo|... - staged vs unstaged vs untracked files
- logical change groups
- whether a slower fallback is needed
If the helper fails or insufficient detail is available, fall back to:
bash
scripts/repo-discover.sh
scripts/repo-status.sh
scripts/repo-status.sh path/to/repo优先运行快速辅助工具:
bash
scripts/git-maker-fast.sh inspect . --jobs 4利用其返回的仓库列表和文件清单来决定:
- 哪些仓库在范围内
- 是否有检出目录是关联工作区(),并且仍需在其
worktree|linked根目录处理repo|... - 已暂存、未暂存和未跟踪的文件
- 逻辑更改分组
- 是否需要使用较慢的备选方案
如果辅助工具失败或提供的细节不足,则回退到以下命令:
bash
scripts/repo-discover.sh
scripts/repo-status.sh
scripts/repo-status.sh path/to/repoPhase 2. Group and commit
阶段2. 分组并提交
Partition changes into logical groups. Commit each group sequentially per repository:
bash
scripts/git-commit.sh "<type>[scope]: <Korean subject>" path/to/file1 path/to/file2
scripts/git-commit.sh --repo path/to/repo "<type>[scope]: <Korean subject>" path/to/file1Rules:
- one logical change per commit
- targeted staging only
- Korean subject/body after the Conventional Commit type/scope
- subject uses neutral commit-summary wording, not Korean command-style imperative endings
- no secrets, unrelated user changes, destructive git operations, or
--no-verify - if any commit fails, stop and do not push
For detailed policy, read .
rules/commit-and-push-policy.md将更改划分为逻辑分组,按仓库顺序依次提交每个分组:
bash
scripts/git-commit.sh "<type>[scope]: <韩语主题>" path/to/file1 path/to/file2
scripts/git-commit.sh --repo path/to/repo "<type>[scope]: <韩语主题>" path/to/file1规则:
- 每个提交对应一个逻辑更改
- 仅针对性暂存文件
- 符合规范的提交类型/范围后使用韩语主题/正文
- 主题使用中性的提交总结措辞,而非韩语命令式结尾
- 不包含机密信息、无关的用户更改、破坏性Git操作或参数
--no-verify - 如果任何提交失败,则停止执行且不进行推送
如需详细策略,请阅读。
rules/commit-and-push-policy.mdPhase 3. Push automatically
阶段3. 自动推送
After all commit groups succeed, push without asking for confirmation.
Prefer reusing the preflight repo list:
bash
scripts/git-maker-fast.sh push /absolute/repo/path
scripts/git-maker-fast.sh push --force /absolute/repo/pathFallback:
bash
scripts/git-push.sh
scripts/git-push.sh --force所有提交分组成功后,无需询问确认直接推送。
优先复用预检得到的仓库列表:
bash
scripts/git-maker-fast.sh push /absolute/repo/path
scripts/git-maker-fast.sh push --force /absolute/repo/path备选方案:
bash
scripts/git-push.sh
scripts/git-push.sh --forcePhase 4. Report
阶段4. 报告
Report:
- commits created and messages
- repositories pushed
- skipped or failed push targets
- any remaining local changes or blockers
- Parallelize read-only repository inspection with .
scripts/git-maker-fast.sh inspect --jobs N - For complex dirty trees, read before using Claude Code/Codex subagents; subagents may only review and propose.
rules/agent-parallelism.md - Do not parallelize commits in the same repository because the git index is shared.
- Multi-repo commits may be worked independently only after repo boundaries and file groups are clear.
- Push only after every intended commit succeeds.
| Category | Rule |
|---|---|
| Commit first | All commit groups must succeed before push. |
| Automatic push | Do not ask whether to push after successful commits. |
| Safety | Never force push to |
| Upstream | If no upstream exists, push with |
| Reuse preflight | Prefer |
| Worktrees | Linked worktrees are supported; use checkout root paths, not the common git dir. |
| Agent boundaries | Subagents may review and propose, but the main integrator owns staging, commit, and push. |
| Validation | Run |
| Category | Avoid |
|---|---|
| Push confirmation | asking "want to push?" after commits succeed |
| Partial push | pushing before all intended commit groups are done |
| Blanket staging | |
| Unsafe history | amend, rebase, reset, raw |
| Secrets | committing credentials, tokens, private keys, or unrelated user changes |
报告内容:
- 创建的提交及其消息
- 已推送的仓库
- 跳过或推送失败的目标
- 任何剩余的本地更改或阻塞因素
- 使用并行执行只读仓库检查。
scripts/git-maker-fast.sh inspect --jobs N - 对于复杂的脏目录树,在使用Claude Code/Codex子代理之前,请阅读;子代理仅可进行审核和提议。
rules/agent-parallelism.md - 同一仓库内的提交不可并行执行,因为Git索引是共享的。
- 只有在明确仓库边界和文件分组后,才可独立处理多仓库提交。
- 仅在所有预期提交成功后再进行推送。
| 类别 | 规则 |
|---|---|
| 先提交 | 所有提交分组必须成功后才可推送。 |
| 自动推送 | 提交成功后请勿询问是否推送。 |
| 安全规则 | 切勿强制推送到 |
| 上游分支 | 如果没有上游分支,则使用 |
| 复用预检结果 | 优先使用 |
| 工作区支持 | 支持关联工作区;使用检出根路径,而非公共Git目录。 |
| 代理边界 | 子代理可进行审核和提议,但主集成器负责暂存、提交和推送操作。 |
| 验证 | 在最终报告前运行 |
| 类别 | 禁止操作 |
|---|---|
| 推送确认 | 提交成功后询问“是否要推送?” |
| 部分推送 | 在所有预期提交分组完成前进行推送 |
| 全局暂存 | 使用 |
| 不安全的历史操作 | 在无明确请求的情况下进行修正、变基、重置、直接 |
| 机密信息 | 提交凭据、令牌、私钥或无关的用户更改 |
Simple fast commit and push
简单快速的提交与推送
text
/git-makerResult: fast inspect → group session changes → commit each group → auto-push inspected repo(s).
text
/git-maker结果:快速预检 → 分组会话更改 → 提交每个分组 → 自动推送已检查的仓库。
Commit all and push
提交所有更改并推送
text
/git-maker ALLResult: all uncommitted files are grouped, committed, and pushed. No file is skipped.
text
/git-maker ALL结果:所有未提交的文件被分组、提交并推送,无文件被遗漏。
Commit and force push a feature branch
提交并强制推送功能分支
text
/git-maker --forceResult: commit normally, then push with ; blocked on /.
--force-with-leasemainmastertext
/git-maker --force结果:正常提交,然后使用推送;在/分支上会被阻止。
--force-with-leasemainmasterCommit and push inside a linked worktree
在关联工作区内提交并推送
text
/git-makerResult: fast inspect from the worktree subdirectory → resolve the linked worktree checkout root → group/commit there → auto-push that worktree branch.
text
/git-maker结果:从工作区子目录进行快速预检 → 解析关联工作区的检出根目录 → 在该目录分组/提交 → 自动推送该工作区的分支。
Commit-only request
仅提交请求
text
commit these changesResult: do not use this skill; route to .
</examples>git-committext
commit these changes结果:不使用本技能,路由到。
</examples>git-commit