db

db is a skill for Claude Code, Codex from Supersynergy/awesome-agentic-coding. It costs 39 tokens per session (536 once invoked), scanned A, original, MIT.

A command-line tool for working with PostgreSQL, SurrealDB, and SQLite databases. It detects database settings from common project files and runs queries.

In plain words
What is it for?
Use it to inspect tables, schemas, indexes, row counts, and small result sets in supported databases.
Why use it?
It gives developers one workflow for finding the database connection, exploring its structure, and querying data with limits.

Skill for Claude CodeCodex

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/supersynergy/awesome-agentic-coding/db
Any agent
npx skills add Supersynergy/awesome-agentic-coding --skill db
Clone the repo
git clone --depth 1 https://github.com/Supersynergy/awesome-agentic-coding

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 db

README.md
[![agentmods](https://agentmods.dev/badge/skills/supersynergy/awesome-agentic-coding/db.svg)](https://agentmods.dev/skills/supersynergy/awesome-agentic-coding/db)
Your own site
<a href="https://agentmods.dev/skills/supersynergy/awesome-agentic-coding/db"><img src="https://agentmods.dev/badge/skills/supersynergy/awesome-agentic-coding/db.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 536 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00039 $0.00536
Opus 5 $0.00019 $0.00268
Sonnet 5 $0.00008 $0.00107
Haiku 4.5 $0.00004 $0.00054

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

Security

Grade A, and why

db scanned grade A 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.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:8000/sql \
skills/db/SKILL.md · 65 lines

What it actually says

Database CLI Operations

Execute database operations for: $ARGUMENTS

Step 1: Detect Database

Check these files to find the database connection:

  • .env / .env.local for DATABASE_URL
  • docker-compose.yml for database services
  • drizzle.config.ts / prisma/schema.prisma for ORM config

Step 2: Execute Query

PostgreSQL

# Connect
psql "$DATABASE_URL" -c "YOUR QUERY"

# Exploration
psql "$DATABASE_URL" -c "\dt"                    # List tables
psql "$DATABASE_URL" -c "\d tablename"           # Describe table
psql "$DATABASE_URL" -c "\di"                    # List indexes

# Queries (always LIMIT!)
psql "$DATABASE_URL" -c "SELECT * FROM users LIMIT 10"
psql "$DATABASE_URL" -c "SELECT count(*) FROM users"

SurrealDB

# Via HTTP API (most reliable)
curl -s http://localhost:8000/sql \
  -H "Accept: application/json" \
  -H "NS: app" -H "DB: main" \
  -u "root:root" \
  --data "SELECT * FROM user LIMIT 10;"

# Via CLI
surreal sql --endpoint http://localhost:8000 \
  --namespace app --database main \
  --username root --password root \
  --query "INFO FOR DB;"

SQLite

sqlite3 path/to/db.sqlite ".tables"
sqlite3 path/to/db.sqlite ".schema tablename"
sqlite3 path/to/db.sqlite "SELECT * FROM users LIMIT 10"

Safety Rules

  • NEVER run DELETE, DROP, TRUNCATE, or ALTER without explicit user confirmation
  • Always add LIMIT to SELECT queries (default: 20)
  • Never expose passwords or connection strings in output
  • For writes, show the query first and ask before executing
  • Use READ-ONLY connections when just exploring (add ?sslmode=require&options=-c default_transaction_read_only=on for Postgres)
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 · 65 lines · 39 tokens per session scan A b33b5474f9f7

Subscribe to this mod's changes

db is a skill published in the GitHub repository Supersynergy/awesome-agentic-coding (1 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 536 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

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.

modu-ai/moai-adk · 64 tokens

moai-domain-backend

Backend development specialist covering API design, database integration, microservices architecture, and modern backend patterns. Use when designing APIs, implementing server logic, authentication, or authorization.

modu-ai/moai-adk · 39 tokens

database-designer

Используй только внутри активного Codex Project Autopilot-проекта, когда data-layer уже относится к плану автопилота.

hashgraph-online/awesome-codex-plugins · 34 tokens

doncheli-plan

Generate technical blueprint from Gherkin specs including API contracts, service design, database schema, and WebSocket events. Activate when user mentions "plan", "blueprint", "technical design", "architecture", "planificar".

doncheli/don-cheli-sdd · 50 tokens

database-design

Schema design, data modeling, migrations, and query correctness for relational databases (and when to use non-relational). Use when creating or altering tables, designing schemas, writing migrations, modeling money/inventory/ledgers, adding indexes, or when the user says "schema", "data model", "migration", "database…

05-deepak-patidar/claude-skills · 73 tokens

linearis-cli

Linear access rule + Linearis CLI reference. READS → query the local replica by direct SQL (/catalyst/catalyst-replica.db); WRITES and list/search → the linearis CLI. Use when working with Linear tickets, cycles, projects, milestones, or ticket IDs like TEAM-123.

coalesce-labs/catalyst · 71 tokens