confirm-destructive-actions — Claude Code skill: rules and setup
The confirm-destructive-actions Claude Code skill sets confirmation rules for risky UI actions. It activates when adding a destructive button or writing a confirmation dialog.
AGPL-3.0 ★ 1,120 updated 2026-11-16
npx skills add rerun-build/rerun --skill confirm-destructive-actions -a claude-codeWhat confirm-destructive-actions does
The skill requires a single dialog before risky actions such as deleting data, revoking access, restarting a service, or replacing text a user entered. ConfirmDialog is the standard choice; use AlertDialog when its content depends on the current state. Icon-only destructive buttons still need a dialog. A dedicated page that explains the action and offers an exit can itself act as confirmation.
When a trigger sits inside a Popover or DropdownMenu, the dialog must live outside that layer and use controlled state. Its description should name the consequences, while the confirmation button repeats the action verb instead of saying “OK.” The repository also includes an rg check for destructive buttons and cd apps/ui && pnpm ts-check, which must finish with zero errors.
What it helps with
- add a confirmation before deleting a record
- warn before revoking access or restarting a service
- keep a dialog open until its action finishes
- confirm deletion from an icon-only button
Example prompts for the agent
- Add a
ConfirmDialogbefore deleting this row. - Review the API key revocation dialog and keep it open until the action completes.
- Move the delete confirmation outside the
DropdownMenu.
How to install confirm-destructive-actions
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill confirm-destructive-actions -a claude-code2Manually: put the files in place
~/.claude/skills/confirm-destructive-actions/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/confirm-destructive-actions/
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill confirm-destructive-actions -a codex2Manually: put the files in place
.agents/skills/confirm-destructive-actions/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill confirm-destructive-actions -a cursor2Manually: put the files in place
.cursor/skills/confirm-destructive-actions/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rerun-build/rerun .claude/skills/confirm-destructive-actions2Manually: put the files in place
.github/skills/confirm-destructive-actions/SKILL.md1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill confirm-destructive-actions -a gemini-cli2Platform CLI
gemini skills install https://github.com/rerun-build/rerun --path .claude/skills/confirm-destructive-actionsManually: put the files in place
.devin/skills/confirm-destructive-actions/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about confirm-destructive-actions
How do I install confirm-destructive-actions in Claude Code?
Run npx skills add rerun-build/rerun --skill confirm-destructive-actions -a claude-code. The skill file is at ~/.claude/skills/confirm-destructive-actions/SKILL.md.
What does confirm-destructive-actions do?
It sets rules for confirming risky UI actions with a dialog and explains when to use ConfirmDialog or AlertDialog.
Where should a dialog go when its trigger is in a DropdownMenu?
Place it outside the DropdownMenu and control its open state.