agentleFS
TylerAkinsTylerAkins/ai-agent-skills/skills/safe-migrations/SKILL.md

safe-migrations

Skill1 starsChanged 31 days agoMITView on GitHub

Plan and implement compatible transitions for APIs, services, dependencies, configuration, and persisted data, including deprecation and removal. Use when replacing an interface or system, retiring behavior, or changing schemas with active consumers. Verify staged compatibility, cutover, and recovery within authorization.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    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:

    Read anti-ai-writing before drafting plans, notices, or reports.

    line 12
  2. Distinctive:

    Read repository instructions, current implementation, supported versions, consumers, deployment topology, tests, and relevant operational …

    line 19
  3. Distinctive:

    Use agent-planning for consequential multi-stage work.

    line 40
  4. Distinctive:

    Keep the plan proportional.

    line 43
  5. Distinctive:

    Avoid introducing flags, dual writes, or permanent adapters without a concrete need.

    line 60
  6. Distinctive:

    When used, define their ownership, consistency rules, rollback limits, and eventual removal conditions.

    line 61
  7. Distinctive:

    Before cutover, safely verify the recovery procedure against the candidate and representative state.

    line 86
  8. Distinctive:

    Use ci-cd-workflows for staged automation and code-review for consequential migration review when independence is available and authorized.

    line 93
  9. Distinctive:

    Before contracting or deleting, verify migrated consumers, disabled old writers, completed reconciliation, and support obligations.

    line 100
  10. Distinctive:

    Remove retired code, configuration, jobs, flags, and obsolete tests within scope.

    line 106

≈ “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

Safe Migrations

Read anti-ai-writing before drafting plans, notices, or reports. Distinguish planning, implementation, live execution, and removal. Preserve authorization already given, but do not infer production writes, consumer notifications, destructive execution, or publication from a request to prepare a migration.

1. Establish the contract and consumers

Read repository instructions, current implementation, supported versions, consumers, deployment topology, tests, and relevant operational evidence. Verify tool, database, and framework semantics against their actual versions and official documentation. Define the reason for the transition, required replacement behavior, scope, owners, and accepted breaking changes. Retirement without a replacement can be intentional; record that decision rather than inventing an alternative or deadline.

Trace published interfaces, dynamic names, configuration, generated clients, jobs, integrations, offline clients, persisted formats, and external consumers. Search results and low traffic alone do not establish absence of dependency. Record what is verified, unknown, and outside available visibility.

Compare old/new behavior across inputs, outputs, errors, defaults, identity, ordering, authorization, tenant scope, and side effects. Separate supported contracts from incidental observations, but investigate observable behavior consumers may rely on. An additive field, new enum value, or changed default can still break a consumer. Apply the project's versioning and support policy; use semantic versioning only where that is the established public version contract.

2. Plan independently verifiable stages

Use agent-planning for consequential multi-stage work. Record phase order, compatible version combinations, success evidence, abort criteria, recovery actions, and the point beyond which reverting code is insufficient. Keep the plan proportional; a local dependency upgrade does not need a service cutover ceremony. For persisted data, read database and backfill guidance. For database operations, verify version-specific lock and rewrite behavior and record representative rehearsal evidence before advancing. Prepare actionable recovery for every cutover, not only database changes. When reversal is impossible, define the restoration or forward-repair path and identify the irreversible boundary.

Choose a transition based on the actual boundary:

ApproachAppropriate use
Expand, migrate, contractOld/new interfaces or data shapes must coexist during rollout.
Compatibility adapterPreserve a supported interface while changing its implementation.
Incremental routingMove consumer cohorts or traffic between implementations with observable recovery.
Coordinated cutoverAn accepted outage or atomic deployment boundary makes coexistence unnecessary.

Avoid introducing flags, dual writes, or permanent adapters without a concrete need. When used, define their ownership, consistency rules, rollback limits, and eventual removal conditions. Shadow execution must not duplicate external writes or other side effects. Isolate cohorts and telemetry without leaking tenant data.

For public deprecation, prepare a notice with reason, affected versions, supported replacement or retirement outcome, migration steps, and accepted support/removal dates. Do not invent a notice period or announce an unapproved deadline. Provide tooling or examples proportional to consumer effort. Draft locally; publish or contact owners only under applicable authorization.

3. Implement and verify the transition

Preserve unrelated work and make stages reviewable. Confirm compatibility across old/new producers and consumers, rollout order, mixed versions, retries, and relevant failure paths. Use test-authoring for independently justified expectations. Verify migrations against representative existing state, not just clean installation. Reconcile new-install and upgraded-system behavior. Rehearse first with representative data in an isolated safe environment. Shared staging execution requires separate authorization and cannot replace that rehearsal.

Tie operational evidence to the exact candidate, schema/data state, environment, and cohort. Define parity checks that detect missing records, altered identities, ordering, or unauthorized access rather than relying only on totals. Investigate differences before promoting a stage.

Before cutover, safely verify the recovery procedure against the candidate and representative state. Record the observed result, including restoration or forward repair when reversal is impossible. A documented but untested procedure does not satisfy this gate. If required verification fails or cannot be performed safely, report the missing evidence and hold cutover; continue only independent authorized preparation. Do not substitute confidence for recovery evidence.

Use ci-cd-workflows for staged automation and code-review for consequential migration review when independence is available and authorized. A passing suite alone does not authorize live cutover or establish consumer readiness.

4. Remove only after readiness is supported

Before contracting or deleting, verify migrated consumers, disabled old writers, completed reconciliation, and support obligations. Choose a representative observation window based on actual usage cycles, including scheduled jobs and offline clients. Account for telemetry gaps and dormant consumers; zero observed requests is not proof of zero dependency. Keep recovery viable until the accepted removal boundary.

Remove retired code, configuration, jobs, flags, and obsolete tests within scope. Preserve tests for continuing contracts, required historical migrations, and useful migration/version history. Do not delete records merely because active usage ended. Resolve unknown consumers or obtain an explicit risk decision before destructive work.

Report implemented stages separately from executed migration, verified cutover, and completed retirement. State remaining dependencies, irreversible effects, and verification limits. Commit, push, and publication require authorization through git-delivery.

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.