Guide · Agent skill
How to use the Data Loss Gate agent skill (data-loss-gate)
Updated · written with AI from the project's own documentation and checked against our catalogue data
Data Loss Gate is an agent skill: a set of written instructions that an AI agent loads when it is about to run a destructive action. Instead of deleting straight away, the agent inspects the target, shows a confirmation card and waits for you to type yes. This guide covers what the skill does, how to install it, how to trigger it, and what it needs and does not guarantee.
Quick start
- 1Download the ZIP. Get the data-loss-gate ZIP from our page. It contains SKILL.md.
- 2Install the skill. Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. Alternatively, upload the ZIP under Settings, Capabilities, Skills in the Claude apps.
- 3Make the request clearly. Name the exact files, slugs or source ids you want removed, using a trigger phrase such as bulk delete or purge the.
- 4Review the confirmation card. Check the count, size, location, recoverability and what would be lost before you respond.
- 5Reply yes or no. Type yes or do it to proceed. Anything else, including ok or sure, means the agent should ask again or stop.
- 6Check the deletion log. After a confirmed deletion, the agent logs it under ## Data Deletions in daily/notes/ for that date.
What does the Data Loss Gate skill make the agent do?
The skill makes the agent stop before any destructive operation runs. It covers shell-level actions such as rm -rf on a directory with data, deleting or editing more than 10 files in bulk, git rm on tracked files, and cleanup tasks that touch data files. For gbrain users it also covers bulk forget loops, page-delete sweeps, purges, source removal and raw-SQL truncation.
Before asking you anything, the agent checks what the target actually is, using backlinks, graph edges, git history or file contents. It then shows a confirmation card listing what would be lost, the count, the size, the location, whether the data can be recovered, what depends on it and safer alternatives. It proceeds only after you reply with an explicit yes.
- Bulk deletes: rm -rf on data directories, rm or unlink on more than 10 files
- Bulk edits: sed -i across more than 10 files, or overwriting files with smaller versions
- Git: git rm on tracked files
- Brain pages and facts: bulk forget, page-delete sweeps, gbrain delete --purge, gbrain pages purge-deleted
- Sources, mounts and tables: gbrain sources remove, gbrain mounts remove when its database is also deleted, DROP TABLE, TRUNCATE or unscoped DELETE
How do you install the Data Loss Gate skill?
Download the ZIP for the skill from our page. Unzip it into your personal skills folder at ~/.claude/skills/, or into a project's .claude/skills/ folder if you want the skill only for that project. The skill folder includes SKILL.md, which holds the instructions the agent reads.
If you use the Claude apps rather than a local setup, upload the ZIP instead. In the app, go to Settings, then Capabilities, then Skills, and add the skill there.
- Personal use: unzip into ~/.claude/skills/
- Single project: unzip into the project's .claude/skills/
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
How do you trigger the skill with natural requests?
You do not need a special command. The skill is tied to requests that mention a destructive action. The phrases below are the triggers listed in the skill, and they work as ordinary sentences. When your request matches one, the agent should stop and run the gate before executing anything.
Be clear about what you want removed. A request such as 'clean up the old files' is less likely to match than 'bulk delete the files in the build folder', and the agent will still need to inspect the target before it deletes anything.
- 'bulk delete the old exports'
- 'wipe the staging cache'
- 'rm -rf the tmp directory'
- 'purge the deleted pages'
- 'truncate the events table'
- 'free up space by removing the raw files'
- 'bulk forget these facts'
- 'remove the source notes'
- 'drop the table'
How do you answer the confirmation card?
The card ends with Proceed? (yes/no). Read the 'Recoverable?' and 'What we'd lose' sections before you answer. If anything looks wrong, reply with a question or the word wait. The agent should answer your question and show the card again.
Only a clear yes or 'do it' lets the agent proceed. Words like 'ok', 'sure' or 'go ahead' do not count. A no makes the agent stop and suggest alternatives, such as compressing the data, moving it to cold storage, archiving it to a remote backup or soft-deleting and deferring the purge.
- yes or do it: the agent runs the operation and logs it
- ok, sure or go ahead: not enough, the agent should ask again
- wait or a question: the agent answers and re-presents the card
- no: the agent stops and offers alternatives
What does the skill need, and how safe is it?
For brain-level operations you need the gbrain CLI and a gbrain brain database. For shell-level checks against history you need git. The skill does not run scripts and does not use the network.
The skill is a convention, not a hard block. The agent is expected to follow it, but nothing in the gbrain runtime stops a delete if the skill never loads. Some CLI commands have their own flags, such as --confirm-destructive for gbrain sources remove, but those only confirm that the agent is sure. The card is there to confirm that you are sure.
Brain deletes are soft by default and can be restored with gbrain restore until they are purged. Purging is permanent. Before running gbrain pages purge-deleted, the skill tells the agent to show you the dry run first. The skill also writes a log of each deletion after confirmation, under ## Data Deletions in daily/notes/ with a date in the filename.
- Requires: gbrain CLI and a gbrain brain database for brain-level operations; git for history checks
- Runs scripts: no
- Uses network: no
- Writes to: daily/ (deletion log under ## Data Deletions)
gbrain pages purge-deleted --dry-run --jsonWhat tips help you use the skill well?
Give the agent the exact target. The more specific the path, slug or source id, the better the card will be. If the inspection is thin, the card is only as good as the inspection behind it.
Do not expect the gate to apply to every change. It is aimed at destructive operations, and the skill itself notes that simple, low-risk edits to a few files gain little from an extra confirmation step.
- Name exact paths, slugs or source ids in your request
- Ask for a dry run first when a tool offers one
- For purges, give a yes for each batch you intend, and expect the agent to stop at the first refusal
- Keep the skill loaded in any project where cleanup is likely
What people use it for
- Clearing a large set of generated files from a repository only after the agent has checked git history and listed what is lost
- Purging soft-deleted pages from a gbrain brain, one page at a time, after a dry run and an explicit yes
- Removing a source from a gbrain brain with a card that lists every page the source contains
- Reviewing a raw SQL truncation of a brain table before it runs
Frequently asked questions
How do I install the data-loss-gate skill?
Download the ZIP from our page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings, Capabilities, Skills.
Is the Data Loss Gate skill free?
The skill is listed under the MIT licence, which is shown on our page for this item. Check the licence file in the upstream repository for the full terms.
What does the data-loss-gate skill require?
Brain-level operations need the gbrain CLI and a gbrain brain database. Shell-level checks against history need git. The skill does not run scripts and does not use the network.
Will the skill stop an agent from deleting files?
Not mechanically. The skill is a convention that the agent must follow. If the skill is not loaded, nothing in the gbrain runtime stops a delete, so make sure it is installed in the right folder.
Why doesn't my agent ask before deleting?
Check that the skill is installed in ~/.claude/skills/ or the project's .claude/skills/ folder, and that your request uses a trigger phrase such as bulk delete, rm -rf, purge the or truncate. Vague requests may not match.
How is this different from a normal confirmation prompt?
The skill requires a fixed confirmation card that covers recoverability, what would be lost and alternatives, and it only accepts a clear yes. The skill points to the ask-user choice-gate pattern for how to stop and wait. Our source does not compare it with other tools.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you run an AI agent on repositories or a gbrain database and want a consistent, written confirmation step before anything is deleted or purged. Skip it for simple, low-risk edits to a few files, and do not rely on it as a hard technical block, because it only works when the agent loads and follows it.
Download the skill