Agent skill

Sqlx Migration

by macro-inc in macro-inc/macro

Create SQLx migration files with sqlx migrate add <name. An agent skill from macro-inc/macro.

AGPL-3.0Auto-check: notesDatabases

Install Sqlx Migration

skills CLI
$ npx skills add macro-inc/macro --skill sqlx-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install macro-inc/macro sqlx-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/macro-inc/macro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pi/skills/sqlx-migration .claude/skills/sqlx-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sqlx-migration
GitHub stars
4.6k
Token cost
~334 tokens
SKILL.md length
151 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Create SQLx migration files with sqlx migrate add <name. An agent skill from macro-inc/macro.

  • Works in 7 steps: Identify the project or crate root where… → Convert the requested migration… → Run just setup_test_envs from the… → …
  • Generate a sqlx/sqlx-cli database migration
  • Calls cargo and just
  • Tasks that involve Database migrations

What it does

Sqlx Migration is an agent skill from macro-inc/macro. Create SQLx migration files with sqlx migrate add <name. Use when asked to add, create, or generate a sqlx/sqlx-cli database migration.

Its SKILL.md is about 330 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database migrations. The repository describes itself as: Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory. The licence is AGPL-3.0.

When your agent uses it

  • Generate a sqlx/sqlx-cli database migration
  • Tasks that involve Database migrations

Example prompts

  • “/sqlx-migration”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Edit, Glob, Grep

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Identify the project or crate root where SQLx migrations should live.
  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
  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 49418e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Edit
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • just

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sqlx Migration loads about 334 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 151 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~334

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Edit, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from macro-inc/macro at commit 49418e7, republished under its AGPL-3.0 licence (© macro-inc). 151 words, ~334 tokens.

Download SKILL.mdSave it as .claude/skills/sqlx-migration/SKILL.md (or your agent's skills folder).
name
sqlx-migration
description
Create SQLx migration files with `sqlx migrate add <name>`. Use when asked to add, create, or generate a sqlx/sqlx-cli database migration.
allowed-tools
Bash, Read, Edit, Glob, Grep

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.

© macro-inc, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .pi/skills/sqlx-migration of macro-inc/macro.

Open the folder on GitHubat commit 49418e7

Compare with similar skills

Sqlx Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sqlx Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sqlx Migration this skillmacro-inc/macro4.6k—~334Automated safety check: NotesAGPL-3.0
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0
Creating Database MigrationsNangoHQ/nango13k—~449Automated safety check: PassCustom licence
Openwrt Package UpdateNethServer/nethsecurity191—~841Automated safety check: PassCustom licence
Free Willsyahiidkamil/Software-Engineer-AI-Agent-Atlas401—~3.4kAutomated safety check: PassNone
Ecto Migrationsoperately/operately577—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • A skill your agent uses when adding or editing Nango database migrations - covers migration directory selection, timestamped .cjs naming, matching recent migration style, down migration decisions…

    13k GitHub stars~449 tokensUpdated today
    DatabasesAuto-check passed
  • Openwrt Package Update

    NethServer/nethsecurity

    A skill your agent uses when updating any forked OpenWrt package in a NethSecurity workspace from the upstream openwrt/packages feed.

    191 GitHub stars~841 tokensUpdated today
    DatabasesAuto-check passed
  • Free Will

    syahiidkamil/Software-Engineer-AI-Agent-Atlas

    Deliberate-choice procedure for a medium-to-high-stakes engineering fork — when the first plausible solution (the instinct, the default next-token pull) would be costly to get wrong.

    401 GitHub stars~3.4k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Ecto Migrations

    operately/operately

    Rules for Operately schema migrations (app/priv/repo/migrations/) and data migrations (app/lib/operately/data/change.ex).

    577 GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed
  • DB Migrate

    simstudioai/sim

    Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the -- migration-safe acknowledgment the…

    30k GitHub stars~2k tokensUpdated today
    DatabasesAuto-check passed

More from macro-inc/macro

All 19 skills in this repo
  • Mintlify API

    macro-inc/macro

    Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.

    4.6k GitHub starsUsed in 2 repos~333 tokens
    Auto-check passed
  • Add Tour

    macro-inc/macro

    Add or change an in-app feature tour (a view's guided flyover) in the web app.

    4.6k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Define Feature Flag

    macro-inc/macro

    Define a frontend feature flag with defineFlag and wire its readers.

    4.6k GitHub stars~780 tokensUpdated today
    Auto-check passed
  • Run App

    macro-inc/macro

    Run the Macro app on Cursor Cloud and pick up edits. An agent skill from macro-inc/macro.

    4.6k GitHub stars~712 tokensUpdated today
    Auto-check passed
  • Add SDK Endpoint

    macro-inc/macro

    Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped.

    4.6k GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Enforce hexagonal architecture in the Rust backend. An agent skill from macro-inc/macro.

    4.6k GitHub stars~3k tokensUpdated today
    Auto-check passed

Categories

Questions about Sqlx Migration

What does Sqlx Migration do?

Create SQLx migration files with sqlx migrate add <name. An agent skill from macro-inc/macro. Sqlx Migration is an agent skill from macro-inc/macro. Create SQLx migration files with sqlx migrate add <name.

When should I use Sqlx Migration?

Sqlx Migration fits situations like: generate a sqlx/sqlx-cli database migration; tasks that involve Database migrations.

How do I install Sqlx Migration in Claude Code?

Run `npx skills add macro-inc/macro --skill sqlx-migration -a claude-code`. Or copy the skill folder (.pi/skills/sqlx-migration in macro-inc/macro) into .claude/skills/sqlx-migration in your project. Claude Code loads it when a task matches its description.

How do I install Sqlx Migration in Codex?

Run `npx skills add macro-inc/macro --skill sqlx-migration -a codex`. Or copy the skill folder (.pi/skills/sqlx-migration in macro-inc/macro) into .agents/skills/sqlx-migration in your project. Codex loads it when a task matches its description.

Can I use Sqlx Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add macro-inc/macro --skill sqlx-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sqlx-migration, .gemini/skills/sqlx-migration, .github/skills/sqlx-migration and .opencode/skills/sqlx-migration in your project.

What does Sqlx Migration need to run?

Going by SKILL.md and its folder, Sqlx Migration needs the command-line tools its instructions call (cargo and just). Its frontmatter pre-approves these tools: Bash, Read, Edit, Glob, Grep.

Does Sqlx Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sqlx Migration safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Sqlx Migration use?

Sqlx Migration is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sqlx Migration use?

About 334 tokens (SKILL.md is roughly 1.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sqlx Migration?

Skills that share tags, products or a category with Sqlx Migration: Evolving The Data Model (TriliumNext/Trilium, 38k stars), Creating Database Migrations (NangoHQ/nango, 13k stars), Openwrt Package Update (NethServer/nethsecurity, 191 stars) and Free Will (syahiidkamil/Software-Engineer-AI-Agent-Atlas, 401 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sqlx Migration?

macro-inc (a GitHub organization) maintains it in macro-inc/macro, which has 4,590 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: macro-inc/macro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.