git-maker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Maker Skill

Git Maker 技能

Fast, safe commit-and-push orchestration.
<purpose>
  • 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.
</purpose>
<routing_rule>
Use
git-maker
when the user wants commit + push in one operation.
Use 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
    git-maker
    unless commit+push is also explicitly requested and the history operation is separately authorized
</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
    git-commit
    because push is conditional, not automatic
</trigger_conditions>
<scripts>
ScriptPurpose
scripts/git-maker-fast.sh inspect [start_dir] [--jobs N]
Fast preflight: pruned repo discovery, parallel repo status, file inventory
scripts/git-maker-fast.sh push [--force] [repo...]
Push explicit repos without rediscovering; non-interactive; protected force-push guard
scripts/git-commit.sh [--repo path] "msg" [files...]
Commit staged or selected files in one repository
scripts/git-push.sh [--force]
Legacy/discovered safe push fallback
scripts/repo-discover.sh [start_dir]
Legacy repo discovery fallback
scripts/repo-status.sh [repo]
Legacy status fallback
</scripts>
<worktree_support>
Linked Git worktrees are valid execution contexts.
  • Do not require
    .git
    to be a directory; in linked worktrees it is usually a file pointing at the common git dir.
  • Resolve repository scope with
    git rev-parse --show-toplevel
    , not by walking to a physical
    .git
    directory.
  • 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
    repo|...
    for commit and push phases; do not collapse linked worktrees to
    git-common-dir
    .
  • If the helper reports
    worktree|linked
    , continue normally unless the branch is detached or another push safety rule blocks the run.
</worktree_support>
<support_file_read_order>
Read only what is needed:
  1. rules/speed-and-automation.md
    when the user asks for speed, the repo set may be large, or multiple repositories may be present.
  2. rules/agent-parallelism.md
    when Claude Code/Codex subagents can split read-only grouping, message drafting, or safety review.
  3. rules/commit-and-push-policy.md
    before staging/committing or when argument mode, grouping, safety, or push behavior is unclear.
  4. rules/validation.md
    before reporting the run or skill refactor complete.
</support_file_read_order>
<argument_validation>
Arguments pass to the commit phase unless
--force
is present.
ArgumentMeaning
missingstart from current-session changes, verify against git state, group logically
ALL
/
all
include all uncommitted changes, group logically, leave no file behind
--force
remove from commit arguments and pass only to push (
--force-with-lease
, blocked on
main
/
master
)
other texttreat 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工作区内,也将当前检出根目录视为仓库边界。
  • 自动推送创建成功的提交,提交与推送之间无需确认步骤。
  • 优先使用快速辅助工具,减少重复的仓库发现操作,并并行执行只读检查。
</purpose>
<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>
脚本用途
scripts/git-maker-fast.sh inspect [start_dir] [--jobs N]
快速预检:精简仓库发现、并行仓库状态检查、文件清单整理
scripts/git-maker-fast.sh push [--force] [repo...]
推送指定仓库,无需重新发现;非交互式;带有强制推送保护机制
scripts/git-commit.sh [--repo path] "msg" [files...]
在单个仓库中提交已暂存或选定的文件
scripts/git-push.sh [--force]
遗留/自动发现的安全推送备选方案
scripts/repo-discover.sh [start_dir]
遗留的仓库发现备选方案
scripts/repo-status.sh [repo]
遗留的状态检查备选方案
</scripts>
<worktree_support>
关联的Git工作区是有效的执行环境。
  • 不要求
    .git
    必须是目录;在关联工作区中,它通常是指向公共Git目录的文件。
  • 使用
    git rev-parse --show-toplevel
    解析仓库范围,而非遍历查找物理
    .git
    目录。
  • 将每个关联工作区的检出根目录视为独立的提交/暂存边界,因为它有自己的索引、分支和工作区。
  • 在提交和推送阶段保留预检得到的仓库路径
    repo|...
    ;请勿将关联工作区合并到
    git-common-dir
  • 如果辅助工具报告
    worktree|linked
    ,除非分支处于分离状态或其他推送安全规则阻止运行,否则正常继续执行。
</worktree_support>
<support_file_read_order>
仅读取所需文件:
  1. 当用户要求提速、仓库集合可能较大或存在多个仓库时,读取
    rules/speed-and-automation.md
  2. 当Claude Code/Codex子代理可拆分只读分组、消息撰写或安全审核工作时,读取
    rules/agent-parallelism.md
  3. 在暂存/提交之前,或当参数模式、分组、安全规则或推送行为不明确时,读取
    rules/commit-and-push-policy.md
  4. 在报告运行完成或技能重构完成之前,读取
    rules/validation.md
