amend

Amend the most recent git commit with staged changes and an optional new message.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/KosmoCHE/claude-plugins --skill amend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: amend
Source: https://github.com/KosmoCHE/claude-plugins/tree/main/git-command/skills/amend
Command: npx skills add https://github.com/KosmoCHE/claude-plugins --skill amend

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Amend the most recent git commit by staging changes, optionally updating the commit message, and rewriting the commit history in your local repository.

Core Features & Use Cases

  • Stage and amend changes to the previous commit.
  • Optionally provide a new commit message in Conventional Commits format.
  • Safety guardrails to avoid amending commits that have already been pushed.

Quick Start

Amend the last commit by staging changes and optionally providing a new message via a heredoc, then run git commit --amend.

Frequently Asked Questions about amend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I amend the last git commit with new staged changes?

To amend the last git commit, the Skill stages your changes and executes git commit --amend. It automatically applies --no-edit to preserve the existing message or uses a HEREDOC when you provide a new one.

Can I update the commit message when amending a git commit?

Yes, you can update the commit message when amending by providing a new message in Conventional Commits format. The Skill ensures proper formatting by passing the updated message using a HEREDOC.

Does git commit amend work with unstaged changes in my local repository?

Yes, git commit amend works with both unstaged and staged changes. The Skill stages your current modifications before amending the most recent commit across typical local development workflows.

When should I not use git commit --amend to rewrite commit history?

You should not use git commit --amend on commits that have already been pushed to a remote repository. This Skill includes safety guardrails to prevent amending pushed commits and avoid rewriting shared history.

What is the best way to add forgotten files to the previous git commit?

The best way to add forgotten files to the previous git commit is using git commit --amend. This Skill stages your missed files and amends the latest commit while optionally preserving the original message with --no-edit.