Index of every page on this site: llms.txt
All skills
macro-inc avatar

/sqlx-migration

@3e0a52a
by Macromacro-inc/macro6.4k stars
606
Run it yourself

Create SQLx migration files with `sqlx migrate add <name>`. Use when asked to add, create, or generate a sqlx/sqlx-cli database migration.

Use this Skill: https://skilld.dev/gh/macro-inc/macro/sqlx-migration

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈39 tokens for metadata: the name and description. ≈321 when used: this file.

Description uses 1.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈155 characters, or 1.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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:

    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. Before pushing, run the migration-review skill on the finished file: it checks locks, rewrites, and compatibility with deployed code.

  8. 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.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a workflow for creating database migrations using the SQLx CLI. It uses standard development tools like cargo and just to manage the migration process within the macro-inc project structure. A minor risk is noted regarding indirect prompt injection since user-provided input is used in shell commands, though the instruction to format input as snake_case serves as a basic security measure.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 3e0a52a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week
What it can do
Runs commands Reads files Edits files
All 5 allowed tools
BashReadEditGlobGrep

README badge

README badge for macro-inc/macro/sqlx-migration