migrating-apis

Implement API migrations between versions, platforms, or frameworks with minimal downtime. Use when upgrading APIs between versions. Trigger with phrases like "migrate the API", "upgrade API version", or "migrate to new API".

25 stars

Best use case

migrating-apis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Implement API migrations between versions, platforms, or frameworks with minimal downtime. Use when upgrading APIs between versions. Trigger with phrases like "migrate the API", "upgrade API version", or "migrate to new API".

Teams using migrating-apis should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/migrating-apis/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/jeremylongshore/claude-code-plugins-plus-skills/migrating-apis/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/migrating-apis/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How migrating-apis Compares

Feature / Agentmigrating-apisStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Implement API migrations between versions, platforms, or frameworks with minimal downtime. Use when upgrading APIs between versions. Trigger with phrases like "migrate the API", "upgrade API version", or "migrate to new API".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Migrating APIs

## Overview

Implement API migrations between versions, frameworks, or platforms with minimal downtime using strangler fig pattern, parallel running, and traffic shadowing. Generate migration plans that map old endpoints to new equivalents, transform request/response formats, and validate data consistency between legacy and target implementations.

## Prerequisites

- Source API codebase and OpenAPI specification accessible for analysis
- Target framework or platform environment provisioned and accessible
- Traffic routing capability for gradual cutover (reverse proxy, feature flags, or API gateway)
- Database migration tools if schema changes accompany the API migration (Flyway, Alembic, Prisma Migrate)
- Integration test suite covering all existing API consumers

## Instructions

1. Inventory all existing endpoints using Grep and Read, documenting HTTP methods, URL patterns, request/response schemas, authentication mechanisms, and consumer dependencies.
2. Generate an endpoint mapping table that pairs each legacy endpoint with its target equivalent, flagging breaking changes in URL structure, field names, data types, and authentication flow.
3. Create request/response adapters that transform legacy format to target format, handling field renames, nested-to-flat conversions, and enum value changes.
4. Implement a traffic router (reverse proxy rules or middleware) that directs requests to either the legacy or target implementation based on migration phase, endpoint, or feature flag.
5. Set up traffic shadowing to duplicate production requests to the target implementation without serving target responses, comparing outputs for data consistency validation.
6. Build a migration dashboard tracking per-endpoint migration status (legacy-only, shadow, canary, migrated), error rates, and latency comparison between implementations.
7. Execute phased cutover: shadow (compare only) -> canary (1% traffic to target) -> gradual ramp (10%, 25%, 50%, 100%) -> legacy decommission, with automatic rollback triggers.
8. Validate migration completeness by running the full integration test suite against the target implementation and comparing response bodies with legacy for a representative request sample.

See `${CLAUDE_SKILL_DIR}/references/implementation.md` for the full implementation guide.

## Output

- `${CLAUDE_SKILL_DIR}/migration/endpoint-mapping.json` - Legacy-to-target endpoint mapping with change annotations
- `${CLAUDE_SKILL_DIR}/migration/adapters/` - Request/response transformation functions per endpoint
- `${CLAUDE_SKILL_DIR}/migration/router.js` - Traffic routing middleware with phase-based switching
- `${CLAUDE_SKILL_DIR}/migration/shadow-compare.js` - Traffic shadow comparison and diff reporting
- `${CLAUDE_SKILL_DIR}/migration/dashboard.md` - Migration progress tracking per endpoint
- `${CLAUDE_SKILL_DIR}/tests/migration/` - Parity tests comparing legacy and target responses

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| Response mismatch in shadow | Target returns different data than legacy for same request | Log diff details; classify as expected (intentional change) or bug; fix before canary phase |
| Adapter transformation failure | Legacy request contains edge-case field values not handled by adapter | Add fallback handling; log unmatched fields; expand adapter test coverage |
| Rollback triggered | Canary error rate exceeds threshold (e.g., >2% 5xx) | Automatically route traffic back to legacy; alert migration team; analyze failures |
| Consumer authentication break | Target uses different auth scheme than legacy | Run auth adapter translating legacy tokens to target format during transition |
| Data inconsistency | Database schema migration introduced transformation errors | Run data validation queries comparing legacy and target data stores; fix transformation logic |

Refer to `${CLAUDE_SKILL_DIR}/references/errors.md` for comprehensive error patterns.

## Examples

**Express to FastAPI migration**: Migrate a Node.js Express API to Python FastAPI, using nginx as the traffic router, shadowing production traffic for 1 week, then canary-releasing endpoint by endpoint over 4 weeks.

