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.
npx agentmods add commands/secondsky/claude-skills/d1-create-migrationgit clone --depth 1 https://github.com/secondsky/claude-skillsWrote 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.
[](https://agentmods.dev/commands/secondsky/claude-skills/d1-create-migration)<a href="https://agentmods.dev/commands/secondsky/claude-skills/d1-create-migration"><img src="https://agentmods.dev/badge/commands/secondsky/claude-skills/d1-create-migration.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00050 | $0.02945 |
| Opus 5 | $0.00025 | $0.01473 |
| Sonnet 5 | $0.00010 | $0.00589 |
| Haiku 4.5 | $0.00005 | $0.00295 |
Grade A, and why
cloudflare-d1:create-migration 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 544 lines — stays where its author put it; the contents beside it link to each section on GitHub.
D1 Create Migration Command
Overview
Guided migration creation with validation, SQL generation, and safe testing workflow.
Prerequisites
- Existing D1 database configured in wrangler.jsonc
- migrations/ directory exists (created during setup)
- wrangler CLI available
Steps
Step 1: Migration Type
Use AskUserQuestion to determine what kind of migration to create.
Prompt: "What type of migration are you creating?"
Options:
- "Add new table"
- "Modify existing table (add/remove columns)"
- "Add indexes"
- "Data migration (update existing records)"
- "Custom SQL"
Store as: migrationType
Step 2: Gather Migration Details
Based on migrationType, collect specific details:
If "Add new table":
Ask:
- Table name:
tableName - Columns (comma-separated):
columnsList- Example: "id INTEGER PRIMARY KEY, name TEXT, email TEXT UNIQUE"
- Add foreign keys? (yes/no):
hasForeignKeys- If yes, ask: "Which table.column?" →
foreignKeyReferences
- If yes, ask: "Which table.column?" →
If "Modify existing table":
Ask:
- Table name:
tableName - Change type:
- "Add column"
- "Drop column"
- "Rename column"
- Store as:
changeType
- Column details:
columnDetails
If "Add indexes":
Ask:
- Table name:
tableName - Columns to index (comma-separated):
indexColumns - Index type:
- "Single column index"
- "Composite index (multiple columns)"
- "Unique index"
- Store as:
indexType
If "Data migration":
Ask:
- Description of data change:
description - Warning: "Data migrations should be idempotent and tested in staging first. Proceed?"
If "Custom SQL":
Ask:
- "Provide SQL file path or paste SQL directly"
- Store as:
customSQL
Step 3: Generate Migration File
Create migration file with timestamp:
# Generate timestamp
TIMESTAMP=$(date +%Y%m%d%H%M%S)
# Create migration filename
MIGRATION_FILE="migrations/${TIMESTAMP}_<description>.sql"
Generate SQL based on migration type:
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.
- today First seen · 544 lines · 50 tokens per session scan A d7ab7ab80136
cloudflare-d1:create-migration is a command published in the GitHub repository secondsky/claude-skills (214 stars, last pushed yesterday), licensed MIT. It adds 50 tokens to every session and 2,945 once invoked, about $0.0003 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-09-03.
Other commands, from other repositories
correlate
Find related failures through pattern matching.
diff
Compare two command outputs with intelligent diff.
open
Open/retrieve an offloaded output by ID or shortcut.
search
Search through offloaded outputs with hard caps.
stats
Show FewWord session statistics with rich output and token savings.
timeline
Visual timeline of command outputs in current session.