offshoot
/offshoot
Prowadzi bezpieczną pętlę pracy przy zmianach bazy SQLite w projekcie z magazynem offshoot: migracje schematu, masowe usunięcia, eksperymenty na danych i kilka prób naprawy.
- Autor
- sricola ↗
- Repozytorium
- offshoot ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 17.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 17.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Prowadzi bezpieczną pętlę pracy przy zmianach bazy SQLite w projekcie z magazynem offshoot: migracje schematu, masowe usunięcia, eksperymenty na danych i kilka prób naprawy.
Oryginalny opis (EN)
Use when working on a project that has an offshoot store (a .offshoot directory or OFFSHOOT_STORE) and you are about to change a SQLite database — schema migrations, bulk deletes, data experiments, or running several attempts at a fix. Teaches the fork-before-risky-work loop with the offshoot_* MCP tools.
Jak działa
- The loop
- Rules
- Rules-file snippet for the project's AGENTS.md or CLAUDE.md
Podgląd SKILL.md
---
name: offshoot
description: Use when working on a project that has an offshoot store (a .offshoot directory or OFFSHOOT_STORE) and you are about to change a SQLite database — schema migrations, bulk deletes, data experiments, or running several attempts at a fix. Teaches the fork-before-risky-work loop with the offshoot_* MCP tools.
---
# offshoot: branch the database before you change it
offshoot gives every attempt its own real SQLite database — a copy-on-write
fork, not a mock and not a re-seed. Every checkout is a stock `.db` file any
SQLite client opens. You have ten tools; the loop is four calls.
## The loop
1. **Orient:** `offshoot_list` — see databases, branches, checkpoints, and
which branches are protected (`main` is, by default). A human can
protect any other branch too (`offshoot protect <db>[@branch]` /
`offshoot unprotect`, CLI-only — there's no MCP tool for it, so you can
see the flag here but never change it).
2. **Fork before risk:** `offshoot_fork {database, new_branch, branch?, at?, ttl?, meta?}`
— instant, two small metadata objects, no data copy. Forks expire after
the server's default TTL (24h) unless you pass `ttl`. Then
`offshoot_checkout {database, branch: new_branch}` and point your SQL at
the returned path.
3. **Checkpoint when tests pass:** `offshoot_checkpoint {database, branch, name, meta?}`.
Name checkpoints for what they mean (`before-migration`, `migrated`).
4. **Roll back when they fail:** `offshoot_rollback {database, branch, to}`
returns the branch to a checkpoint, discarding everything since. The
branch's previous head is kept first as `<branch>-pre-rollback` — the
result's `backup` field names it — so a rollback is undone by promoting
that fork back onto the branch (`offshoot_promote {source:
"<branch>-pre-rollback", target: branch}`). Same TTL'd, one-rolling-slot
shape as promote's own safety fork below.
5. **Compare before you promote:** `offshoot_diff {database, left:
"attempt-2@done", right: "main"}` (or against a golden checkpoint) — read
the per-table added/removed/changed counts; use `table` + `full` to see
the exact rows.
6. **Promote the winner:** `offshoot_promote {database, source, target}`
repoints `target` (often `main`) at `source`'s head. Protected targets
(`main` by default) refuse; that refusal is the confirmation step, not a
bug. Do not retry with `force: true` — this server refuses force too
unless the operator started it with `offshoot mcp -allow-force`. Instead
run `offshoot_diff` to show what would change, then ask the human to
promote from the CLI (`offshoot promote <db>@<source> --onto <target>
--force`). The target's previous head is kept as `<target>-pre-promote` — the result
names it — so a promote is undone by promoting that fork back. That
safety fork always carries a TTL (24h by default) and is one rolling
slot per target, replaced by the next promote onto that target, so the
undo window closes when either happens.
7. **Clean up:** `offshoot_destroy` a failed attempt, or let its TTL expire.
`offshoot_touch {database, branch, ttl?}` keeps a fork alive if a task
runs long. A protected branch (or one under a live lease) refuses, and
`force` is refused too unless the operator started
`offshoot mcp -allow-force` — do not retry with force; ask the human, who
can destroy from the CLI. A refusal that says another checkpoint is in
progress (a lease holder starting `checkpoint:`) is the exception: that
lease ends on its own within seconds, so wait and retry the same call
rather than asking the human.
On a long-running branch where you name a checkpoint every step,
`offshoot_prune_checkpoints {database, branch, keep: 20}` (or `names`)
drops checkpoints you will not roll back to; it never touches the
branch's data, and each new checkpoint stays fast.
## Rules
- Never run a migration, `DROP`, `DELETE`, or `UPDATE` without a checkpoint
or a fork to return to. `/rewind` restores Claude's file edits only; it does
not undo what a Bash `sqlite3` command did to a database.
- Prefer forking to backing up by hand. Prefer a longer `ttl` to `ttl: "none"`.
- Read results: `structuredContent` carries `txid`, `path`, `ttl`, `backup`
for you to reuse; the text is the same information for the human.
- If a tool says a daemon session is open on a branch, close it first
(`offshoot session close`) rather than forcing. If it says the session
is closing ("closing; retry"), do not close it: wait a few seconds and
call the same tool again.
- Work in the fork's checkout path, not `main`'s, while experimenting.
## Rules-file snippet for the project's AGENTS.md or CLAUDE.md
```
Database changes: this project uses offshoot. Before any schema migration,
bulk delete, or data experiment, fork the database (offshoot_fork) and work
in the fork's checkout; checkpoint when tests pass; roll back when they
fail; promote the fork that worked. Never run destructive SQL on main's
checkout directly.
```
Docs: https://sricola.github.io/offshoot/docs/agents/ · machine-readable index:
https://sricola.github.io/offshoot/llms.txt
Wersje
W bazie nie ma innych skilli o nazwie offshoot.
Migawka bazy z 13.11.2026 · wersja paczki b172baf08505 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100mcp-server-sqlite
Instaluje lokalny serwer MCP SQLite do sprawdzania plików bazy i wykonywania zapytań oraz obsługuje jego narzędzia. - 95expo-sqlite
Obsługuje lokalne dane w aplikacjach Expo i React Native przez expo-sqlite: konfiguracja SQLite, zapytania SQL, migracje schematu, transakcje, SQLiteProvider i kv-store. - 100database-inspector
Eksploruje bazy SQLite i PostgreSQL przez bezpieczne zapytania tylko do odczytu: lista tabel, szczegóły schematu, podgląd danych i diagramy ER w Mermaid. - 85SQLite
Prowadzi przez SQLite ze sterownikiem better-sqlite3 dla Node.js: konfigurację bazy, zapytania, transakcje, migracje, optymalizację wydajności i integrację z TypeScript. - 100database-schema
Wdraża i sprawdza zmiany schematu bazy SQLite w projekcie Cursor BYOK: tabele, kolumny, indeksy, klucze obce i migracje SQLx. - 100sql-toolkit
Wspiera pracę z bazami SQLite, PostgreSQL i MySQL: projekt schematu, zapytania, migracje, indeksy, kopie zapasowe i debugowanie wolnych zapytań, bez ORM.