Skip to content
Development
Skill

/durable

Use to keep stored data from being lost: before running or writing anything that could delete, overwrite or reshape it, and when asked whether data is backed up and recoverable. Do NOT use for read-only queries or query speed.

From plugin
gg-framework
30914 skills

Claude Code

$ npx -y skills add KenKaiii/gg-framework --skill durable --agent claude-code

SKILL.md

durable.SKILL.md
name: durable
description: "Use to keep stored data from being lost: before running or writing anything that could delete, overwrite or reshape it, and when asked whether data is backed up and recoverable. Do NOT use for read-only queries or query speed."
license: Data-durability engineering guidance, not a DBA certification. Sources and snapshot date are recorded at the foot of each reference file.
compatibility: Snapshot dated 3 October 2026; Prisma 7/8 status and agent safeguards, PostgreSQL 19 status and the Neon, RDS and D1 retention rows re-verified 22 October 2026. Re-verify version behaviours and provider defaults before asserting them as current.

Durable

**Route first:**

| You are… | Mode | Do next | |---|---|---| | About to run *any* command against a database yourself (migrate, reset, push, seed, SQL shell, delete script) | **Agent gate** | Run the agent gate below before the command. Always. | | Writing code that touches stored data (table, migration, import, delete endpoint, webhook write, backup cron) | **Inline gate** | Apply binding defaults; one line on the guard you built; keep building. | | Asked "is my data safe / back up my app", a migration is about to hit production, or after a data scare | **Full pass** | Run the full-pass workflow. |

Never say data is "safe": say what loss is survivable and what is not.

Agent gate — binding rules for you, the agent

Coding agents have wiped production data during a natural-language code freeze (Replit, July 2025; `references/agent-db-safety.md`). These rules are the mechanism.

1. **Identify the target before every command.** Resolve which database the command will hit. Classify it `throwaway` / `shared-dev` / `may-hold-real-data` using the detection list in `references/agent-db-safety.md`. Unknown = `may-hold-real-data`. 2. **On `may-hold-real-data`, read-only by default.** Inspect with `SELECT`/`EXPLAIN`/`\d`, a read-only role, or `BEGIN READ ONLY`. No DDL, no writes, no `migrate dev|reset`, `db push`, `--force`, `--accept-data-loss`, `flush`, `dropDatabase`, `TRUNCATE`, seed scripts. 3. **Destructive or schema-changing commands on real data require all of:** (a) a backup or PITR point you verified exists *for this database* (`RUNTIME` or provider-console evidence, not assumption), (b) a dry-run count of affected rows shown to the user, (c) the exact command shown, and (d) the user's explicit go-ahead in this conversation for that command. "Go ahead and fix it" does not cover a `DROP`. 4. **Experiment on a branch, not the original.** Use a provider branch, restored clone or local copy; prove the change there, then hand back the production step with evidence. 5. **Never bypass a tool's safety interlock yourself.** If a CLI refuses because it detected an agent (e.g. Prisma 7's AI-consent check), a platform holds your request for the user's approval (e.g. Prisma Console agent approvals), or a prompt asks for confirmation: stop and ask. Never set a consent variable, approve your own request, or pass `--force`/`--yes` on your own initiative. 6. **Surprising results mean stop, not fix.** Empty tables, missing rows, failed restores: report what you observed and ask. Never "repair" by recreating, reseeding, or fabricating data, and never declare data unrecoverable without checking the provider's backups/PITR. 7. **Report exactly what you ran** — every command that touched a database, its target, and its result, including mistakes, immediately.

Also flag (do not silently fix) setups where the agent's shell holds production write credentials: recommend separate dev/prod credentials, a read-only role for inspection, and production URLs absent from local `.env`.

Governing rules

1. **The store is the last line of defence.** `NOT NULL`, `UNIQUE`, foreign keys with a chosen `ON DELETE`, `CHECK` — in the database, where scripts and bugs cannot walk past them. 2. **Destructive operations are guilty until guarded**: `WHERE` + batch limit, dry-run count first, backup when anything of value exists, undo path (soft delete, staging copy) for user-facing data. 3. **Migrations run on data you cannot recreate.** Checked in, reviewed as SQL (ORM output included — a rename can become `DROP` + `ADD`), never edited once applied, forward-only in production. Push/sync commands are for throwaway databases. 4. **One logical change, one transaction; anything retried is idempotent.** 5. **Backups you have not restored are fiction.** Automated, off-instance, stated RPO/RTO, timed restore drill. 6. **Fail loudly, not corruptly.** Bulk jobs are keyset-resumable with durable checkpoints. 7. **Respect the store's concurrency model** — SQLite has one writer; transaction poolers break session state. 8. **Evidence labels on every claim:** `RUNTIME` (observed), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source). 9. **Proportionality.** Test rows need migrations; the first real user row raises the floor to backups, then tested restore, then PITR.

Binding defaults (inline gate)

  • **Migration tooling from the first table.** Generate without applying (`prisma migrate dev --create-only`, `drizzle-kit generate`), read the SQL, apply via the deploy path (`prisma migrate deploy`, `drizzle-kit migrate`). Corrections are new migrations.
  • **Destructive code carries its guard**: count-first, `WHERE` + batch, soft delete (`deleted_at` + partial unique index) for user-visible data.
  • **Constraints in the store** per rule 1; integer cents or `NUMERIC` for money; `bigint`/UUID keys (`uuidv7()` built in from Postgres 18).
  • **Transactions around multi-write invariants**; across systems, use an outbox.
  • **Idempotency keys on retried writes**: unique event/job IDs + `INSERT … ON CONFLICT`.
  • **Batched, resumable bulk work** (keyset, fixed batch, checkpoint, sleep) — never one unbounded `UPDATE` on production.
  • **Backups the moment real data exists**: confirm the plan actually includes them (free tiers often do not), add an off-
Read more
@kenkaiii
Ships withgg-framework

The coding agent that gets more out of your AI subscription. Fastest and leanest of 20 agents tested, with unlimited local search of real open-source code.

Stars on GitHub

Momentum

stars in total
309
Star history of KenKaiii/gg-framework on GitHub, a chart by star-history.com

Other skills on gg-framework.

app-walkthrough

app-walkthrough

Job skill for showing how an app or product is used, step by step, on rebuilt real screens. Adds walkthrough questions, the…

before-after

before-after

Job skill for a before-and-after video, showing life without the product, then with it. Adds before/after questions, idea…

brand-kit

brand-kit

Resolve and reuse the user's brand identity for a Motion video. Use when fonts, colours, logos or brand copy need mapping or a…

dev-tool-video

dev-tool-video

Job skill for a video about a developer tool: a CLI, API, library, SDK or editor plugin. Adds questions, terminal and code moves,…

launch-video

launch-video

Job skill for a product, feature or brand launch video. Adds launch questions, idea patterns, moves and pitfalls to the motion…

match-reference

match-reference

Job skill for a video like one the user supplies. Measures the reference's rhythm and style rules with reference-study.mjs, then…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about durable.

Which coding agents can use durable?
durable installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.