sqlite-bank-space-diagnosis

sqlite-bank-space-diagnosis is a skill for Claude Code, Codex from Arasz/ai-raccoon. It costs 83 tokens per session (1,440 once invoked), scanned A, original, MIT.

A read-only diagnostic workflow for oversized SQLite database files and their write-ahead log, or WAL, which temporarily stores database changes before they are merged into the main file. It measures unused space, checkpoint state, and possible space recovery using SQLite tools.

In plain words
What is it for?
Use it to snapshot a SQLite database, inspect table space usage, check WAL checkpoint debt, estimate what vacuuming could reclaim, and understand vector-table page counts.
Why use it?
SQLite files can grow because deleted pages, pooled connections, or untrimmed WAL data still occupy disk space. This separates those causes before any operation changes the live database.

Skill for Claude CodeCodex

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

Good fit Use it to snapshot a SQLite database, inspect table space usage, check WAL checkpoint debt, estimate what vacuuming could reclaim, and understand vector-table page counts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis
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-bank-space-diagnosis
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-bank-space-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis/github.svg)](https://agentmods.dev/skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis)
Your own site
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis/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-bank-space-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/sqlite-bank-space-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,440 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00083 $0.01440
Opus 5.5 $0.00033 $0.00576
Sonnet 5.5 $0.00017 $0.00288
Haiku 4.5 $0.00008 $0.00144

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

Security

Grade A, and why

sqlite-bank-space-diagnosis scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ai-badger/skills/sqlite-bank-space-diagnosis/SKILL.md · 73 lines

How it starts

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

SQLite bank space & WAL diagnosis (physical layer)

Measured methods from a 2026-08 memory-bank audit. Complements the SQLite schema review skill (schema semantics); this covers the physical layer — file size, WAL mechanics and VACUUM semantics.

Diagnosis workflow (read-only first)

  1. Snapshot before touching anything: sqlite3 <bank> ".backup /tmp/snap.db" — the backup preserves page layout (freelist + page counts matched the live file exactly; cross-check with read-only PRAGMA page_count/freelist_count/page_size).
  2. sqlite3_analyzer (official sqlite-tools-osx-arm64-*.zip, or brew install sqlite-analyzer): space utilization per table — freelist %, payload efficiency, non-sequential pages, overflow. It is a SPACE tool ONLY: zero coverage of query performance, the WAL file, or FTS behavior (the doc page contains no "wal"/"performance" mentions — grep before claiming otherwise).
  3. WAL check: PRAGMA wal_checkpoint(TRUNCATE) on the SNAPSHOT (never the live bank mid-analysis). The result row busy|log|checkpointed is the signal: 0|0|0 = the whole WAL was already-checkpointed garbage and truncation is instant; log > 0 = real checkpoint debt (unreplayed frames).
  4. Quantify reclaim: VACUUM INTO '/tmp/vac.db' on the snapshot → logical content size; the freelist share of the main file is the reclaimable delta.
  5. Footprint math: stat the WHOLE data dir — db + -wal + -shm. A 431 MB WAL next to a 29 MB db with log=0 is 100 % reclaimable garbage, and the analyzer cannot see it.

WAL growth mechanics (why a WAL is huge)

  • Frames accumulate until a checkpoint TRUNCATEs. Passive auto-checkpoints (default 1000 pages) keep content synced (log=0) but CANNOT truncate while any other connection holds a read lock; with connection pooling + several long-lived processes (stdio bridges, serve) the "last connection closed" close-time truncation never fires → the WAL grows unbounded with already-checkpointed frames.
  • Measured: 431 MB WAL born the second the first bridge processes started, grown in ~4 h of traffic; 0|0|0 on the snapshot; TRUNCATE → 0 bytes in under a second.
  • If the app has a checkpoint only inside a feature that never ran (e.g. a cloud-sync path), that is the root cause of unbounded growth — grep the codebase for wal_checkpoint before designing a fix.

Read the full file on GitHub · 73 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 · 73 lines · 83 tokens per session scan A 31ab6f10c7a9

Subscribe to this mod's changes

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

Related

sqlite-bank-space-diagnosis compared with skills from other repositories

sqlite-bank-space-diagnosis next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sqlite-bank-space-diagnosisArasz/ai-raccoonSkill7todayMITA83Claude 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