fix

fix is a skill for Claude Code, Codex from Hainrixz/claude-db. It costs 93 tokens per session (1,062 once invoked), scanned A, original, MIT.

A user-controlled tool for applying selected database schema and migration fixes. A migration is a recorded change to a database structure, and the tool previews changes before writing them.

In plain words
What is it for?
Use it to add indexes and constraints, repair missing foreign-key support, correct certain types, and add default or generated columns through reversible migrations.
Why use it?
It helps correct safe database problems without making hidden or immediate changes. More involved changes are presented for separate approval because they may alter data or application behavior.

Skill for Claude CodeCodex

Part of the claude-db plugin — 36 skills, 6 agents, 1 hook shipped together

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.

agentmods
npx agentmods add skills/hainrixz/claude-db/fix
Any agent
npx skills add Hainrixz/claude-db --skill fix
Clone the repo
git clone --depth 1 https://github.com/Hainrixz/claude-db

Made for: Claude Code, Codex.

Or install claude-db, the plugin that ships this one along with the rest of its 36 skills, 6 agents, 1 hook.

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 fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/hainrixz/claude-db/fix.svg)](https://agentmods.dev/skills/hainrixz/claude-db/fix)
Your own site
<a href="https://agentmods.dev/skills/hainrixz/claude-db/fix"><img src="https://agentmods.dev/badge/skills/hainrixz/claude-db/fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,062 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00093 $0.01062
Opus 5 $0.00046 $0.00531
Sonnet 5 $0.00019 $0.00212
Haiku 4.5 $0.00009 $0.00106

Measured 5d ago against content hash f2b0ca518ac6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

fix 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 5d ago.

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.

skills/fix/SKILL.md · 33 lines

How it starts

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

fix (opt-in writer)

disable-model-invocation: true means the model can never trigger this on its own — only the user running /claude-db:fix. Writes happen only through the db-migration-writer subagent (the one agent with Write/Edit) and only after explicit confirmation. Default is dry-run.

Fixability classes (from each finding's fixable field — see schema/finding.schema.json)

  • AUTO — deterministic, additive, reversible, machine-verifiable, low-semantic-risk. May be written (with diff + confirmation), expressed as an expand-contract migration where the change is online-safe: add a missing non-unique index / FK-supporting index; add a NOT NULL/CHECK/UNIQUE constraint via NOT VALID then VALIDATE; add a missing FK as NOT VALID then validate; add a default or generated column additively; widen an undersized integer key. Each ships with a clean down-migration.
  • PROPOSED — changes data, semantics, or shape; generate a draft migration and require per-item accept: type changes that coerce/rewrite data (e.g. floatnumeric money), backfills, denormalization/normalization moves, renames, enum mutations, soft-delete/temporal columns.
  • ADVISORY — never written by the tool: engine choice (M0), sharding/partitioning topology, RLS/security policy design, capacity/scaling decisions, anything requiring real production data or a judgment call about intent.

Workflow

  1. Take the findings (from the last audit or a fresh one / a findings JSON). Filter to fixable: auto (+ proposed if the user opts in). Honor --category to scope.
  2. For each, build the exact migration (expand-contract steps where rewrite/lock risk exists), with a plain-language line before each diff explaining what it does and why — then the unified diff / migration file content. Resolve any required real inputs (backfill values, enum target set, FK target) by asking the user — never invent them.
  3. Dry-run (default): print every plain-language line + diff grouped by file/step. Write nothing. Summarize what fix (without --dry-run) would change, including lock level and reversibility per step.
  4. On explicit confirmation (and only then): delegate to db-migration-writer to apply. Per-change or batch confirmation is the user's choice.

Read the full file on GitHub · 33 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. 5d ago First seen · 33 lines · 93 tokens per session scan A f2b0ca518ac6

Subscribe to this mod's changes

fix is a skill published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 93 tokens to every session and 1,062 once invoked, about $0.0005 per session on Opus 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-08-30.

Related

Other skills, from other repositories

dynamodb

Use when modeling or operating a DynamoDB table: deriving partition/sort keys from access patterns, single-table vs table-per-entity, adding a GSI/LSI, on-demand vs provisioned capacity, or diagnosing hot-partition throttling. NOT relational schema/SQL/EXPLAIN (that is postgresdb), NOT aggregation-pipeline document…

ericrisco/rsc-harness · 82 tokens

malloy-lookml-review

Analyze LookML files as prior art for Malloy modeling. Used during Step 1 (DISCOVER) when .lkml files are present. Coordinates reference files that extract business logic, relationships, and curation decisions. Works with or without a database connection.

malloydata/publisher · 58 tokens

convex-migrations

Schema migration strategies for evolving applications including adding new fields, backfilling data, removing deprecated fields, index migrations, and zero-downtime migration patterns.

waynesutton/convexskills · 35 tokens

database-design-patterns

Database schema design patterns and optimization strategies for relational and NoSQL databases. Use when designing database schemas, optimizing query performance, or implementing data persistence layers at scale.

NickCrew/Claude-Cortex · 37 tokens

terrabase-db-changes

Use when making Postgres schema or migration changes (CREATE/ALTER/DROP TABLE, indexes, columns, constraints, backfills) IN A PROJECT THAT DECLARES A TERRABASE TARGET (a TERRABASEDATABASEURL in its .env). Routes the change through terrabase's MCP tools for a deterministic safety analysis plus a local-Qwen plan, and…

Terrabase-in/terrabase · 98 tokens

erd-studio

Schema rules for ERD Studio data model files — the .erd-studio/ directory uses a two-file system (YAML model definitions + JSON domain diagrams) with strict format rules you must read before editing. Use this skill whenever the task touches files in .erd-studio/ (domain JSON, logical-models YAML, or .sync-plan.json)…

liam-machine/erd-studio · 162 tokens