一键导入
commit
Create a git commit with an auto-generated conventional commit message summarizing the changes. Optionally push to remote.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a git commit with an auto-generated conventional commit message summarizing the changes. Optionally push to remote.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | commit |
| description | Create a git commit with an auto-generated conventional commit message summarizing the changes. Optionally push to remote. |
Create a commit with an auto-generated message summarizing the relevant changes for the current task.
Run these commands in parallel:
git status — see untracked and modified filesgit diff — unstaged changesgit diff --cached — staged changesgit log -5 --format='%h %s' — recent commits for message style referenceIf there are no changes (nothing staged, unstaged, or untracked): stop and tell the user there's nothing to commit.
For untracked files shown in git status, read them to understand their contents.
For modified files, the diff output is sufficient.
Evaluate each changed/untracked file against the apparent intent of the current task. Classify each as relevant or unrelated.
Mark a file as unrelated if it:
.cache/) not caused by this taskIf unsure about any file, ask the user before proceeding:
"These files are also changed — are they part of this commit?
path/to/file1path/to/file2"
Only carry the relevant files forward into Step 4.
Write a conventional commit message:
feat:, fix:, chore:, refactor:, test:, docs:, etc.feat(api):If multiple unrelated changes exist, suggest the user split them into separate commits.
git add <specific files> — never use git add -Agit commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
<optional body>
EOF
)"
git status to verify the commit succeeded.After a successful commit, ask the user: "Push to remote?"
git rev-parse --abbrev-ref @{upstream} 2>/dev/null, then git push -u origin HEAD (no upstream) or git push (has upstream)