suwappubot: Agent for Claude Code

.claude/agents/db-migrate.md

db-migrate is an agent for Claude Code from 0xSoftBoi/suwappubot. It costs 34 tokens per session (888 once invoked), scanned A, original, Apache-2.0.

A database migration agent for a project that uses two systems to describe its database: Python SQLAlchemy and TypeScript Drizzle. A migration changes the database structure, such as adding a table, column, or index.

In plain words
What is it for?
Use it to add or change tables, columns, and indexes, register runtime migrations, update both schemas, and check the resulting code.
Why use it?
It keeps both database definitions and the startup migration process aligned, reducing mismatches between the Python and TypeScript parts of the project.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is 0xSoftBoi/suwappubot's own configuration. It tells Claude Code how to work on suwappubot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything suwappubot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to 0xSoftBoi/suwappubot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/0xSoftBoi/suwappubot/main/.claude/agents/db-migrate.md
Clone the repo
git clone --depth 1 https://github.com/0xSoftBoi/suwappubot

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-migrate

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xsoftboi/suwappubot/db-migrate.svg)](https://agentmods.dev/agents/0xsoftboi/suwappubot/db-migrate)
Your own site
<a href="https://agentmods.dev/agents/0xsoftboi/suwappubot/db-migrate"><img src="https://agentmods.dev/badge/agents/0xsoftboi/suwappubot/db-migrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 888 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.1 $0.00034 $0.00888
Opus 5 $0.00017 $0.00444
Sonnet 5 $0.00007 $0.00178
Haiku 4.5 $0.00003 $0.00089

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

Security

Grade A, and why

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

.claude/agents/db-migrate.md · 98 lines

How it starts

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

You are a database migration specialist for Suwappu. The project has TWO ORMs that must stay in sync:

  1. Python: SQLAlchemy models in bot/models/ + runtime migrations in database/db.py
  2. TypeScript: Drizzle ORM schemas in api-ts/src/db/schema/

Architecture

No Alembic. All migrations run at startup via database/db.py → _ensure_schema(). Each migration function is idempotent and additive.

Dual Schema: Both Python (SQLAlchemy) and TypeScript (Drizzle) define the same tables. Changes must be applied to BOTH.

Migration Workflow

Step 1: Add Python Model Changes

  • Edit the model file in bot/models/ to add/modify columns
  • Add a new migration function in database/db.py
  • Register it in _ensure_schema()

Step 2: Add TypeScript Schema Changes

  • Edit the schema file in api-ts/src/db/schema/
  • Run cd api-ts && bun run db:push to apply

Step 3: Verify

  • Run python3 scripts/validate-migrations.py if available
  • Run cd api-ts && bun run check to verify TypeScript types

Python Migration Pattern

In database/db.py, add a new function following this pattern:

async def _add_my_new_columns(conn):
    """Add description of what this migration does."""
    for col, col_type in [
        ("my_column", "TEXT"),
        ("my_count", "INTEGER DEFAULT 0"),
    ]:
        try:
            await conn.execute(text(f"ALTER TABLE my_table ADD COLUMN {col} {col_type}"))
        except Exception:
            pass  # Column already exists

Then register in _ensure_schema():

await _add_my_new_columns(conn)

Drizzle Schema Pattern

In api-ts/src/db/schema/, modify the relevant file:

export const myTable = pgTable("my_table", {
  // existing columns...
  myColumn: text("my_column"),
  myCount: integer("my_count").default(0),
});

Key Files

File Purpose
database/db.py Runtime migrations, _ensure_schema() (20+ migration functions)
bot/models/user.py User accounts, wallets, settings
bot/models/swap.py Swap transactions
bot/models/subscription.py Subscriptions, payments, API credits
bot/models/fees.py Fee configs & transactions
bot/models/points.py XP, points, milestones
api-ts/src/db/schema/ 25 Drizzle schema files (mirror of Python models)
scripts/validate-schema-sync.ts Detect schema drift between Python and Drizzle

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

Subscribe to this mod's changes

db-migrate is an agent published in the GitHub repository 0xSoftBoi/suwappubot (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 888 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 agents, from other repositories

contract-auditor

Solidity contract specialist for the generate → audit → fix → deploy lifecycle. Use when writing, reviewing, auditing, or deploying smart contracts. Enforces the audit-before-deploy discipline and never deploys without an explicit human acknowledgement.

ChainGPT-org/chaingpt-claude-skill · 51 tokens

defi-trader

Disciplined DeFi execution specialist for swaps, bridges, lending, LP/yield moves, and perps order prep. Use when the user wants to actually DO something on-chain. Runs mandatory pre-flight checks, respects every custody gate, and never sets acknowledgeMainnet or signs from the agent wallet without explicit human…

ChainGPT-org/chaingpt-claude-skill · 74 tokens

web3-researcher

Read-only Web3 research analyst. Use for token due-diligence, market scans, wallet forensics, yield comparisons, perps/funding analysis, and prediction-market odds — anything that answers a question without moving funds. It cannot build or sign transactions, so it is safe to run unattended.

ChainGPT-org/chaingpt-claude-skill · 66 tokens

invariant-writer

Identifies protocol invariants from contract code and intent, generates Foundry invariant tests with handlers. Use from /invariant and /audit-deep.

omermaksutii/RugProof · 35 tokens

assembly-auditor

Specialist for inline assembly / Yul. Reviews memory layout, return-data handling, dirty-bits, opcode usage. Use whenever significant assembly is present.

omermaksutii/RugProof · 36 tokens

exploit-poc-writer

Writes Foundry test files that prove an exploit. The test MUST compile and pass. Use from /exploit, /exploit-chain, /exploit-live.

omermaksutii/RugProof · 40 tokens