Amend

From drn/dots · View interactive version

Amend is an AI agent skill from the GitHub repository drn/dots. Amend the last git commit with a useful, descriptive message. Use when you want to rewrite a commit message, amend commit description, or improve the last commit message.

How to use this skill

Skill file

Amend Last Commit

Rewrite the last commit message with a clear, descriptive summary based on the actual changes.

Arguments

Context

Instructions

Step 1: Understand the changes

  1. Read the diff of the last commit: git diff HEAD~1 (full diff, not just stat)
  2. Read any files that were added or significantly changed to understand their purpose
  3. Check the current commit message — if it's already descriptive and accurate, tell the user and stop

Step 2: Draft the message

Write a commit message following this structure:

Subject line (first line):

Body (separated by blank line, optional but preferred for non-trivial changes):

Step 3: Amend the commit

Run git commit --amend with the new message. Use a HEREDOC to pass the message:

git commit --amend -m "$(cat <<'EOF'
Subject line here

Body paragraph here explaining the change in more detail.
EOF
)"

Step 4: Confirm

Show the user the new commit with git log -1 so they can verify.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.