
Data Loss Gate
Makes the agent stop and get explicit user confirmation before bulk deletes or other data-destroying actions.
- Repository
- garrytan/gbrain
- Stars
- 31,447
- Licence
- MIT
- Files
- 1 file
What it does
When the agent is about to run a destructive operation, such as a bulk file delete, a sweep of brain pages, a permanent purge, or a raw SQL truncation, this skill makes it pause before executing. It first checks what the target actually is (linked pages, git history, file contents), then shows a standard confirmation card listing what would be lost, how many items, whether it can be recovered, and safer alternatives. It proceeds only after the user types a clear "yes", and logs the deletion afterward.
Great for
- Developers using an AI agent on repos or databases who want a safety check before anything is deleted
- Anyone running gbrain who wants soft-deleted pages and purges to require explicit approval
- Teams that want a consistent, documented confirmation step for cleanup tasks
Skip it if
- Users who expect a hard technical block: the skill is a convention the agent must follow, and nothing mechanically prevents a delete if the skill is not loaded
- Simple, low-risk edits to a few files where the extra confirmation step adds friction without benefit
Try asking
- “Delete all the old log files in this project with rm -rf and check first”
- “Bulk forget the outdated facts about the Q2 project”
- “Purge the deleted pages from the brain”
- “Remove the source named notes-archive from gbrain”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
data-loss-gate.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip data-loss-gate.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip data-loss-gate.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Ask the agent to name the exact target (paths, slugs, or source ids) so the card is accurate rather than a guess.
- Answer the card's alternatives question honestly; soft-delete or archive is often the safer path and the skill will suggest it.
- Remember that only an explicit "yes" or "do it" proceeds; "ok" or "sure" will not, so the agent should ask again.
What's inside
- SKILL.md
Redistributed unmodified from garrytan/gbrain under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.