agentleFS
hoatv2211hoatv2211/GameStudio-CodexKIT/skills/game-database-migration-safety/SKILL.md

game-database-migration-safety

Skill3 starsChanged 3 months agoMITView on GitHub

Use when planning a game MySQL schema or data migration that requires 3306 or 3307 isolation, recognized schema gates, dry-run review, backup, restore, human approval, and zero credential exposure.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for MySQL schema migrations, data imports, stored procedure changes, seed changes, port moves, or cross-project database restoration.

    line 35
  2. Distinctive:

    Do not use to inspect static service topology only, and never apply when schema identity is unknown, backup is missing, restore is …

    line 38
  3. Distinctive:

    Verify project ownership, host, port, database, and schema version using read-only queries.

    line 47
  4. Distinctive:

    Create backup and restore plans without printing passwords or tokens.

    line 51
  5. Distinctive:

    Run a dry-run or disposable-fixture migration and capture output.

    line 53
  6. Distinctive:

    Never log or embed credentials in plans or evidence.

    line 70
  7. Very specific:

    Read references/commands.md for credential-safe inspection, backup, and restore patterns.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Game Database Migration Safety

Overview

Database changes remain plans until the target project, port, schema version, backup, restore, reviewer, and human approval are all verified.

When to use

Use for MySQL schema migrations, data imports, stored procedure changes, seed changes, port moves, or cross-project database restoration.

When NOT to use

Do not use to inspect static service topology only, and never apply when schema identity is unknown, backup is missing, restore is untested, or credentials would be exposed.

Required inputs and context discovery

Require project owner, host, isolated port, database name, observed schema version, expected schema, migration source and hash, backup path, restore command, downtime plan, reviewer, human approval, and validation queries.

Safety and risk level

This is high-risk. Unknown schema, ambiguous project ownership, unapproved ports, active production targets, missing backup, missing restore, missing reviewer, or missing human approval means BLOCKED.

Workflow

  1. Verify project ownership, host, port, database, and schema version using read-only queries. Completion criterion: unknown schema or target ambiguity is BLOCKED.
  2. Review the migration source, expected before/after schema, affected rows, and idempotency. Completion criterion: destructive or irreversible statements are identified before execution.
  3. Create backup and restore plans without printing passwords or tokens. Completion criterion: backup path, checksum, restore command, and validation query are documented.
  4. Run a dry-run or disposable-fixture migration and capture output. Completion criterion: apply remains prohibited on the real DB until fixture evidence and reviewer approval exist.
  5. Request explicit human approval for the exact target and maintenance window. Completion criterion: approval scope matches the reviewed plan.
  6. Apply, validate, and restore on failure only through an authorized project-specific runbook. Completion criterion: real execution is PASS, FAIL, or BLOCKED with evidence; this kit never assumes it occurred.

Evidence and output contract

Produce migration-safety-plan.json with target identity, port, schema, migration hash, dry-run, backup, restore, reviewer, approval status, validation queries, verdict, and limitations.

Handoff contract

Record target, schema evidence, migration hash, backup and restore paths, dry-run result, reviewer, approval status, blocked conditions, and next authorized action.

Pitfalls and anti-rationalization

  • Port 3306 is not automatically the intended project database.
  • A successful backup command without a validated file is insufficient.
  • Unknown schema never becomes “probably compatible.”
  • Never log or embed credentials in plans or evidence.

Verification checklist

  • Project, port, DB, and schema are recognized.
  • Migration source and destructive statements were reviewed.
  • Backup and restore are concrete.
  • Dry-run evidence exists.
  • Reviewer and human approval are explicit before apply.

References and scripts

Read references/commands.md for credential-safe inspection, backup, and restore patterns. Use the bundled scripts/db_safety.py for no-write planning. Real DB commands remain project-specific and require explicit approval.

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.