database-expert

database-expert is a skill for Claude Code, Codex from ApexIQ/skillsmith. It costs 37 tokens per session (2,301 once invoked), scanned A, original, MIT.

Guidance for database design, queries, performance tuning, and migrations, covering SQL and NoSQL systems.

In plain words
What is it for?
It is for designing schemas, writing or optimizing queries, choosing indexes, planning migrations, selecting between SQL and NoSQL, and debugging database performance.
Why use it?
It helps avoid slow queries, poorly structured data, missing indexes, and risky changes to an existing database.

Skill for Claude CodeCodex

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/apexiq/skillsmith/database_expert
Any agent
npx skills add ApexIQ/skillsmith --skill database_expert
Clone the repo
git clone --depth 1 https://github.com/ApexIQ/skillsmith

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 database-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexiq/skillsmith/database_expert.svg)](https://agentmods.dev/skills/apexiq/skillsmith/database_expert)
Your own site
<a href="https://agentmods.dev/skills/apexiq/skillsmith/database_expert"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/database_expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,301 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 $0.00037 $0.02301
Opus 5 $0.00018 $0.01151
Sonnet 5 $0.00007 $0.00460
Haiku 4.5 $0.00004 $0.00230

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

Security

Grade A, and why

database-expert 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.

.agent/skills/database_expert/SKILL.md · 290 lines

How it starts

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

🗄️ Database Expert — Production-Grade Database Engineering

Philosophy: Your database is the foundation of your application. A bad schema is technical debt that compounds with every row inserted. Design it right, index it early, migrate it safely.

1. When to Use This Skill

  • Designing database schemas for new features
  • Optimizing slow queries
  • Planning index strategies
  • Writing and reviewing migrations
  • Choosing between SQL and NoSQL
  • Debugging database performance issues
  • Planning data model changes for existing systems

2. Schema Design Principles

Normalize First, Denormalize When Proven Necessary

-- GOOD: Normalized schema — single source of truth
CREATE TABLE users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name VARCHAR(100) NOT NULL,
    email VARCHAR(255) NOT NULL UNIQUE,
    role VARCHAR(20) NOT NULL DEFAULT 'member'
        CHECK (role IN ('member', 'admin', 'viewer')),
    created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

CREATE TABLE teams (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name VARCHAR(100) NOT NULL,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

CREATE TABLE team_members (
    team_id UUID NOT NULL REFERENCES teams(id) ON DELETE CASCADE,
    user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
    joined_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    PRIMARY KEY (team_id, user_id)
);

-- BAD: User data duplicated in every table that references them
CREATE TABLE orders (
    id UUID PRIMARY KEY,
    user_name VARCHAR(100),  -- duplicated from users table
    user_email VARCHAR(255), -- will drift from source
    -- ...
);

Use Proper Types

Data ❌ Bad Type ✅ Good Type Why
Primary key INT AUTO_INCREMENT UUID Distributed-safe, no enumeration attacks
Money FLOAT NUMERIC(12,2) Float arithmetic is imprecise
Timestamps TIMESTAMP TIMESTAMPTZ Always store with timezone
Status/enum VARCHAR VARCHAR + CHECK Enforce valid values at DB level
JSON blobs TEXT JSONB (PostgreSQL) Indexable, queryable, validated
Boolean INT(1) BOOLEAN Semantic correctness
IP address VARCHAR(45) INET (PostgreSQL) Built-in validation + operators

Read the full file on GitHub · 290 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 · 290 lines · 37 tokens per session scan A e1010b3d4f76

Subscribe to this mod's changes

database-expert is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 2,301 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

dev-prisma

Development with Prisma ORM (schema, migrations, type-safe queries, Accelerate, transactions). Trigger when the user wants to add a model, create a migration, optimize Prisma queries, or when schema.prisma is detected in the project.

christopherlouet/claude-base · 51 tokens

dev-supabase

Backend development with Supabase. Trigger when the user wants to configure auth, the database, or Supabase storage.

christopherlouet/claude-base · 28 tokens

ops-database

Database schema design. Trigger when the user wants to create tables, migrations, or optimize queries.

christopherlouet/claude-base · 23 tokens

migration-patterns

Guide for database schema migrations with zero-downtime patterns, rollback strategies, data migrations, and migration testing. Use when the user writes database migrations, asks about schema changes in production, needs zero-downtime migration patterns, or plans rollback strategies. Trigger whenever database…

VersoXBT/claude-initial-setup · 70 tokens

query-optimization

Guide for optimizing SQL queries with EXPLAIN ANALYZE, index tuning, N+1 detection, covering indexes, and query plan analysis. Use when the user has slow database queries, asks about query performance, needs to interpret EXPLAIN output, or wants to eliminate N+1 queries. Trigger whenever query performance, slow…

VersoXBT/claude-initial-setup · 78 tokens

schema-design-guide

Guide for relational database schema design with normalization, indexing strategy, constraints, naming conventions, and denormalization tradeoffs. Use when the user designs database tables, asks about normalization, needs indexing advice, or defines foreign key relationships. Trigger whenever database schema, table…

VersoXBT/claude-initial-setup · 64 tokens