# Compile Migrations

> Compile Migrations is an Agent Skill for development published in the c9s/bbgo repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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

- Skill name: `compile-migrations`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/c9s/bbgo/blob/HEAD/.claude/skills/compile-migrations/SKILL.md
- Repository: c9s/bbgo (1,662 GitHub stars when collected)

## SKILL.md

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.

---

Source: https://www.openparable.com/skill/development/compile-migrations (OpenParable). Cite the canonical URL above.
