agentleFS
levyfluxlevyflux/codex-skills/skills/release-sql-gate/SKILL.md

release-sql-gate

Skill1 starsChanged 3 months agoMITView on GitHub

Produce a deterministic manifest for SQL files changed between two Git refs, including exact order, SHA-256 hashes, and risk flags. Use before a release, deployment, migration handoff, or database runbook review; it inventories and validates SQL but never connects to a database or executes statements.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If more than one SQL file is present, provide an exact order file containing one repository-relative path per line:

    line 29
  2. Distinctive:

    Verify the declared order and its aggregate hash.

    line 46
  3. Distinctive:

    Add engine-specific dry-run, migration, rollback, and runtime evidence outside this manifest.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Release SQL Gate

Turn a Git diff into a reviewable, immutable SQL release manifest without executing database changes.

Boundaries

  • The helper is read-only with respect to Git and databases.
  • It never connects to a database, applies SQL, deploys, commits, or pushes.
  • Risk flags are lexical review cues, not a SQL parser or safety proof.
  • The operator must still verify engine compatibility, transaction behavior, backup/rollback, permissions, locks, data volume, and environment-specific order.

Generate a manifest

Requires Ruby 2.6 or newer and only the standard library.

ruby scripts/release_sql_manifest.rb \
  --repository /path/to/repository \
  --base origin/main \
  --head HEAD \
  --output release-sql-manifest.json

If more than one SQL file is present, provide an exact order file containing one repository-relative path per line:

ruby scripts/release_sql_manifest.rb \
  --repository . \
  --base origin/main \
  --head HEAD \
  --order-file sql-order.txt

The command fails closed when refs are invalid, a changed SQL file is absent from the selected tree, order entries are missing or duplicated, or the order file does not exactly match the diff.

Review the output

  1. Confirm repository root and resolved base/head SHAs.
  2. Confirm the three-dot diff is the intended release comparison.
  3. Review every SQL path, byte count, SHA-256, and risk flag.
  4. Verify the declared order and its aggregate hash.
  5. Add engine-specific dry-run, migration, rollback, and runtime evidence outside this manifest.
  6. Bind release authorization to the exact manifest and head SHA.

Report PASS, FAIL, or BLOCKED with the exact comparison, manifest path or digest, and remaining database evidence gaps.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.