sqlx-migration
The sqlx-migration skill automates creation of SQLx database migration files using the SQLx CLI command `sqlx migrate add` instead of manual file creation. Use this skill when asked to add, create, or generate a migration file for a SQLx-based Rust project, as it ensures proper timestamping and file structure while allowing subsequent SQL content to be added to the generated file.
git clone --depth 1 https://github.com/macro-inc/macro /tmp/sqlx-migration && cp -r /tmp/sqlx-migration/.pi/skills/sqlx-migration ~/.claude/skills/sqlx-migrationSKILL.md
# SQLx Migration Use the SQLx CLI to create migration files instead of manually creating timestamped files. ## Instructions 1. Identify the project or crate root where SQLx migrations should live. - Prefer the directory that contains an existing `migrations/` directory. - If there are multiple crates/projects, ask the user which one unless the target is obvious. 2. Convert the requested migration description to a short snake_case name, for example `create_users_table`. 3. Run `just setup_test_envs` from the project root 4. Run the SQLx CLI from `crates/macro_db_client` folder: ```bash cargo sqlx migrate add name_of_migration ``` Replace `name_of_migration` with the actual snake_case migration name. 5. Do not manually add timestamps or hand-create migration filenames; `sqlx migrate add` generates the correct timestamped file. 6. After the command succeeds, read the generated migration file and add the requested SQL changes there. 7. If `sqlx` is not installed or not on `PATH`, stop and tell the user to install `sqlx-cli` rather than manually creating the migration file.
Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped. Use when `just coverage` fails, or after adding an endpoint to a Rust service.
Enforce hexagonal architecture in the Rust backend. Use before modifying crates/ or Rust services, especially inbound axum/tool/listener adapters, domain services/ports, outbound adapters, authorization, permissions, database access, or external clients.
Build a new AI tool end-to-end — Rust implementation, toolset wiring, infra, schema generation, and frontend UI.
Find all open Dependabot alerts for this repo and create a plan to resolve them using the appropriate package manager overrides (pnpm, bun, npm, cargo).
Dump clean Postgres schema to a file and copy path to clipboard.
>-
Build and maintain documentation sites with Mintlify. Use when creating docs pages, configuring navigation, adding components, or setting up API references.