data-loss-gate

Requires explicit user confirmation before bulk delete or destructive operations.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/AMC-JTC/gbrain-1 --skill data-loss-gate-amc-jtc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-loss-gate
Source: https://github.com/AMC-JTC/gbrain-1/tree/main/plugin/skills/data-loss-gate
Command: npx skills add https://github.com/AMC-JTC/gbrain-1 --skill data-loss-gate-amc-jtc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Destructive operations like rm -rf, bulk page deletes, table truncation, or source removal can permanently destroy data before anyone realizes what was lost. This Skill inserts a mandatory confirmation gate that stops the agent, presents a recoverability card, and waits for an explicit "yes" before any destructive command runs. ## Core Features & Use Cases - Confirmation Card: Presents exactly what will be deleted, the count, size, location, recoverability checklist, what would be lost, and alternatives to deletion before executing. - Broad Destructive-Op Coverage: Fires before shell-level operations (rm -rf, git rm, bulk sed) and brain-level operations (bulk forget, page-delete sweeps, purge-deleted, source removal, raw-SQL truncation). - Deletion Audit Log: After confirmation, logs every deletion with timestamp, scope, size, and recovery path to daily/notes/YYYY-MM-DD.md under a Data Deletions section. - Use Case: An agent proposes truncating the content_chunks table to re-embed from scratch. The gate fires, inspects the target, shows that 155,000 pages depend on those chunks, lists soft-delete as an alternative, and only proceeds after the user types "yes". ## Quick Start Ask the agent to bulk delete the old imports directory and it will stop to present a confirmation card before deleting anything.

Frequently Asked Questions about data-loss-gate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent an AI agent from deleting files without asking?

Use a confirmation gate that fires before any destructive operation. The agent stops, presents a card listing what will be deleted, its recoverability, and alternatives, then waits for an explicit yes before executing anything.

What operations trigger the data-loss-gate confirmation?

It fires before rm -rf, bulk rm or sed on more than 10 files, git rm, bulk forget, page-delete sweeps, purge-deleted, source removal, and raw-SQL DROP, TRUNCATE, or unscoped DELETE against the brain database.

Does the gate accept ok or sure as confirmation?

No. The gate requires an explicit yes or do it. Responses like ok, sure, or go ahead do not authorize the deletion, and questions from the user cause the card to be re-presented after answering.

Is a soft delete safe to run without confirmation?

No. Even soft deletes are gated because a wrong bulk sweep is expensive to reverse, and purge-deleted makes them permanent. The card notes restorability via gbrain restore but still requires explicit user consent.

Does the --confirm-destructive CLI flag replace user confirmation?

No. The flag only confirms the agent's intent, not the user's consent. The gate exists specifically to verify the human approves, so the card is still presented even when a command carries its own flag.

What happens after a confirmed deletion?

The deletion is logged to daily/notes/YYYY-MM-DD.md under a Data Deletions heading with timestamp, what was deleted, count, size, reason, and recovery path. Large deletions run in chunks with progress updates.