db-write

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

A workflow for running SQL statements that change a Supabase database, including adding, updating, or deleting data and changing database structure.

In plain words
What is it for?
Use it for migrations, seed data, schema changes, and data fixes in local, development, or preview databases. It does not allow production mutations.
Why use it?
It provides a defined process for database changes while requiring the target environment and database type to be specified.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions AGENTS.md.

Good fit Use it for migrations, seed data, schema changes, and data fixes in local, development, or preview databases. It does not allow production mutations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevin-liu-01/agent-machines/db-write
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-write
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-write

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/db-write"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/db-write.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 506 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.00041 $0.00506
Opus 5 $0.00020 $0.00253
Sonnet 5 $0.00008 $0.00101
Haiku 4.5 $0.00004 $0.00051

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

Security

Grade A, and why

db-write 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 9d 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-write/SKILL.md · 58 lines

What it actually says

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}/../db/scripts/query.ts. Run it with:

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

Flags:

  • --env local|dev|preview|prod (default: local)
  • --db core|admin (default: core)
  • --format table|json|csv (default: table)

Note: do NOT pass --readonly. This skill is for mutations.

Credentials

Same as /db. See that skill for credential resolution order and SSM instructions.

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.

Rules

  1. NEVER target prod. Refuse all prod mutations. Production changes go through migrations deployed via the pipeline (dev -> preview -> prod). See AGENTS.md "Production is Sacred."
  2. Confirm before executing on any remote environment (dev, preview). Show the SQL and target environment, then ask the user to confirm.
  3. Default to --env local unless the user specifies otherwise.
  4. For DDL (CREATE, ALTER, DROP), prefer pnpm db diff --execute for tracked migrations. Only use raw DDL for local experimentation.
  5. Show the SQL you intend to run before running it.

Task

Run the user's mutation. Always show the SQL and target before executing. For remote envs, require explicit confirmation.

$ARGUMENTS

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. 9d ago First seen · 58 lines · 41 tokens per session scan A 45f0f0c22d77

Subscribe to this mod's changes

db-write is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (26 stars, last pushed 8d ago), licensed MIT. It adds 41 tokens to every session and 506 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

mysql

Query the connected MySQL/MariaDB database with the mysql client. Use when the user asks about their database, tables, rows, schema, or to run SQL against MySQL.

intentic/intentic · 39 tokens

postgres

Query the connected PostgreSQL database with psql. Use when the user asks about their database, tables, rows, schema, or to run SQL against Postgres.

intentic/intentic · 35 tokens

create-pr

Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for prisma-next. Use when the user wants to create a pull request, open a PR, or submit changes for review.

prisma/orm · 47 tokens

agent-reach

An internet-search and platform-access router for finding information across websites and services such as Reddit, X, GitHub, YouTube, and job sites.

Panniantong/Agent-Reach · 349 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

supabase

Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…

PentesterFlow/agent · 120 tokens