Setup
28.9kConfigura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
- Costo de contexto al activarse
- 7.4k tok
- Tamaño del paquete
- 1 archivo
- Última actualización
- hace 4 días
Puerta de confirmación antes de cualquier borrado masivo o limpieza destructiva, a nivel shell o de brain, que presenta una tarjeta de recuperabilidad y exige un 'yes' explícito.
en todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
100 tok en reposo
11 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill data-loss-gate --agent claude-codeSe instala solo en este repositorio.
Di cualquiera de estas frases y el agente debería cargar este skill.
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/.
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.
Before ANY of these operations:
Shell / filesystem level:
rm -rf on any directory with datarm / unlink on more than 10 filessed -i that modifies more than 10 filesgit rm on tracked filesBrain / database level (gbrain-specific):
gbrain forget <fact-id> over many
facts. One forget is a considered, idempotent act; a forget sweep is data loss.gbrain delete <slug> in a loop, or any script that
sweeps delete_page across a set of slugs. Deletes are soft (recoverable via
gbrain 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 purge-deleted — permanently removes soft-deleted pages. This is
the point of no return for the soft-delete safety net.gbrain sources remove <id> deletes the source AND
every page in it. The --confirm-destructive flag does not substitute for
the card.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.DROP TABLE, TRUNCATE, or DELETE without a
narrow WHERE against the brain database, via any path (psql, a migration
script, an engine executeRaw call).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:
⚠️ DATA DELETION — Confirmation Required
What: [exactly what will be deleted/modified]
Count: [number of files/rows/pages/facts affected]
Size: [how much data will be removed]
Location: [exact paths, slugs, or source/mount ids]
Why: [the reason for the deletion]
Recoverable?
- [ ] Backed up to a remote (git remote, database backup, object storage)
- [ ] In git history (can git checkout)
- [ ] Soft-deleted in the brain (restorable via `gbrain restore` until purged)
- [ ] Re-fetchable from an upstream source (which one, how long)
- [ ] NOT recoverable — permanent data loss
What we'd lose:
- [specific data/capability that would be gone]
- [any downstream systems that depend on this data]
Alternative to deletion:
- [compress instead of delete?]
- [move to cold storage?]
- [archive to a remote backup?]
- [soft-delete and defer the purge?]
Proceed? (yes/no)
For the mechanics of presenting the gate and stopping the turn, use the ask-user choice-gate pattern — this skill supplies the card content and the explicit-yes strictness; ask-user supplies the stop-and-wait discipline.
After confirmation:
daily/notes/YYYY-MM-DD.md under ## Data DeletionsThere are no categories of data that are disposable by default. Old logs, git stash entries, build artifacts, caches — each of these has, at some point, been the source of truth for something. Disposability is a property of the SPECIFIC target, verified by inspecting it (backlinks, git status, what depends on it, whether it's re-fetchable and at what cost) — never a property of its category. If the inspection genuinely shows the target is ephemeral and regenerable, the card is quick to fill out and the user's "yes" is quick to get. That's the cost of the gate working.
A downstream agent once deleted a multi-gigabyte cache of raw source files from its brain's data directory to free disk space. The files looked like "just cache" — but they were the source data for a planned feature. The data happened to be re-fetchable from its upstream source, but the deletion was still wrong because:
The rule: if it's data and it's bulk, ASK FIRST. Always.
This skill guarantees:
daily/notes/YYYY-MM-DD.md under
## Data Deletions with timestamp, scope, and recovery path.writes_to:.The full behavior contract is documented in the body sections above; this section exists for the conformance test.
Two artifacts:
daily/notes/YYYY-MM-DD.md:## Data Deletions
- **[HH:MM]** [what was deleted] — [count], [size]. Reason: [why].
Recovery: [backup/git/restore path, or "none — permanent"].
Reproducido de garrytan/gbrain bajo licencia MIT. Leer esta página en markdown.
2 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.
Depende del patrón ask-user para la mecánica de detener el turno y esperar respuesta.
Este repo incluye 75 skills. Si instalas uno, normalmente ya tienes los demás.
Configura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
Chequeos de salud del brain: aplicación de back-links, auditoría de citas, validación de filing, detección de info obsoleta, páginas huérfanas y benchmarks.
Migra un brain de gbrain-base a la taxonomía de 14 tipos canónicos de gbrain-base-v2 usando gbrain onboard --check y el handler Minion unify-types.
Cuándo y qué recuperar: abre la página del brain de una entidad relevante antes de responder desde memoria.
Operaciones del brain: búsqueda primero, ciclo leer-enriquecer-escribir, atribución de fuentes, enriquecimiento ambiental y back-linking. Leer antes de cualquier interacción con el brain.
Importa exports de ChatGPT, Claude y Perplexity y transcripciones de sesiones como páginas fechadas en conversations/, valida y extrae hechos, y mantiene el archivo sin huecos con detección y backfill.
Patrón reutilizable para presentar al usuario opciones explícitas y detener la ejecución hasta que responda; funciona en Telegram, Discord, CLI o cualquier agente con herramienta de mensajes.
Ingesta de feeds y publicaciones completas: convierte un blog, newsletter o archivo RSS/Atom entero en páginas fuente del brain, con dedup, pacing y reparación de páginas vacías.
Gestión de horarios con escalonamiento, horas silenciosas y override de despertar; valida horarios, evita colisiones y bloquea envíos durante las horas silenciosas.