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.
npx agentmods add skills/apexiq/skillsmith/database_expertnpx skills add ApexIQ/skillsmith --skill database_expertgit clone --depth 1 https://github.com/ApexIQ/skillsmithWrote 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.
[](https://agentmods.dev/skills/apexiq/skillsmith/database_expert)<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>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.
| Model | Per session | Once 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 |
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.
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 |
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.
- 5d ago First seen · 290 lines · 37 tokens per session scan A e1010b3d4f76
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.
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.
dev-supabase
Backend development with Supabase. Trigger when the user wants to configure auth, the database, or Supabase storage.
ops-database
Database schema design. Trigger when the user wants to create tables, migrations, or optimize queries.
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…
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…
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…