Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.11 KB

File metadata and controls

32 lines (22 loc) · 1.11 KB

git-commit-renamer-skill

git-commit-renamer-skill is a skill that teaches agents how to rename Git commit messages safely.

It covers:

  • Renaming the latest unpushed commit
  • Renaming an older unpushed commit with interactive rebase
  • Renaming already-pushed commits
  • Using git push --force-with-lease instead of plain --force
  • Communicating the risk of rewriting published history

Install

bunx skills add simples-tools/git-commit-renamer-skill

What the skill does

The skill instructs agents to:

  • Inspect whether the target commit is pushed or unpushed
  • Choose the smallest safe rewrite
  • Use git commit --amend for a simple last-commit rename
  • Use git rebase -i with reword for older commits
  • Require explicit care when published history must be rewritten
  • Verify the result with a concise log check

Why this exists

Renaming a commit is easy to get wrong if the agent does not distinguish between local-only history and history that has already been pushed. This skill gives a clear decision tree so agents avoid unsafe defaults and explain the tradeoffs when a force-push is required.