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/jdanigo/hydraia/db-optimizationnpx skills add jdanigo/hydraia --skill db-optimizationgit clone --depth 1 https://github.com/jdanigo/hydraiaWhat 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.00065 | $0.00736 |
| Opus 5 | $0.00032 | $0.00368 |
| Sonnet 5 | $0.00013 | $0.00147 |
| Haiku 4.5 | $0.00006 | $0.00074 |
Grade A, and why
db-optimization 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 3d 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DB Optimization — EXPLAIN before you touch anything
Playbook for the DB half of the Hydraia perf route. The db-performance-tuner agent does the diagnosis; this skill sets the rules the route runs under.
Expand-contract migration protocol
- Expand: add the new column/table/index alongside the old — additive, backward-compatible, online.
- Dual-write + backfill: application writes both shapes; backfill history in batches (bounded, throttled, resumable).
- Switch reads to the new shape behind a verified flag; watch metrics.
- Contract: only after a full bake period, remove the old shape in a later release. Contract is its own plan task, never bundled with expand.
Index design guidance
- Composite order: equality columns first, then range, then sort — match the query, not intuition.
- Covering indexes to eliminate lookups for hot read paths; weigh write amplification (every index taxes every write).
- Partial/filtered indexes for skewed predicates (
WHERE deleted_at IS NULL). - Hunt UNUSED indexes too (
pg_stat_user_indexes,sys.schema_unused_indexes) — dropping one is also an optimization. - The index is not always the answer: sometimes it is the query shape, the schema, or the caller (N+1, missing cache).
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.
- 3d ago First seen · 46 lines · 65 tokens per session scan A d098b208e001
db-optimization is a skill published in the GitHub repository jdanigo/hydraia (8 stars, last pushed 13d ago), licensed MIT. It adds 65 tokens to every session and 736 once invoked, about $0.0003 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
moai-domain-database
Database specialist covering PostgreSQL, MongoDB, Redis, Oracle, and cloud database platforms (Neon, Supabase, Firestore). Use for schema design, query optimization, indexing strategies, data modeling, or cloud database selection. Cloud vendor guide absorbed from moai-platform-database-cloud.
demo-data
Seed a Mendix app's PostgreSQL database directly, bypassing the runtime — Mendix's internal ID system, association storage, and bulk import from an external database. Use when populating test or demo data, when data is needed before the UI exists, or for imports too large for the runtime.
ck:databases
Design schemas, write queries for MongoDB and PostgreSQL. Use for database design, SQL/NoSQL queries, aggregation pipelines, indexes, migrations, replication, performance optimization, psql CLI.
azure-cosmos-db
Expert knowledge for Azure Cosmos DB development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using Cosmos DB SQL/Mongo/Cassandra APIs, change feed, multi-region HA, vector…
database-backup-and-restore-strategies
Cross-database backup tooling and restore-testing discipline: pgdump/pgbasebackup for PostgreSQL, mysqldump/Percona XtraBackup for MySQL/MariaDB, and mongodump/mongorestore for MongoDB — logical vs. physical backup trade-offs, point-in-time recovery, and why an untested restore is not a real backup. Use when the user…
nosql-database-design
Designs a NoSQL data model by leading with access pattern analysis. Covers DynamoDB single-table design (PK/SK/GSI) and MongoDB embedding vs referencing, consistency models, and capacity planning. Invoked when the user asks to design a DynamoDB schema, MongoDB data model, or NoSQL data model.