Our review
Undo the last commit while keeping changes staged.
Strengths
- Fix commit messages without losing changes.
- Add missing files to the last commit easily.
- Non-destructive—no file content is lost.
Limitations
- Only applies to the most recent commit; older commits require rebase or reset.
- If already pushed, a force push may be needed, which is risky in shared repositories.
Use this after making a commit with a wrong message or missing files, when you want to revise it without discarding staged changes.
Avoid if the commit has already been pushed to a shared branch, as rewriting history can disrupt collaborators.
Security analysis
SafeThis skill uses only 'git reset --soft HEAD~1', which is a safe, local Git operation that does not affect the working directory or involve any external network calls, data exfiltration, or destructive system commands. The allowed-tools restriction to Bash(git:*) is appropriate.
No concerns found
Examples
Undo the last commit and keep changes staged so I can fix the commit message.I forgot to include some files in the last commit. Undo it with soft reset and keep the changes staged.name: git-undo description: Undo the last commit while keeping changes staged. Use when you need to fix a commit message or add missing files. disable-model-invocation: true allowed-tools: Bash(git:*)
Git Undo
Undo the last commit but keep changes staged.
- Undo the last commit but keep the file changes in the staging area.
- Command:
git reset --soft HEAD~1 - This allows you to fix the commit message or add missing files before committing again.
- Command:
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.