一键导入
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.
git statusgit diffgit diff --cachedgit log -5 --format='%h %s'If there are no changes in the context above (nothing staged, unstaged, or untracked): stop and tell the user there's nothing to commit.
For untracked files shown in the status above, read them with the Read tool to understand their contents. Diffs already cover modified files.
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)