schema-design

schema-design is a skill for Claude Code from butterbase-ai/butterbase-skills. It costs 31 tokens per session (5,994 once invoked), scanned A, original, MIT.

A guide for describing database tables, columns, constraints, and indexes with Butterbase's schema language. The platform compares that description with the current database and applies the required changes.

In plain words
What is it for?
Use it to design or change database schemas, choose column types, add indexes, preview changes, and review applied migrations.
Why use it?
It avoids hand-written database change commands and provides a preview before changes run. It also makes repeated application safe and requires explicit permission for destructive removals.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the butterbase-skills plugin — 40 skills, 33 commands shipped together

Good fit Use it to design or change database schemas, choose column types, add indexes, preview changes, and review applied migrations.

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

Made for: Claude Code.

Or install butterbase-skills, the plugin that ships this one along with the rest of its 40 skills, 33 commands.

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 schema-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/butterbase-ai/butterbase-skills/schema-design/github.svg)](https://agentmods.dev/skills/butterbase-ai/butterbase-skills/schema-design)
Your own site
<a href="https://agentmods.dev/skills/butterbase-ai/butterbase-skills/schema-design"><img src="https://agentmods.dev/badge/skills/butterbase-ai/butterbase-skills/schema-design/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 schema-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/butterbase-ai/butterbase-skills/schema-design"><img src="https://agentmods.dev/badge/skills/butterbase-ai/butterbase-skills/schema-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,994 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.00031 $0.05994
Opus 5.5 $0.00012 $0.02398
Sonnet 5.5 $0.00006 $0.01199
Haiku 4.5 $0.00003 $0.00599

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

Security

Grade A, and why

schema-design 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 18d 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.

skills/schema-design/SKILL.md · 552 lines

How it starts

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

Schema Design Skill

Reference guide for Butterbase's declarative schema DSL. Covers column types, constraints, indexes, and common data modeling patterns.


1. Overview

Butterbase uses a declarative schema DSL — you describe the desired end state of your database, and the platform computes and applies the diff. You never write raw ALTER TABLE or CREATE TABLE SQL. Instead, call manage_schema with action: "apply" and a JSON payload describing your tables, columns, and indexes.

The single manage_schema tool exposes four actions:

Action Purpose
"get" Read the current schema
"dry_run" Preview SQL that apply would execute, without running it
"apply" Apply a declarative schema (diffs against current, runs safe DDL)
"list_migrations" List applied migrations, most recent first

Key principles:

  • Idempotent: applying the same schema twice is safe — returns "Schema is up to date" if no changes needed
  • Additive by default: new columns and tables are created automatically
  • Explicit drops: destructive operations require opt-in via _drop / _dropColumns
  • Preview first: use action: "dry_run" to see what will change before committing
  • Transactional: each migration runs in a single transaction — all changes commit or all roll back

2. Column Types Reference

Type PostgreSQL Use case
uuid UUID Primary keys, foreign keys
text TEXT Strings of any length
integer INTEGER Whole numbers (-2B to 2B)
bigint BIGINT Large whole numbers
boolean BOOLEAN True/false flags
timestamptz TIMESTAMPTZ Dates with timezone
jsonb JSONB Structured/semi-structured data
real REAL 32-bit floating point
double precision DOUBLE PRECISION 64-bit floating point
vector(N) VECTOR(N) Embeddings (pgvector); e.g. vector(1536) for OpenAI

Always use timestamptz instead of timestamp. timestamp silently drops timezone info and causes subtle bugs with users in different time zones.

Read the full file on GitHub · 552 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. 18d ago First seen · 552 lines · 31 tokens per session scan A f1217b917e2b

Subscribe to this mod's changes

schema-design is a skill published in the GitHub repository butterbase-ai/butterbase-skills (535 stars, last pushed 13d ago), licensed MIT. It adds 31 tokens to every session and 5,994 once invoked, about $0.0001 per session on Opus 5.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-09-30.

Related

Other skills, from other repositories

butterbase

AI-native, open-source backend-as-a-service with a built-in Model Context Protocol server. Postgres, auth, storage, functions, AI gateway.

butterbase-ai/butterbase · 34 tokens

run402-buzz

Complete Run402 onboarding for a managed Buzz agent with a dedicated wallet/public identity link, report independent human-adoption and community-installation state, offer bounded per-agent enrollment before provisioning, and stop only at a real approval or repair boundary. Use when a managed Buzz user says "install…

kychee-com/run402 · 137 tokens

run402

Build, deploy and operate full-stack applications with the Run402 CLI. Postgres, auth, storage, functions and hosting with a free prototype tier and an explicit spending allowance. Use for web apps, database-backed sites, APIs and deploy.

kychee-com/run402 · 51 tokens

run402

Build, deploy and operate full-stack applications with the Run402 CLI. Postgres, auth, storage, functions and hosting with a free prototype tier and an explicit spending allowance. Use for web apps, database-backed sites, APIs and deploy.

kychee-com/run402 · 51 tokens

create-pr

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

prisma/orm · 48 tokens

atlas-mssql

SQL Server specifics for Atlas (also Azure SQL and MSSQL): login, dev database and URL scope (mode=schema vs mode=database, the database query parameter), compatibility level and collation, system-generated constraint names, clustered index defaults and datetime2 precision in HCL, GO batches and the delimiter…

ariga/atlas · 147 tokens