databases

databases is a skill for Claude Code, Codex, Cursor from phuoctrung-ppt/ai-sdlc-workflow. It costs 71 tokens per session (909 once invoked), scanned B, original, MIT.

A PostgreSQL toolkit for designing and maintaining relational databases, which organize data in linked tables and use SQL to query it.

In plain words
What is it for?
Use it for schemas, SQL queries, indexes, migrations, replication, backups, roles and permissions, and query analysis with EXPLAIN.
Why use it?
It helps solve database design, slow-query, migration, backup, access-control, and deployment problems in one place.

Skill for Claude CodeCodexCursor

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.

agentmods
npx agentmods add skills/phuoctrung-ppt/ai-sdlc-workflow/databases
Any agent
npx skills add phuoctrung-ppt/ai-sdlc-workflow --skill databases
Clone the repo
git clone --depth 1 https://github.com/phuoctrung-ppt/ai-sdlc-workflow

Made for: Claude Code, Codex, Cursor.

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/phuoctrung-ppt/ai-sdlc-workflow/databases.svg)](https://agentmods.dev/skills/phuoctrung-ppt/ai-sdlc-workflow/databases)
Your own site
<a href="https://agentmods.dev/skills/phuoctrung-ppt/ai-sdlc-workflow/databases"><img src="https://agentmods.dev/badge/skills/phuoctrung-ppt/ai-sdlc-workflow/databases.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00071 $0.00909
Opus 5 $0.00036 $0.00454
Sonnet 5 $0.00014 $0.00182
Haiku 4.5 $0.00007 $0.00091

Measured 3d ago against content hash 0c2f0a059ec4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

databases scanned grade B with 1 finding 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.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/db_backup.py, scripts/db_migrate.py, scripts/db_performance_check.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get install postgresql postgresql-contrib
.cursor/skills/databases/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Databases Skill (PostgreSQL)

Portable core database skill focused on PostgreSQL. MongoDB documentation lives under .cursor/skills/optional/databases-mongodb/ and activates when AGENTS.md §2 Database includes MongoDB.

When to Use This Skill

Use when:

  • Designing relational schemas and data models
  • Writing SQL (joins, CTEs, window functions)
  • Optimizing indexes and query performance
  • Implementing database migrations
  • Configuring backups, roles, and replication
  • Analyzing slow queries with EXPLAIN
  • Administering PostgreSQL deployments

When to Choose PostgreSQL

  • Strong consistency: ACID transactions critical
  • Complex relationships: many-to-many joins, referential integrity
  • SQL ecosystem: reporting tools, BI systems
  • Data integrity: strict schema validation, constraints
  • Complex queries: window functions, CTEs, analytical workloads

Best for: Financial systems, e-commerce transactions, ERP, CRM, data warehousing, analytics

Quick Start

# Ubuntu/Debian
sudo apt-get install postgresql postgresql-contrib

# Start service
sudo systemctl start postgresql

# Connect
psql -U postgres -d mydb

# Basic operations
CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT, age INT);
INSERT INTO users (name, age) VALUES ('Alice', 30);
SELECT * FROM users WHERE age >= 18;
UPDATE users SET age = 31 WHERE name = 'Alice';
DELETE FROM users WHERE name = 'Alice';

Common Operations

Create/Insert

INSERT INTO users (name, email) VALUES ('Bob', '[email protected]');
INSERT INTO users (name, email) VALUES ('Alice', NULL), ('Charlie', NULL);

Read/Query

SELECT * FROM users WHERE age >= 18;
SELECT * FROM users WHERE email = '[email protected]' LIMIT 1;

Update

UPDATE users SET age = 25 WHERE name = 'Bob';
UPDATE users SET status = 'active' WHERE status = 'pending';

Delete

DELETE FROM users WHERE name = 'Bob';
DELETE FROM users WHERE status = 'deleted';

Indexing

CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_users_status_created ON users(status, created_at DESC);

Read the full file on GitHub · 117 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. 3d ago First seen · 117 lines · 71 tokens per session scan B 0c2f0a059ec4

Subscribe to this mod's changes

databases is a skill published in the GitHub repository phuoctrung-ppt/ai-sdlc-workflow (2 stars, last pushed 17d ago), licensed MIT. It adds 71 tokens to every session and 909 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). 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

safe-sql-execution

Use whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix and never says "security," "injection," or "SafeSqlFragment." This covers: writing or editing any pg-meta function, query builder, or endpoint…

supabase/supabase · 221 tokens

db-repair

Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …

garrytan/gbrain · 96 tokens

postgres-adopt

Detect which gbrain engine is in use (PGLite vs Postgres), prefer Postgres for agent-harness installs, install/provision Postgres (Supabase discovery via SUPABASEACCESSTOKEN, local Postgres, opt-in Docker), and move an existing PGLite brain with the guarded engine migration. Detection is one engine-free command; the…

garrytan/gbrain · 85 tokens

amazon aurora dsql

Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.

awslabs/mcp · 46 tokens

claimable-postgres

Provision instant temporary Postgres databases via Claimable Postgres by Neon (neon.new) with no login, signup, or credit card. Supports REST API, CLI, and SDK. Use when users ask for a quick Postgres environment, a throwaway DATABASEURL for prototyping/tests, or "just give me a DB now". Triggers include: "quick…

neondatabase/mcp-server-neon · 123 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, FK…

awslabs/agent-plugins · 227 tokens