Sponsor Suno AI Music arrow_forward
Slash Command

Migrate Api

Migrate API to new version with compatibility layers and automated scripts

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Migrate Api is

Migrate Api is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Migrate Api gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Migrate Api

Claude Code

  1. Download migrate-api.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/api-development/api-migration-tool/commands/migrate-api.md, shared under the repository's MIT license. Read the full file on GitHub.

Orchestrate comprehensive API version migrations with automated compatibility layers, breaking change detection, and zero-downtime deployment strategies. This command manages the complete lifecycle of API evolution from initial analysis through deployment and deprecation.

Design Decisions

Architecture Approach:

  • Version routing at API gateway level for clean separation
  • Adapter pattern for backward compatibility transformations
  • Feature flags for gradual rollout control
  • Automated test generation across all supported versions

Alternatives Considered:

  • Hard cutover migration (rejected: high risk, no rollback)
  • Separate API endpoints per version (rejected: operational complexity)
  • GraphQL federation (chosen for microservices architectures)
  • BFF pattern for client-specific migrations

When to Use

USE when:

  • Introducing breaking changes to API contracts
  • Deprecating legacy endpoints with controlled timelines
  • Migrating between API paradigms (REST to GraphQL)
  • Evolving data models with backward incompatible changes
  • Implementing new authentication mechanisms
  • Consolidating multiple API versions

DON'T USE when:

  • Adding backward-compatible endpoints (use versioned routes)
  • Making internal refactoring without contract changes
  • Deploying hotfixes or security patches
  • Changes affect only implementation, not interface

Prerequisites

Required:

  • Complete OpenAPI/GraphQL schema for both versions
  • Comprehensive API test suite with >80% coverage
  • Version control with tagged releases
  • Deployment pipeline with rollback capability
  • API gateway with routing rules support
  • Monitoring and alerting infrastructure

Recommended:

  • Consumer registry with contact information
  • Deprecation policy documented and communicated
  • Traffic analysis showing endpoint usage patterns
  • Backward compatibility test matrix
  • Canary deployment environment

Migration Process

Step 1: Analysis and Impact Assessment

  • Scan API schemas to detect breaking changes
  • Analyze usage patterns from API logs
  • Identify affected consumers and endpoints
  • Calculate complexity score for migration effort
  • Generate compatibility matrix between versions

Step 2: Compatibility Layer Generation

  • Create adapter functions for data transformation
  • Generate request/response mappers automatically
  • Build version-specific validation schemas
  • Implement fallback logic for missing fields
  • Create deprecation warning middleware

Step 3: Migration Script Creation

  • Generate database migration scripts for schema changes
  • Create data backfill scripts for new required fields
  • Build rollback procedures for each migration step
  • Generate test fixtures for both API versions
  • Create automated smoke tests for critical paths

Step 4: Routing and Deployment Configuration

  • Configure API gateway version routing rules
  • Set up feature flags for gradual rollout
  • Implement traffic splitting for canary deployment
  • Configure monitoring dashboards for version metrics
  • Set up deprecation warning headers and logs

Step 5: Validation and Monitoring

  • Execute automated test suite across all versions
  • Verify backward compatibility with consumer tests
  • Monitor error rates and performance metrics
  • Track adoption rates for new version
  • Schedule deprecation timeline communications

Output Format

migration_plan:
  api_name: "User Service API"
  source_version: "v1"
  target_version: "v2"
  breaking_changes:
    - endpoint: "/users"
      change_type: "field_removed"
      field: "username"
      severity: "high"
      affected_consumers: 15
    - endpoint: "/users/{id}"
      change_type: "response_structure"
      details: "Nested address object"
      severity: "medium"
      affected_consumers: 8

  compatibility_layer:
    adapters_generated: 12
…

Code Examples

Example 1: REST API v1 to v2 Migration with Breaking Changes

// API v1 → v2 Migration: User endpoint restructure
// BREAKING: Flattened user object to nested structure

// Source: /api/v1/users/{id}
{
  "id": 123,
  "name": "John Doe",
  "email": "[email protected]",
  "street": "123 Main St",
  "city": "San Francisco",
  "state": "CA",
  "zip": "94105"
}

// Target: /api/v2/users/{id}
{
  "id": 123,
  "name": "John Doe",
…

Example 2: GraphQL Schema Evolution

# Schema v1 (Deprecated)
type User {
  id: ID!
  username: String!  # DEPRECATED: Replaced by email
  email: String
  fullName: String
}

type Query {
  user(id: ID!): User
  users: [User!]!
}

# Schema v2 (Current)
type Address {
  street: String!
  city: String!
  state: String!
…

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Migrate Api?

Migrate Api is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Migrate API to new version with compatibility layers and automated scripts

How do I install Migrate Api in Claude Code?

Download migrate-api.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Migrate Api in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Migrate Api safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.