
from dots23
Draft and apply a clear, imperative-style message to amend the last git commit without changing the commit contents; preserves co-author trailers and warns abou
The Amend Last Commit skill helps an agent read the last commit and its diff, draft a concise, imperative commit message (subject + optional body), and run git commit --amend safely. It focuses on rewriting commit messages only — never modifying staged content — and preserves co-author trailers when present.
Use this skill when the last commit message is unhelpful, needs clarification, or should include additional context (e.g., performance improvement, bug root cause). The skill runs checks for staged changes and warns if amending would include them. It's tailored for interactive developer workflows where concise commit history matters.
git diff HEAD~1), draft a subject line under 72 chars in imperative mood, optionally add a wrapped body, and run git commit --amend with a heredoc. Confirm with git log -1.Works with agents that can run shell/git commands locally (Copilot-style or Claude/Codex setups with repo access). Best for agents with local repo context and safe shell execution privileges.
Pure instruction skill for amending the last git commit message. No scripts to run — just clear steps that guide an agent to read the diff, draft an imperative-style message, and apply it via git commit --amend with a HEREDOC. Well-structured with safety rules like preserving co-author trailers and warning about staged changes.
Clean skill, no security concerns. Could benefit from handling edge cases like detached HEAD and merge commits. Missing metadata field in frontmatter.