data-loss-gate
하는 일
이 스킬은 AI 에이전트가 파일이나 지식 브레인에 대해 파괴적인 작업을 하기 전에 확인 단계를 두도록 설정합니다. 대량 삭제 전에 안전 점검을 원하는 모든 사람을 위한 스킬입니다.
사용하는 경우
- ✓에이전트가 대량 삭제나 rm -rf 같은 명령을 실행하려고 할 때.
- ✓정리 작업으로 브레인 페이지 여러 개나 데이터 소스 전체가 삭제될 때.
- ✓되돌릴 수 없는 작업이라 무엇이 사라질지 먼저 보고 싶을 때.
스킬 링크
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/data-loss-gate/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 폴더의 오래된 초안 파일을 모두 정리해 주세요. 다만 삭제 전에 무엇이 지워지는지 먼저 보여 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 대상을 점검하고, 잃게 될 것을 복구 가능성 요약으로 보여 준 뒤, 진행하기 전에 명시적인 승인을 기다립니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Data Loss Gate — Confirmation Before Destructive Operations
Convention: see conventions/brain-first.md — inspect the actual target before proposing deletion:
get_backlinks,gbrain graph <slug>,git logon the underlying files. The confirmation card below is only as good as the inspection behind it.Convention: see _brain-filing-rules.md — the post-confirmation deletion log files date-keyed under
daily/.
What This Is
A gate that fires BEFORE any destructive operation and requires explicit user confirmation. The agent stops, presents a recoverability card, and waits.
Scope honesty: this gate is a routing convention — the harness resolves it
into context when a destructive intent matches, and a well-behaved agent
follows it. It is NOT an operation-boundary enforcement: nothing in the gbrain
runtime mechanically blocks a delete if the skill never loads. (A native
confirm gate at the operation boundary is a filed TODO; until it lands, this
convention is the line of defense.) Some CLI surfaces carry their own flag
gates — e.g. gbrain sources remove requires --confirm-destructive — but
the flag confirms that the AGENT is sure. This skill exists to confirm that
the USER is.
When This Fires
Before ANY of these operations:
Shell / filesystem level:
rm -rfon any directory with datarm/unlinkon more than 10 filessed -ithat modifies more than 10 filesgit rmon tracked files- Truncating or stripping content from files in bulk
- Overwriting files with smaller versions (content stripping)
- Any operation described as "cleanup" or "freeing space" that touches data files
Brain / database level (gbrain-specific):
- Bulk forget — scripting or looping
gbrain forget <fact-id>over many facts. One forget is a considered, idempotent act; a forget sweep is data loss. - Page-delete sweeps —
gbrain delete <slug>in a loop, or any script that sweepsdelete_pageacross a set of slugs. Deletes are soft (recoverable viagbrain restore <slug>) until purged — say so on the card, then gate anyway: a sweep that's wrong in bulk is expensive to un-wrong in bulk. gbrain delete --purge— skips the 72-hour soft delete and removes the page at once with its chunks, versions, takes, timeline, links, raw data and the facts filed on it.gbrain restorecannot undo it. Every purge needs the user's explicit go for that purge: a request to "scrub the repo", "clean up the files" or "remove it from Git" is not a go to purge database pages. After the go, purge one page at a time (never a parallelxargsor a background loop), confirm each one is gone (gbrain get <slug> --include-deletedreportspage_not_found) before the next, and stop the batch at the first refusal. A purge batch that was stopped (SIGTERM, a write freeze, a timeout) stays stopped: report what finished and ask again before relaunching it.gbrain pages purge-deleted— permanently removes soft-deleted pages from every source of the brain. This is the point of no return for the soft-delete safety net. Show the usergbrain pages purge-deleted --dry-run --jsonfirst; the command itself asks (exit 3 without a terminal) and runs with--yesonly after the user agrees.- Source removal —
gbrain sources remove <id>deletes the source AND every page in it. The--confirm-destructiveflag does not substitute for the card. - Mount removal —
gbrain mounts remove <id>only removes the local registration (the mounted brain's database survives; re-add to recover). Gate it anyway when the flow ALSO plans to delete the mount's underlying database or files — then the full card applies to those. - Raw-SQL truncation — any
DROP TABLE,TRUNCATE, orDELETEwithout a narrowWHEREagainst the brain database, via any path (psql, a migration script, an engineexecuteRawcall). - Deleting database rows in bulk; dropping tables, collections, or indexes.
What To Do
Step 1: STOP before executing
Do NOT run the destructive command. Inspect the actual target first (backlinks, graph edges, git history, file contents — whatever grounds the card), then present the user with:
Step 2: The Confirmation Card
⚠️ DATA DELETION — Confirmation Required
What: [exactly what will be deleted/modified]
Count: [number of files/rows/pages/facts affected]
Size: [how much
자주 묻는 질문
기술적으로 강제 차단인가요?
아닙니다. 스킬은 잘 작동하는 에이전트가 따르는 라우팅 규칙이며, 강제로 잠그는 장치는 아니라고 말합니다.
확인하기 전에 무엇을 점검하나요?
백링크와 git 이력 같은 실제 대상을 점검해 요약이 정확하도록 합니다.
삭제 기록은 어디에 남나요?
스킬에 따르면 확인 후 삭제 기록은 일별 폴더 아래에 날짜별로 정리됩니다.
상세 정보
작성자의 원본 설명
Confirmation gate before any bulk delete, cleanup, or destructive operation that could result in data loss — shell-level (rm -rf, git rm, bulk sed) or brain-level (bulk forget, delete sweeps, purge-deleted, source removal, raw-SQL truncation). Presents a recoverability card and requires an explicit "yes" from the user before proceeding. Routing convention, not an operation-boundary enforcement.
repo: garrytan/gbrain
인기도
- GitHub 스타
- 31k
- 순위
- #9254
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
gbrain
31k에이전트가 공유 회사 지식 브레인에서 사람, 프로젝트, 결정에 관한 사실을 검색하고, 지속적인 메모를 저장하도록 돕습니다.
brain-ingest-gate
31k새 콘텐츠를 지식 브레인에 추가하기 전에 기존 내용과 비교해 중복을 막고, 고유 명칭을 먼저 확인합니다.
brain-link-discipline
31k에이전트가 브레인 페이지를 보고할 때 같은 메시지에 각 페이지의 작동하는 링크를 포함해, 바로 열어 볼 수 있게 합니다.
brain-ops
31k지식 브레인의 기본 루틴을 제공합니다. 먼저 기존 맥락을 확인하고, 메모는 출처와 함께 저장하며, 관련 페이지를 연결합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.