**REST to GraphQL migration**: Implement GraphQL resolvers that call the existing REST endpoints internally, gradually replacing REST data fetching with direct database access while maintaining the REST surface via a thin GraphQL-to-REST adapter.

**Monolith to microservices**: Extract a user management module from a monolithic API into a standalone service, using the strangler fig pattern with API gateway routing to direct `/users/*` traffic to the new service while other endpoints remain on the monolith.

See `${CLAUDE_SKILL_DIR}/references/examples.md` for additional examples.

## Resources

- Strangler Fig Application pattern: Martin Fowler
- Feature flag services: LaunchDarkly, Unleash, Flagsmith
- Traffic shadowing with Envoy proxy or Istio service mesh
- Blue-green and canary deployment strategies

Related Skills

versioning-apis

25
from ComeOnOliver/skillshub

Implement API versioning with backward compatibility, deprecation notices, and migration paths. Use when managing API versions and backward compatibility. Trigger with phrases like "version the API", "manage API versions", or "handle API versioning".

throttling-apis

25
from ComeOnOliver/skillshub

Implement API throttling policies to protect backend services from overload. Use when controlling API request rates. Trigger with phrases like "throttle API", "control request rate", or "add throttling".

rate-limiting-apis

25
from ComeOnOliver/skillshub

Implement sophisticated rate limiting with sliding windows, token buckets, and quotas. Use when protecting APIs from excessive requests. Trigger with phrases like "add rate limiting", "limit API requests", or "implement rate limits".

monitoring-apis

25
from ComeOnOliver/skillshub

Build real-time API monitoring dashboards with metrics, alerts, and health checks. Use when tracking API health and performance metrics. Trigger with phrases like "monitor the API", "add API metrics", or "setup API monitoring".

mocking-apis

25
from ComeOnOliver/skillshub

Generate mock API servers for testing and development with realistic response data. Use when creating mock APIs for development and testing. Trigger with phrases like "create mock API", "generate API mock", or "setup mock server".

load-testing-apis

25
from ComeOnOliver/skillshub

Execute comprehensive load and stress testing to validate API performance and scalability. Use when validating API performance under load. Trigger with phrases like "load test the API", "stress test API", or "benchmark API performance".

generating-rest-apis

25
from ComeOnOliver/skillshub

Generate complete REST API implementations from OpenAPI specifications or database schemas. Use when generating RESTful API implementations. Trigger with phrases like "generate REST API", "create RESTful API", or "build REST endpoints".

fuzzing-apis

25
from ComeOnOliver/skillshub

This skill enables Claude to perform automated fuzz testing on APIs to discover vulnerabilities, crashes, and unexpected behavior. It leverages malformed inputs, boundary values, and random payloads to generate comprehensive fuzz test suites. Use this skill when you need to identify potential SQL injection, XSS, command injection vulnerabilities, input validation failures, and edge cases in APIs. Trigger this skill by requesting fuzz testing, vulnerability scanning, or security analysis of an API. The skill is invoked using the `/fuzz-api` command.

migrating-oracle-to-postgres-stored-procedures

25
from ComeOnOliver/skillshub

Migrates Oracle PL/SQL stored procedures to PostgreSQL PL/pgSQL. Translates Oracle-specific syntax, preserves method signatures and type-anchored parameters, leverages orafce where appropriate, and applies COLLATE "C" for Oracle-compatible text sorting. Use when converting Oracle stored procedures or functions to PostgreSQL equivalents during a database migration.

migrating-dbt-project-across-platforms

25
from ComeOnOliver/skillshub

Use when migrating a dbt project from one data platform or data warehouse to another (e.g., Snowflake to Databricks, Databricks to Snowflake) using dbt Fusion's real-time compilation to identify and fix SQL dialect differences.

migrating-dbt-core-to-fusion

25
from ComeOnOliver/skillshub

Classifies dbt-core to Fusion migration errors into actionable categories (auto-fixable, guided fixes, needs input, blocked). Use when a user needs help triaging migration errors to understand what they can fix vs what requires Fusion engine updates.

migrating-to-db

25
from ComeOnOliver/skillshub

Expert guidance for migrating Logseq graphs from Markdown (MD) format to the new Database (DB) format. Auto-invokes when users ask about MD to DB migration, converting graphs, import options, data transformation, or compatibility between Logseq versions. Covers migration strategies, common issues, and best practices.