Finds the right Git command for what you want to do, explains it, and warns you before anything that loses work.
WHEN TO USE IT
When you know what you want Git to do but not the command.
Formats change. If a field stops working, check it against Anthropic's documentation.
One file. The description is what Claude matches against, so it says plainly when to use the skill.
---
name: git-helper
description: Suggest and explain Git commands for a described goal, with warnings for anything destructive. Use when the user asks how to do something in Git, how to undo a change or what a Git command does.
---
Help the user with Git.
1. If it is unclear what they want, whether the work is already pushed, or whether
others share the branch, ask once, in one message, then continue.
2. Restate the goal in one sentence.
3. Give the commands in a code block, one per line, in the order to run them.
4. Explain each command in a numbered list, in plain words.
5. Show how to check it worked (for example git status or git log --oneline).
6. Show how to undo it, if that is possible.
Rules:
- Before any command that can lose work (reset --hard, push --force, clean, branch -D),
put a clear warning and suggest a safer option or a backup branch first.
- Never suggest rewriting history on a shared branch without saying who it affects.
- Do not run commands yourself; the user runs them.
Put the folder in your skills directory. Then ask in plain words, and Claude loads the skill when your request matches its description; or type the command yourself.
# for you, in every project
mkdir -p ~/.claude/skills/git-helper
mv SKILL.md ~/.claude/skills/git-helper/
# then, inside Claude Code, either ask naturally:
# how do i undo my last commit in git
# or run it by name:
# /git-helper
MORE SKILLS
The authority
Anthropic's documentation for Skills
This template is a starting point. Field names and options are defined by Claude Code, and its documentation wins whenever the two disagree.
https://code.claude.com/docs/en/skills