db

db is a skill for Claude Code from Kevin-Liu-01/Agent-Machines. It costs 34 tokens per session (703 once invoked), scanned A, original, MIT.

A read-only tool for running SQL queries against local or remote Supabase databases. SQL is the language used to inspect and work with database data.

In plain words
What is it for?
Use it to inspect schemas, investigate data, check migrations, and answer questions about database state in different environments.
Why use it?
It lets you examine database structure and contents without changing them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect schemas, investigate data, check migrations, and answer questions about database state in different environments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevin-liu-01/agent-machines/db
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 Kevin-Liu-01/Agent-Machines --skill db
Clone the repo
git clone --depth 1 https://github.com/Kevin-Liu-01/Agent-Machines

Made for: Claude Code.

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/kevin-liu-01/agent-machines/db/github.svg)](https://agentmods.dev/skills/kevin-liu-01/agent-machines/db)
Your own site
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/db"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/db/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 db

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/db"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/db.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 703 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00034 $0.00703
Opus 5 $0.00017 $0.00351
Sonnet 5 $0.00007 $0.00141
Haiku 4.5 $0.00003 $0.00070

Measured 11d ago against content hash bbe484a651ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

db 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 11d 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.

knowledge/skills/db/SKILL.md · 75 lines

How it starts

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

Context

  • Databases: !cat packages/python/cli/databases.yml
  • Local Supabase status: !pnpm db status 2>&1 | head -10

Query script

The query tool lives at ${CLAUDE_SKILL_DIR}/scripts/query.ts. Run it with:

node --experimental-strip-types ${CLAUDE_SKILL_DIR}/scripts/query.ts [flags] "<sql>"

Flags:

  • --env local|dev|preview|prod (default: local)
  • --db core|admin (default: core)
  • --readonly (enforced by this skill, always pass it)
  • --format table|json|csv (default: table)

Credentials

Remote connections resolve credentials in order: SUPABASE_DB_PASSWORD env var > ~/.pgpass.

If neither is available, fetch from AWS SSM (requires active SSO session):

# Prod (admin profile, account 717408097146)
aws ssm get-parameter --name "/prod/SUPABASE_DB_PASSWORD" --with-decryption --query "Parameter.Value" --output text --profile admin

# Dev/preview passwords are not in SSM. Use ~/.pgpass or ask a teammate.

To populate ~/.pgpass (one entry per environment):

# Format: hostname:port:database:username:password
db.<project_ref>.supabase.co:5432:postgres:postgres:<password>

See packages/python/cli/databases.yml for project refs per environment.

Schema reference

Generated Supabase types with full table schemas, enums, and function signatures:

  • Core DB: packages/typescript/databases/core/database.types.ts
  • Admin DB: packages/typescript/databases/admin/database.types.ts

Read the relevant file when you need column names, types, enums, or relationships. The Database type has schemas (public, billing, oauth, dcs) with Tables, Enums, and Functions for each. Each table has Row (all columns typed), Insert, and Update variants.

Rules

  1. Always pass --readonly. This skill is read-only. For mutations, the user must invoke /db-write.
  2. Never target prod unless the user explicitly says "prod" or "production."
  3. Default to --env local unless the user specifies otherwise.
  4. For schema exploration, start with information_schema.tables and information_schema.columns.
  5. Format as --format json when the user wants structured output or when piping to analysis.
  6. Format as --format table for human-readable display (default).
  7. Quote identifiers that may conflict with SQL keywords.

Read the full file on GitHub · 75 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. 11d ago First seen · 75 lines · 34 tokens per session scan A bbe484a651ba

Subscribe to this mod's changes

db is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (29 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 703 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

api-mirror

Stand up a persistent, self-refreshing local mirror of a bulk upstream dataset with the MirrorService (@cyanheads/mcp-ts-core/mirror). Use when a server wraps a large or slow API and should query a synced local index (embedded SQLite + FTS5) instead of paginating the live API per request.

cyanheads/obsidian-mcp-server · 68 tokens

hermes-mnemosyne

Mnemosyne is Hermes' primary local-first memory engine — SQLite with vector + FTS5 hybrid search, 19+ tools, auto-consolidation, and a standalone CLI. It's a pip-installed plugin (not a built-in toolset) discovered via $HERMESHOME/plugins/mnemosyne/.

AtlasOmnia/donna-starter · 30 tokens

cmdb-patterns

Create ServiceNow CIs and cmdbrelci relationships, walk upstream/downstream impact, detect orphan/stale CIs, and align discovered CIs with the proper sysclassname hierarchy.

serac-labs/serac · 43 tokens

gliderecord-patterns

Write efficient ServiceNow GlideRecord queries — addQuery vs addEncodedQuery, setLimit, GlideAggregate for counts, avoiding N+1 in loops, query operators, and safe CRUD with workflow control.

serac-labs/serac · 46 tokens

organize-database

Transform unstructured Notion pages into a well-designed database with proper schema and migration.

n24q02m/better-notion-mcp · 21 tokens

change-tracking

A change-tracking workflow for a 1C database, a business accounting and records system. It retrieves records changed after a saved time marker, including document details and document line items.

theYahia/WWmcp · 23 tokens