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 skills add tamnguyendinh/Anvien --skill databasesgit clone --depth 1 https://github.com/tamnguyendinh/AnvienWrote 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/tamnguyendinh/anvien/databases)<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/databases"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/databases/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.
<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/databases"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/databases.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00074 | $0.01516 |
| Opus 5 | $0.00037 | $0.00758 |
| Sonnet 5 | $0.00015 | $0.00303 |
| Haiku 4.5 | $0.00007 | $0.00152 |
Grade A, and why
databases 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 yesterday.
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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Databases Skill
Repo-first guidance for creating, changing, and reviewing MongoDB, PostgreSQL, or SQLite database work in real repositories.
Purpose
Use this skill when the task involves database schema, models, migrations, queries, indexes, transactions, seed data, connection config, backup/restore assumptions, or database performance.
The goal is not to teach basic database syntax. The goal is to help the agent produce database work that is correct, production-ready, and consistent with the target repository.
Core Rule
Follow the user's requested action.
If the user asks for review, review. If the user asks for a plan, plan. If the user asks for implementation, implementation is allowed.
In every mode, database work must meet the production database bar unless the user explicitly asks for a throwaway prototype.
Repo-First Rule
Before proposing or editing database work, inspect the target repository first:
- Database engine and version
- ORM, query builder, or data-access layer
- Migration framework and migration conventions
- Existing schema, model, index, and query patterns
- Connection config and environment conventions
- Tests, seed data, fixtures, and deployment assumptions
Follow repo-native tooling and patterns unless there is a clear reason not to.
Production Database Bar
Production-ready database work must account for:
- Correctness: constraints, nullability, uniqueness, referential rules, validation, and ownership boundaries.
- Migration safety: forward path, rollback or mitigation path, deploy order, locking risk, data volume, and backfill behavior.
- Performance: expected queries, indexes, cardinality, pagination, aggregation cost, and query plans where relevant.
- Concurrency: transaction boundaries, isolation assumptions, duplicate writes, retries, and out-of-order events.
- Security: least privilege, secret handling, PII, encryption assumptions, and auditability.
- Operations: backup/restore assumptions, monitoring, slow-query visibility, retention, and failure recovery.
- Repo fit: existing ORM, migration framework, naming, config, and test patterns.
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/database-selection.md 2.7 KB
- references/dual-database-sqlite-postgres.md 6.2 KB
- references/mongodb-aggregation.md 9.1 KB
- references/mongodb-atlas.md 9.1 KB
- references/mongodb-crud.md 8.2 KB
- references/mongodb-indexing.md 10 KB
- references/postgresql-administration.md 12 KB
- references/postgresql-best-practices.md 4.2 KB
- references/postgresql-performance.md 11 KB
- references/postgresql-psql-cli.md 10 KB
- references/postgresql-queries.md 9.9 KB
- references/sqlite-best-practices.md 16 KB
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.
- yesterday Changed · +4 lines 78e261784909
- 6d ago Changed · +2 lines · +8 tokens per session 01bbc7311355
- 10d ago First seen · 103 lines · 66 tokens per session scan A 3c1b5d2f9f8a
databases is a skill published in the GitHub repository tamnguyendinh/Anvien (9 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 1,516 once invoked, about $0.0004 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
ring:mapping-service-resources
Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…
databases
Work with PostgreSQL, MongoDB, and Redis for schema design, query optimization, migrations, and data modeling. Use when designing or optimizing data layers.
db-whisperer
Diagnoses and improves application-layer databases: Postgres, MySQL, SQLite, and MongoDB. Covers EXPLAIN ANALYZE, slow query detection, index strategy, N+1 detection, schema migrations with up/down scripts, connection pooling, replication setup, and vacuum/analyze operations. Use this skill when the user says "this…
openclaw-database-toolkit
Database operations MCP server with 5 tools for D1, PostgreSQL, and MongoDB. Use when: (1) 'query my D1 database' or 'run this SQL', (2) 'insert these records' or 'add rows to table', (3) 'update records where X' or 'bulk update', (4) 'show me the table schema' or 'what columns exist', (5) 'migrate this schema' or…
supabase-node
Express/Hono with Supabase and Drizzle ORM.
supabase
Core Supabase CLI, migrations, RLS, Edge Functions.