From Claude DB
Audits database storage health: VACUUM/autovacuum status, table/index bloat, transaction-ID wraparound risk, and tombstones in wide-column stores. Feeds performance scoring.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-db:db-storage-bloatThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Storage operability keeps a database fast and *alive* over time; it is a **Performance & Scale** (axis
Storage operability keeps a database fast and alive over time; it is a Performance & Scale (axis
performance) concern, feeding relational Almacenamiento w12 (shared with M22/M20/M21) and the
Tombstones category in the wide-column profile. The catastrophic case — TXID wraparound — can
force a Postgres shutdown, so it is a severity:5 cap when imminent.
age(datfrozenxid) (or per-table relfrozenxid) approaching
autovacuum_freeze_max_age / the 2-billion ceiling. Imminent wraparound is severity:5, fail
(perf) — but only with live age evidence; statically it is at most a needs_api nudge.tombstone_warn_threshold territory).Feeds performance only (relational Almacenamiento w12; Tombstones in the wide-column profile).
Almost all of M18 is runtime truth. Statically, detect autovacuum-disabling DDL/config
(autovacuum_enabled = false, aggressive fillfactor), high-delete/TTL access patterns, and
wide-column delete-heavy modeling. Dead-tuple counts, real bloat, frozen-xid age, and tombstone counts
all require a live DB → status: needs_api at Tier-0 (never a silent pass).
-- TXID wraparound headroom (Tier-1):
SELECT datname, age(datfrozenxid) AS xid_age,
current_setting('autovacuum_freeze_max_age')::int AS freeze_max
FROM pg_database ORDER BY age(datfrozenxid) DESC;
-- dead tuples + last autovacuum (Tier-2):
SELECT relname, n_dead_tup, n_live_tup, last_autovacuum
FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 20;
Method query_stat. xid_age near freeze_max (or the 2e9 ceiling) confirms wraparound as
established and capping. High n_dead_tup with stale/NULL last_autovacuum confirms bloat as
established; without sustained stats, bloat stays directional.
Emit findings per schema/finding.schema.json. Examples:
M18.db.txid_wraparound_imminent — xid_age approaching the ceiling (severity:5, fail, axis
performance, confidence established Tier-1 only / needs_api Tier-0, fixable: advisory —
aggressive VACUUM (FREEZE)).M18.events.autovacuum_disabled — autovacuum turned off on a churny table (severity:3, warn,
established from DDL, fixable: proposed).M18.events.dead_tuple_bloat — high dead-tuple ratio (severity:3, warn, established Tier-2 /
needs_api, fixable: advisory).Each finding: evidence.observed quotes the config/DDL line or the catalog/stats row verbatim;
verification.reproduce is the query above referencing $DATABASE_URL; expected_impact is banded +
confidence-tagged (no naked %).
age() evidence — never declare it imminent from files; absent a
connection, emit needs_api, which never caps.directional.VACUUM, autovacuum tuning) are proposed/advisory.On an update-heavy table, lowering FILLFACTOR (e.g. the default 100/90 → 70) leaves free space in
each page so an UPDATE can place the new row version on the same page as a HOT (Heap-Only Tuple)
update — which skips writing new index entries, curbing index write-amplification and slowing bloat
growth. HOT only fires when no indexed column changed and the page has room, so a lower FILLFACTOR plus
not over-indexing the churned columns is the lever. This is the positive counterpart to the autovacuum/bloat
findings above; emit it as fixable: proposed (a FILLFACTOR change rewrites only on subsequent updates).
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
npx claudepluginhub hainrixz/claude-db --plugin claude-db