sqlite-schema-review

sqlite-schema-review is a skill for Claude Code, Codex from Arasz/ai-raccoon. It costs 74 tokens per session (1,672 once invoked), scanned C, original, MIT.

A review procedure for SQLite database schemas and migrations. SQLite is a file-based database; this procedure requires checking database-behaviour claims with a temporary test database rather than trusting plans or documentation.

In plain words
What is it for?
Use it when reviewing SQLite table changes, migrations, indexes, insert de-duplication, or related database code.
Why use it?
It catches subtle migration, conflict-handling, uniqueness, trigger, and generated-ID mistakes before they affect stored data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when reviewing SQLite table changes, migrations, indexes, insert de-duplication, or related database code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arasz/ai-raccoon/sqlite-schema-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Arasz/ai-raccoon --skill sqlite-schema-review
Clone the repo
git clone --depth 1 https://github.com/Arasz/ai-raccoon

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sqlite-schema-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/arasz/ai-raccoon/sqlite-schema-review/github.svg)](https://agentmods.dev/skills/arasz/ai-raccoon/sqlite-schema-review)
Your own site
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/sqlite-schema-review"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/sqlite-schema-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sqlite-schema-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/sqlite-schema-review"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/sqlite-schema-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,672 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.01672
Opus 5.5 $0.00030 $0.00669
Sonnet 5.5 $0.00015 $0.00334
Haiku 4.5 $0.00007 $0.00167

Measured yesterday against content hash 7a55627f67aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

sqlite-schema-review scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

cd /tmp && rm -rf sqlscratch && mkdir sqlscratch && cd sqlscratch
.ai-badger/skills/sqlite-schema-review/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SQLite schema & migration review

Reviewing changes to SQLite DDL, on-open migrations, unique indexes, and insert-path dedup (the project storage layer and similar single-file banks). The core rule: SQLite semantics claims get verified with a scratch DB, never accepted from the plan, the PR, or the docs — the docs are ambiguous on ON CONFLICT scope and reviewed plans routinely get it wrong (one plan asserted bare DO NOTHING "swallows FK/CHECK" — it does not).

Empirically verified semantics (scratch-DB confirmed, 2026-08)

  1. Bare ON CONFLICT DO NOTHING swallows ONLY UNIQUE/PK conflicts. NOT NULL, CHECK, and FK violations still throw IntegrityError even with DO NOTHING. "DO NOTHING silently swallows real errors" is not a valid risk — real errors surface loudly; only intended bucket-key conflicts are ignored.
  2. last_insert_rowid() is STALE after a swallowed insert: previous successful rowid on the same connection, or 0 on a fresh connection whose first statement was swallowed. Any "insert → read back by last_insert_rowid" pattern must switch to a business-key re-read once DO NOTHING is added — otherwise you return the wrong row / throw "stored no row", and in a per-chunk loop you re-embed the previous chunk's id with the wrong content.
  3. CREATE TRIGGER does NOT validate column references at creation time — a body referencing old.source_file on a table/FTS lacking that column is created successfully and fails at FIRE time. A migration DELETE firing such a trigger rolls back the whole migration. Check trigger/upgrade-shape interplay (legacy single-column FTS + new-shape trigger = runtime "no such column" on every DELETE).
  4. UNIQUE indexes treat NULLs as distinct; GROUP BY treats NULLs as equal. A dedupe-then-index migration deletes NULL-key dups but the new index admits future NULL-key duplicates. Harmless only if no insert path produces NULL keys — check schema NULLability and the corpus.
  5. Expression/partial indexes cannot be named as ON CONFLICT targets — bare DO NOTHING (no target) is required; it then applies to all UNIQUE/PK constraints.
  6. CREATE UNIQUE INDEX IF NOT EXISTS still THROWS on a violating table — IF NOT EXISTS only skips when the index already exists. Dedupe-before-create must run on open, never in raw DDL, or a violating bank bricks on every open.
  7. id NOT IN (SELECT MIN(id) … GROUP BY …) dedupe is safe iff the subquery cannot return NULL — MIN(id) over a NOT NULL PK never does, so NULL-poisoning of NOT IN doesn't apply. The DELETE's WHERE must match the index's partial WHERE and the GROUP BY must match the index key exactly (COALESCE included).
  8. scope IS @scope matches NULL correctly (IS, not =) — the idiom for bucket-key lookups that must work with NULL scope/context_label/workspace values.
  9. Content identity claims: hash = SHA-256(path ‖ value) means same path+hash ⟺ same content, so a MIN(id) survivor rule is content-preserving only if every insert site uses the same hash over the same inputs — verify chunk/import paths separately (chunks share a path, differ by hash).

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 110 lines · 74 tokens per session scan C 7a55627f67aa

Subscribe to this mod's changes

sqlite-schema-review is a skill published in the GitHub repository Arasz/ai-raccoon (7 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 1,672 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-05.

Related

sqlite-schema-review compared with skills from other repositories

sqlite-schema-review next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sqlite-schema-reviewArasz/ai-raccoonSkill7todayMITC74Claude Code, Codex
graph-db-writessamugit83/redamonSkill3.6k2d agoMITA174Claude Code, Codex
tradecraft-librarysamugit83/redamonSkill3.6k2d agoMITA176Claude Code, Codex
stripe-projectsstripe/aiSkill2.1kyesterdayMITA217Claude Code
release-db-config-syncPrismer-AI/PrismerCloudSkill1.4k1mo agoMITA91Claude Code
browser-7008e942FuRongJun-1999/dsh-memorySkill778todayMITA82Claude Code
cartographer-kb-createBeppeTemp/cartographerSkill74yesterdayApache-2.0A53Claude Code, Codex