databases

databases is a skill for Claude Code, Codex from tamnguyendinh/Anvien. It costs 74 tokens per session (1,516 once invoked), scanned A, original, MIT.

A guide for production database work involving PostgreSQL or MongoDB, systems used to store and query application data. It covers schemas, models, migrations, queries, indexes, connections, and backups.

In plain words
What is it for?
Use it when creating, changing, or reviewing database schemas, models, migrations, queries, indexes, transactions, connection settings, backups, or performance.
Why use it?
It reduces the risk of inconsistent database changes, slow queries, broken migrations, or unsafe production assumptions.

Skill for Claude CodeCodex

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

Good fit Use it when creating, changing, or reviewing database schemas, models, migrations, queries, indexes, transactions, connection settings, backups, or performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tamnguyendinh/anvien/databases
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 tamnguyendinh/Anvien --skill databases
Clone the repo
git clone --depth 1 https://github.com/tamnguyendinh/Anvien

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 databases

README.md
[![agentmods](https://agentmods.dev/badge/skills/tamnguyendinh/anvien/databases/github.svg)](https://agentmods.dev/skills/tamnguyendinh/anvien/databases)
Your own site
<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.

agentmods 80×15 button for databases

Your own site · 80×15
<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>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,516 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.00074 $0.01516
Opus 5 $0.00037 $0.00758
Sonnet 5 $0.00015 $0.00303
Haiku 4.5 $0.00007 $0.00152

Measured yesterday against content hash 78e261784909, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

internal/aicontext/skills/databases/SKILL.md · 109 lines

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.

Read the full file on GitHub · 109 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. yesterday Changed · +4 lines 78e261784909
  2. 6d ago Changed · +2 lines · +8 tokens per session 01bbc7311355
  3. 10d ago First seen · 103 lines · 66 tokens per session scan A 3c1b5d2f9f8a

Subscribe to this mod's changes

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.

Related

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…

LerianStudio/ring · 97 tokens

databases

Work with PostgreSQL, MongoDB, and Redis for schema design, query optimization, migrations, and data modeling. Use when designing or optimizing data layers.

ihatesea69/kiro-kit · 34 tokens

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…

mturac/hermes-supercode-skills · 131 tokens

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…

yedanyagamiai-cmd/openclaw-mcp-servers · 128 tokens

supabase-node

Express/Hono with Supabase and Drizzle ORM.

alinaqi/maggy · 14 tokens

supabase

Core Supabase CLI, migrations, RLS, Edge Functions.

alinaqi/maggy · 15 tokens