db-antipatterns

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

A catalog of database design problems across SQL databases and document databases such as MongoDB. It covers patterns including generic key-value tables, oversized tables, comma-separated values, weak links between records, and unbounded arrays.

In plain words
What is it for?
Use it to identify and classify database anti-patterns during schema reviews, code analysis, and performance or data-integrity assessments.
Why use it?
These patterns can make data harder to validate, search, change, and keep consistent. The catalog helps classify each problem under the database concern it affects without counting the same issue twice.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Good fit Use it to identify and classify database anti-patterns during schema reviews, code analysis, and performance or data-integrity assessments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hainrixz/claude-db/db-antipatterns
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 Hainrixz/claude-db --skill db-antipatterns
Clone the repo
git clone --depth 1 https://github.com/Hainrixz/claude-db

Made for: Claude Code.

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 db-antipatterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/hainrixz/claude-db/db-antipatterns/github.svg)](https://agentmods.dev/skills/hainrixz/claude-db/db-antipatterns)
Your own site
<a href="https://agentmods.dev/skills/hainrixz/claude-db/db-antipatterns"><img src="https://agentmods.dev/badge/skills/hainrixz/claude-db/db-antipatterns/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 db-antipatterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/hainrixz/claude-db/db-antipatterns"><img src="https://agentmods.dev/badge/skills/hainrixz/claude-db/db-antipatterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,303 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.00131 $0.01303
Opus 5 $0.00066 $0.00651
Sonnet 5 $0.00026 $0.00261
Haiku 4.5 $0.00013 $0.00130

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

Security

Grade A, and why

db-antipatterns 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 12d 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/db-antipatterns/SKILL.md · 69 lines

How it starts

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

db-antipatterns (M19) — unified anti-pattern catalog

M19 is the catch-all for recognized anti-patterns that span paradigms and don't sit cleanly inside one structural module. It does not own a weight of its own. Findings inherit the category of the most natural module: an EAV smell is a modeling/normalization problem → it scores under M1 (Modelado, design); a Mongo unbounded-array smell scores under document Crecimiento-doc (performance); polymorphic associations without an FK score under M3 (Integridad referencial, both). The finding's module stays M19 for provenance, but expected_impact.axis and the rule id's intent route it to the owning category at scoring time. This avoids double-counting — a single smell contributes to exactly one category per axis. See references/scoring-model.md for the category map per paradigm.

What it checks (catalog)

Relational / SQL:

  • EAV (entity-attribute-value) generic (entity, attribute, value) tables replacing real columns → re-homes to M1 (design). Defeats types, constraints, indexing.
  • God table — one table with dozens-to-hundreds of columns, many nullable → M1 (design).
  • CSV-in-a-columntags VARCHAR holding "a,b,c" instead of a child table/array/jsonb → M1/M4.
  • Polymorphic association without FK (commentable_type + commentable_id, no constraint) → M3 (both).
  • Boolean-flag soup — many is_* booleans that should be a state enum/lookup → M4 (design).
  • Magic catch-all jsonb/text blob used as schema evasion → re-homes to M4 (design). NoSQL:
  • Mongo unbounded array growth — arrays that grow without bound toward the 16 MB doc cap → document Crecimiento-doc (performance).
  • Deep nesting / massive embedded docs that should be referenced collections → document Access-pattern & embedding (design).
  • App-side join / fan-out — N reads to stitch documents that a different model would co-locate → document Query (performance, directional/structural).
  • Redis as durable primary store — relied-on data with no AOF/RDB durability path → key-value Durabilidad (perf). Sev-5 only with live evidence of durability config; else directional.

Read the full file on GitHub · 69 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. 12d ago First seen · 69 lines · 0 tokens per session scan A a8e1483208db

Subscribe to this mod's changes

db-antipatterns is a skill published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 131 tokens to every session and 1,303 once invoked, about $0.0007 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

malloy-dashboards

Build or modify a Malloy Publisher dashboard, a tagged .malloy file in a package's dashboards/ directory, with auto-rendered filter controls, a grid layout, and # drill click-through. Use when the user asks for a dashboard, a filterable operational view, or drill-through between views, and no code is wanted.

malloydata/publisher · 73 tokens

malloy-gotchas-modeling

Common Malloy modeling mistakes and how to avoid them. Read BEFORE writing source definitions, dimensions, measures, or joins. Covers reserved words, NULL checks, date functions, type casts, field management (extend except/accept/rename vs include public/internal/private), and query-based source gotchas.

malloydata/publisher · 67 tokens

malloy-model

Build Malloy semantic models with base source and joined source files. Use when creating or modifying .malloy files, user asks to "create a malloy model", "add dimensions", "add measures", "create a source", or any Malloy model authoring task.

malloydata/publisher · 59 tokens

malloy-charts

Chart selection guidance and renderer reference for Malloy views. Use when choosing visualization types, adding chart annotations, user asks "what chart should I use", "how should I visualize this", or when deciding between barchart, linechart, scatterchart, etc.

malloydata/publisher · 57 tokens

malloy-materialization

Add and debug Malloy Persistence materializations in a package - persist an expensive source so queries read a pre-built table. Read this whenever the user wants to materialize a source, add a persist annotation, speed up a slow source, or asks why a persist source isn't building.

malloydata/publisher · 61 tokens

malloy-model-as-you-go

After answering a data question, write down what the answer assumed so the next reader can trust the number. A field with a.

malloydata/publisher · 32 tokens