with one click
commit
Generate a commit message for the current staged changes and commit
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Generate a commit message for the current staged changes and commit
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | commit |
| description | Generate a commit message for the current staged changes and commit |
| allowed-tools | Bash(git diff *), Bash(git status), Bash(git commit *), Bash(git log *), Bash(curl *), AskUserQuestion |
Generate a high-quality commit message for the currently staged changes, present it for approval, then commit.
Run these commands to understand the staged changes:
git diff --cached --stat to see which files are stagedgit diff --cached to see the full diffgit status to check overall state (never use -uall flag)If there are no staged changes, tell the user and stop.
Determine the intent of the change from the diff. If the intent is not clear from the code alone, use AskUserQuestion to ask the user to clarify the purpose of the change before writing the message.
Write a commit message following ALL of the guidance below. Where the project-specific guidance conflicts with the general guidance, the project-specific guidance takes precedence.
!curl -sf https://raw.githubusercontent.com/ably/engineering/refs/heads/main/best-practices/commits.md
[PUB-123]).The component prefix is derived from the file paths in the diff. Examples:
action: - changes to src/index.ts (the core action logic)ci: - changes to .github/workflows/project: - changes to package.json, tsconfig.json, .eslintrc.js,
action.yml, .gitignore, or other project configdocs: - changes to README.md, CONTRIBUTING.md, CHANGELOG.mdclaude/skills: claude/rules: - changes to .claude/ configurationIf changes span multiple unrelated components, pick the most significant one or use a broader prefix.
Show the complete commit message to the user in a fenced code block.
Then use AskUserQuestion to ask: "Do you want to commit with this message, edit it, or cancel?" with three options: Commit, Edit, Cancel.
git commit -m "$(cat <<'EOF'
<the message>
EOF
)"
After a successful commit, run git log -1 to confirm.