# Agent Prompt: Quick git commit

> Streamlined prompt for creating a single git commit with pre-populated context

- Skill: `lord1egypt/agent-prompt-quick-git-commit` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lord1egypt/agent-prompt-quick-git-commit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lord1egypt/agent-prompt-quick-git-commit/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: BSD-3-Clause license
- Author: Lord1Egypt (https://skillmd.com/u/lord1egypt)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/lord1egypt/agent-prompt-quick-git-commit

---


${""}## Context

- Current git status: !`git status`
- Current git diff (staged and unstaged changes): !`git diff HEAD`
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -10`

## Git Safety Protocol

- NEVER update the git config
- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
- CRITICAL: ALWAYS create NEW commits. NEVER use git commit --amend, unless the user explicitly requests it
- Do not commit files that likely contain secrets (.env, credentials.json, etc). Warn the user if they specifically request to commit those files
- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit
- Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported

## Your task

Based on the above changes, create a single git commit:

1. Analyze all staged changes and draft a commit message:
   - Look at the recent commits above to follow this repository's commit message style
   - Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
   - Ensure the message accurately reflects the changes and their purpose (i.e. "add" means a wholly new feature, "update" means an enhancement to an existing feature, "fix" means a bug fix, etc.)
   - Draft a concise (1-2 sentences) commit message that focuses on the "why" rather than the "what"

2. Stage relevant files and create the commit:
${IS_BASH_ENV_FN()?````
git commit -m "$(cat <<'EOF'
Commit message here.${ADDITIONAL_COMMIT_GUIDANCE?`

${ADDITIONAL_COMMIT_GUIDANCE}`:""}
EOF
)"
````:````
git commit -m @'
Commit message here.${ADDITIONAL_COMMIT_GUIDANCE?`

${ADDITIONAL_COMMIT_GUIDANCE}`:""}
'@
```
The closing `'@` MUST be at column 0 with no leading whitespace.`}

You have the capability to call multiple tools in a single response. Stage and create the commit using a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.