</support_file_read_order>
<argument_validation>
参数会传递到提交阶段,除非存在
--force
参数。
参数含义
缺失从当前会话的更改开始,与Git状态进行验证,按逻辑分组
ALL
/
all
包含所有未提交的更改,按逻辑分组,不遗漏任何文件
--force
从提交参数中移除,仅传递给推送操作(使用
--force-with-lease
,在
main
/
master
分支上会被阻止)
其他文本视为仓库发现、文件选择、暂存和提交消息生成的筛选条件
如果明确的筛选条件与实际Git状态不匹配,则停止执行。
</argument_validation>
<workflow>

Phase 1. Fast preflight

阶段1. 快速预检

Run the fast helper first:
bash
scripts/git-maker-fast.sh inspect . --jobs 4
Use its repo list and file inventory to decide:
  • which repositories are in scope
  • whether any checkout is a linked worktree (
    worktree|linked
    ) and should still be handled at its
    repo|...
    root
  • 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/repo

Phase 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/file1
Rules:
  • 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.md

Phase 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/path
Fallback:
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 --force

Phase 4. Report

阶段4. 报告

Report:
  • commits created and messages
  • repositories pushed
  • skipped or failed push targets
  • any remaining local changes or blockers
</workflow> <parallelization>
  • Parallelize read-only repository inspection with
    scripts/git-maker-fast.sh inspect --jobs N
    .
  • For complex dirty trees, read
    rules/agent-parallelism.md
    before using Claude Code/Codex subagents; subagents may only review and propose.
  • 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.
</parallelization> <required>
CategoryRule
Commit firstAll commit groups must succeed before push.
Automatic pushDo not ask whether to push after successful commits.
SafetyNever force push to
main
or
master
; never push from detached HEAD.
UpstreamIf no upstream exists, push with
-u origin <branch>
.
Reuse preflightPrefer
git-maker-fast.sh push [repo...]
to avoid duplicate discovery.
WorktreesLinked worktrees are supported; use checkout root paths, not the common git dir.
Agent boundariesSubagents may review and propose, but the main integrator owns staging, commit, and push.
ValidationRun
rules/validation.md
checks before final reporting.
</required> <forbidden>
CategoryAvoid
Push confirmationasking "want to push?" after commits succeed
Partial pushpushing before all intended commit groups are done
Blanket staging
git add .
unless
ALL
mode intentionally includes everything and grouping remains explicit
Unsafe historyamend, rebase, reset, raw
--force
, or
--no-verify
without explicit request
Secretscommitting credentials, tokens, private keys, or unrelated user changes
</forbidden> <examples>
报告内容:
  • 创建的提交及其消息
  • 已推送的仓库
  • 跳过或推送失败的目标
  • 任何剩余的本地更改或阻塞因素
</workflow> <parallelization>
  • 使用
    scripts/git-maker-fast.sh inspect --jobs N
    并行执行只读仓库检查。
  • 对于复杂的脏目录树,在使用Claude Code/Codex子代理之前,请阅读
    rules/agent-parallelism.md
    ;子代理仅可进行审核和提议。
  • 同一仓库内的提交不可并行执行,因为Git索引是共享的。
  • 只有在明确仓库边界和文件分组后,才可独立处理多仓库提交。
  • 仅在所有预期提交成功后再进行推送。
</parallelization> <required>
类别规则
先提交所有提交分组必须成功后才可推送。
自动推送提交成功后请勿询问是否推送。
安全规则切勿强制推送到
main
master
分支;切勿从分离HEAD状态推送。
上游分支如果没有上游分支,则使用
-u origin <branch>
进行推送。
复用预检结果优先使用
git-maker-fast.sh push [repo...]
以避免重复发现仓库。
工作区支持支持关联工作区;使用检出根路径,而非公共Git目录。
代理边界子代理可进行审核和提议,但主集成器负责暂存、提交和推送操作。
验证在最终报告前运行
rules/validation.md
中的检查项。
</required> <forbidden>
类别禁止操作
推送确认提交成功后询问“是否要推送?”
部分推送在所有预期提交分组完成前进行推送
全局暂存使用
git add .
,除非在
ALL
模式下有意包含所有文件且分组仍明确
不安全的历史操作在无明确请求的情况下进行修正、变基、重置、直接
--force
--no-verify
操作
机密信息提交凭据、令牌、私钥或无关的用户更改
</forbidden> <examples>

Simple fast commit and push

简单快速的提交与推送

text
/git-maker
Result: fast inspect → group session changes → commit each group → auto-push inspected repo(s).
text
/git-maker
结果:快速预检 → 分组会话更改 → 提交每个分组 → 自动推送已检查的仓库。

Commit all and push

提交所有更改并推送

text
/git-maker ALL
Result: 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 --force
Result: commit normally, then push with
--force-with-lease
; blocked on
main
/
master
.
text
/git-maker --force
结果:正常提交,然后使用
--force-with-lease
推送;在
main
/
master
分支上会被阻止。

Commit and push inside a linked worktree

在关联工作区内提交并推送

text
/git-maker
Result: 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 changes
Result: do not use this skill; route to
git-commit
.
</examples>
text
commit these changes
结果:不使用本技能,路由到
git-commit
</examples>