# Compile Migrations

> Compile SQL migration files into Go source code for embedding in binaries

- Skill: `c9s/compile-migrations` (Agent Skill)
- Install (CLI): `npx skillmds@latest add c9s/compile-migrations`
- Raw SKILL.md: https://api.skillmd.com/api/skills/c9s/compile-migrations/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: c9s (https://skillmd.com/u/c9s)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/c9s/compile-migrations

---


Compile SQL migrations into Go code for all configured dialects.

## Steps

1. Find all `rockhopper_*.yaml` config files in the project root.
2. If `$ARGUMENTS` is provided, use it as the base output directory. Otherwise, use `pkg/migrations/<dialect>` as the default output path for each dialect.
3. For each config file, run:
   ```bash
   rockhopper compile --config <config_file> --output <output_dir>
   ```
4. Show the generated Go files and confirm compilation succeeded.

