git-reset
Use when the user asks to reset the workspace, discard all changes, or restore to HEAD. Resets staged, unstaged, and untracked files after confirmation.
SKILL.mdskills/reset/SKILL.md
GitHubReset Workspace to HEAD
Workflow
- Run
git statusto show current workspace state - Summarize what will be lost (staged changes, unstaged changes, untracked files)
- Ask for user confirmation with AskUserQuestion before proceeding
- If approved — reset everything; if rejected — abort
Asking for Confirmation
Use AskUserQuestion to confirm the destructive action:
question: "This will discard all local changes. Proceed?"
options:
- label: "Reset everything"
description: "Discard staged, unstaged, and untracked files"
- label: "Keep untracked files"
description: "Reset staged and unstaged changes but keep new files"
After Approval
Reset everything:
git reset --hard HEAD
git clean -fd
Keep untracked files:
git reset --hard HEAD
Important
- Never run without user confirmation — this is destructive and irreversible
- Always show
git statusoutput so the user knows what will be discarded