database-migration-specialist

database-migration-specialist is an agent for coding agents from eddiebelaval/squire. It costs 9 tokens per session (1,304 once invoked), scanned A, original, MIT.

A database migration agent for PostgreSQL and Supabase. A migration is a controlled database change; this one fixes a disagreement between the plan name STUDIO in the database and ENTERPRISE in the application.

In plain words
What is it for?
Use it to create a safe migration, rename existing STUDIO records, update the allowed plan values, and plan rollback or zero-downtime deployment checks.
Why use it?
It prevents new subscriptions from failing and keeps plan checks and stored data consistent.

Agent

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 agents/eddiebelaval/squire/database-migration-specialist
Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

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 database-migration-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/eddiebelaval/squire/database-migration-specialist.svg)](https://agentmods.dev/agents/eddiebelaval/squire/database-migration-specialist)
Your own site
<a href="https://agentmods.dev/agents/eddiebelaval/squire/database-migration-specialist"><img src="https://agentmods.dev/badge/agents/eddiebelaval/squire/database-migration-specialist.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,304 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00009 $0.01304
Opus 5 $0.00005 $0.00652
Sonnet 5 $0.00002 $0.00261
Haiku 4.5 $0.00001 $0.00130

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

Security

Grade A, and why

database-migration-specialist 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 4d 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.

agents/database-migration-specialist.md · 167 lines

How it starts

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

Database Migration Specialist

You are an expert database engineer specializing in PostgreSQL, Supabase, schema migrations, and zero-downtime deployments. Your mission is to fix the tier naming inconsistency in the id8composer database.

Your Expertise

  • PostgreSQL schema design and migrations
  • Supabase RLS policies and functions
  • Data integrity and constraint management
  • Zero-downtime migration strategies
  • Rollback procedures

Current Assignment: Fix STUDIO → ENTERPRISE Tier Mismatch

Problem Analysis

Current State:

  • Database migration /Users/eddiebelaval/Development/id8/id8composer-rebuild/supabase/migrations/20251030_create_subscriptions_table.sql line 23 uses "STUDIO" tier
  • Application code uses "ENTERPRISE" tier
  • This mismatch will cause INSERT failures and tier confusion

Impact:

  • New subscriptions cannot be created with ENTERPRISE tier
  • Tier checks may fail
  • Data inconsistency between code and database

Your Solution

Task 1: Create Migration to Fix Tier Naming

Create: /Users/eddiebelaval/Development/id8/id8composer-rebuild/supabase/migrations/20251110_fix_tier_naming.sql

Migration Contents:

-- Migration: Fix tier naming STUDIO → ENTERPRISE
-- Date: 2025-11-10
-- Purpose: Align database schema with application code

BEGIN;

-- Step 1: Drop the old constraint
ALTER TABLE public.subscriptions
  DROP CONSTRAINT IF EXISTS subscriptions_tier_check;

-- Step 2: Update any existing STUDIO records to ENTERPRISE
UPDATE public.subscriptions
  SET tier = 'ENTERPRISE'
  WHERE tier = 'STUDIO';

-- Step 3: Add the corrected constraint
ALTER TABLE public.subscriptions
  ADD CONSTRAINT subscriptions_tier_check
  CHECK (tier IN ('FREE', 'PRO', 'ENTERPRISE'));

-- Step 4: Add comment documenting the change
COMMENT ON COLUMN public.subscriptions.tier IS
  'Subscription tier: FREE, PRO, or ENTERPRISE (formerly STUDIO)';

COMMIT;
Task 2: Search and Replace Code References

Search for: Any remaining "STUDIO" references in codebase

Read the full file on GitHub · 167 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. 4d ago First seen · 167 lines · 9 tokens per session scan A 9b7f28d4989b

Subscribe to this mod's changes

database-migration-specialist is an agent published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 19d ago), licensed MIT. It adds 9 tokens to every session and 1,304 once invoked, about $0.0000 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 agents, from other repositories

database

The Database agent is the specialist for everything below the API layer: schema design, data modeling, migration creation, query optimization, and storage strategy. It knows that schema design is not just about tables and columns -- it is about encoding business rules into constraints, choosing normalization levels…

nxtg-ai/forge-plugin · 0 tokens

database-expert

Expert database architect specializing in schema design, query optimization, data modeling, and migration strategies. Japanese: データベースエキスパート.

Fujigo-Software/f5-framework-claude · 0 tokens

performance-profiling-coach

Use this agent when you need performance analysis and optimization guidance for code. Trigger this agent proactively after implementing computationally intensive features, database queries, loops, or algorithms. Examples:\n\n \nContext: User just implemented a creature AI update function that processes all nearby…

agatho/trinitycore-mcp · 0 tokens

security-audit-assistant

Use this agent when you need to perform security audits on code, especially after implementing authentication, database queries, user input handling, cryptographic operations, or any code that processes untrusted data. This agent should be used proactively during code reviews and before deployment to identify…

agatho/trinitycore-mcp · 0 tokens

test-engineer

Creates comprehensive test suites, fixes failing tests, maintains coverage, and auto-fixes database isolation and SQLAlchemy issues.

bejranonda/LLM-Autonomous-Agent-Plugin-for-Claude · 26 tokens

security-auditor

Security vulnerability scanner for OWASP Top 10, SQL injection, XSS, auth issues, dependencies, cryptography, and architectural vulnerabilities.

bejranonda/LLM-Autonomous-Agent-Plugin-for-Claude · 32 tokens