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

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

Good fit It is for designing schemas, writing or optimizing queries, choosing indexes, planning migrations, selecting between SQL and NoSQL, and debugging database performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apexiq/skillsmith/database_expert
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 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/github.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/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 database-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/apexiq/skillsmith/database_expert"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/database_expert.svg" alt="Reviewed on agentmods" width="80" 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. 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.00037 $0.02301
Opus 5.5 $0.00015 $0.00920
Sonnet 5.5 $0.00007 $0.00460
Haiku 4.5 $0.00004 $0.00230

Measured 1mo ago against content hash e1010b3d4f76, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 6mo ago), licensed MIT. It adds 37 tokens to every session and 2,301 once invoked, about $0.0001 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-08-31.

Related

Other skills, from other repositories

agentic-sql

Run SQL against a production or staging database safely. Check the saved query library first, run only read-only queries (read-only role, SQL check, LIMIT added), and save findings worth keeping back to the library. Use when a task needs data from a real database, such as a customer lookup, a support-ticket…

23blocks-OS/ai-maestro-plugins · 98 tokens

dev-prisma

Pointer to Prisma's own agent skills (prisma-cli, prisma-client-api...) and how to install them, plus the schema-change workflow. Use for Prisma ORM work (schema, migrations, queries, schema.prisma) only when no prisma- skill is installed; when one is, use it instead.

christopherlouet/claude-base · 65 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

django-orm-mastery

Master Django ORM patterns: QuerySets, selectrelated, prefetchrelated, F/Q objects, annotations, aggregations, and raw SQL safety. Use when the user writes Django database queries, asks about ORM optimization, encounters N+1 queries, or works with complex filtering and aggregation. Trigger when you see inefficient…

VersoXBT/claude-initial-setup · 71 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