Agent skill

Framework Migration Assistant

by ArabelaTso in ArabelaTso/Skills-4-SE

Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

Apache-2.0Auto-check passedBackend & APIs

Install Framework Migration Assistant

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill framework-migration-assistant -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE framework-migration-assistant --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/framework-migration-assistant .claude/skills/framework-migration-assistant && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
framework-migration-assistant
GitHub stars
253
Token cost
~1.9k tokens
SKILL.md length
553 words
Files
11 (incl. scripts, references, assets)
Skills in repo
151
Repo updated
First seen
Licence
Apache-2.0

At a glance

Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

  • Works in 6 steps: Preparation → Dependency Migration → Route Migration → …
  • You need to migrate an existing web application to a modern framework while preserving functionality
  • SKILL.md covers Overview, Quick Start, Supported Migration Paths and Migration Process, plus 7 more sections
  • Runs Python scripts from its folder; calls git, python and pip

What it does

Framework Migration Assistant is an agent skill from ArabelaTso/Skills-4-SE. Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI). Use when you need to migrate an existing web application to a modern framework while preserving functionality. The skill analyzes the codebase, updates routes, handlers, configuration, dependency injection patterns, and tests. Creates git commits for each migration phase and generates a comprehensive summary of all changes. Supports automatic dependency updates, code transformations, and test adaptations.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts, reference files and assets (for example `assets/example_fastapi_app.py`, `assets/example_flask_app.py` and `references/framework_comparison.md`).

It sits in Backend & APIs, covering Backend development, Code migrations and Design patterns. It works with FastAPI, Django, Flask and Python. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • You need to migrate an existing web application to a modern framework while preserving functionality
  • Tasks that involve Backend development
  • Tasks that involve Code migrations

Example prompts

  • “/framework-migration-assistant”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Preparation
  2. Dependency Migration
  3. Route Migration
  4. Configuration Migration
  5. Test Migration
  6. Summary Generation

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python
    • pip
    • pytest
    • uvicorn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Framework Migration Assistant loads about 1.9k tokens when it runs, and up to ~8.5k if it reads all its reference files. Until then it costs about 135 tokens; SKILL.md has 553 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 553 words, ~1,898 tokens.

Download SKILL.mdSave it as .claude/skills/framework-migration-assistant/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
framework-migration-assistant
description
Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI). Use when you need to migrate an existing web application to a modern framework while preserving functionality. The skill analyzes the codebase, updates routes, handlers, configuration, dependency injection patterns, and tests. Creates git commits for each migration phase and generates a comprehensive summary of all changes. Supports automatic dependency updates, code transformations, and test adaptations.

Framework Migration Assistant

Overview

This skill automatically migrates Python web applications between frameworks, transforming code, configuration, and tests while preserving existing functionality. It handles route migration, request/response patterns, dependency injection, configuration updates, and test adaptations, committing changes incrementally with detailed summaries.

Quick Start

Basic Usage
bash
# Navigate to your repository
cd /path/to/your/repo

# Run migration
python scripts/migrate.py . --from flask --to fastapi

The migration process will:

  1. Create a migration branch
  2. Analyze your codebase
  3. Update dependencies
  4. Migrate routes and handlers
  5. Update configuration
  6. Adapt tests
  7. Generate a summary report
Example: Flask to FastAPI
bash
# Migrate Flask app to FastAPI
python scripts/migrate.py /path/to/flask-app --from flask --to fastapi

# Output:
# ✓ Created migration branch: migrate-flask-to-fastapi
# ✓ Analyzing codebase...
# ✓ Found 15 route files
# ✓ Found 23 test files
# ✓ Migrating dependencies...
# ✓ Migrating routes...
# ✓ Migrating configuration...
# ✓ Migrating tests...
# ✓ Migration completed successfully!

Supported Migration Paths

Flask → FastAPI

What gets migrated:

  • Route decorators: @app.route() → @app.get(), @app.post(), etc.
  • Request handling: request.args → query parameters, request.json → Pydantic models
  • Response handling: jsonify() → direct return
  • Configuration: Flask config → Pydantic Settings
  • Tests: Flask test client → FastAPI TestClient
  • Dependencies: Flask packages → FastAPI equivalents

Example transformation:

Before (Flask):

python
@app.route('/users/<int:user_id>', methods=['GET'])
def get_user(user_id):
    user = db.get_user(user_id)
    return jsonify(user)

After (FastAPI):

python
@app.get('/users/{user_id}')
async def get_user(user_id: int) -> UserSchema:
    user = await db.get_user(user_id)
    return user
Django → FastAPI

What gets migrated:

  • URL patterns → FastAPI routes
  • Django views → FastAPI path operations
  • Django ORM references → SQLAlchemy patterns
  • Settings module → Pydantic Settings
  • Django test cases → FastAPI tests

Migration Process

Phase 1: Preparation

The migration tool automatically:

  • Validates the repository is a git repo
  • Detects the source framework (if not specified)
  • Creates a migration branch
  • Analyzes the codebase structure
Phase 2: Dependency Migration

Updates package dependencies:

  • requirements.txt
  • pyproject.toml
  • Replaces framework-specific packages
  • Adds required FastAPI dependencies

Example changes:

flask>=2.0.0          → fastapi>=0.104.0
werkzeug>=2.0.0       → uvicorn[standard]>=0.24.0
flask-cors>=3.0.0     → fastapi-cors>=0.0.6
Phase 3: Route Migration

Transforms route definitions and handlers:

  • Updates route decorators
  • Converts HTTP method specifications
  • Transforms path parameters
  • Updates request/response handling
  • Adds async/await where needed
  • Adds type hints for validation
Phase 4: Configuration Migration

Updates configuration files:

  • Migrates Flask config to Pydantic Settings
  • Updates environment variable handling
  • Converts middleware setup
  • Updates CORS configuration
  • Creates new config files if needed
Phase 5: Test Migration

Adapts test files:

  • Updates test client initialization
  • Converts test assertions
  • Updates request methods
  • Adapts fixtures and mocks
  • Adds async test support
Phase 6: Summary Generation

Creates a comprehensive report:

  • Total changes made
  • Files modified by category
  • Migration plan executed
  • Next steps for manual review
  • Saved as MIGRATION_SUMMARY.json

Using the Migration Scripts

Main Migration Script
bash
python scripts/migrate.py <repo_path> --from <source> --to <target>

# Options:
#   repo_path: Path to the repository
#   --from: Source framework (flask, django, or auto)
#   --to: Target framework (fastapi)
Individual Migration Modules

You can also run individual migration steps:

python
from migrate_dependencies import DependencyMigrator
from migrate_routes import RouteMigrator
from migrate_config import ConfigMigrator
from migrate_tests import TestMigrator

# Run specific migration
migrator = RouteMigrator(repo_path, 'flask', 'fastapi')
migrator.migrate()
Show full SKILL.md (243 more words)Show less

Post-Migration Steps

After migration completes:

  1. Review the changes

    bash
    git log --oneline
    git diff main..migrate-flask-to-fastapi
  2. Install new dependencies

    bash
    pip install -r requirements.txt
  3. Run tests

    bash
    pytest
  4. Manual review needed for:

    • Complex authentication logic
    • Custom middleware
    • Database connection strings
    • Third-party integrations
    • Advanced error handling
  5. Test the application

    bash
    uvicorn main:app --reload
  6. Merge when ready

    bash
    git checkout main
    git merge migrate-flask-to-fastapi

Reference Documentation

  • references/framework_comparison.md - Detailed comparison of Flask, Django, and FastAPI including architecture, routing, request handling, and performance
  • references/migration_guide.md - Comprehensive migration guide with step-by-step instructions, common patterns, troubleshooting, and post-migration checklist
  • references/migration_patterns.md - Common migration patterns for routes, requests, responses, authentication, database operations, and testing

Example Applications

Example applications are provided in assets/:

  • example_flask_app.py - Flask application before migration
  • example_fastapi_app.py - Same application after migration to FastAPI

Compare these files to understand the transformations applied.

Migration Summary

After migration, review MIGRATION_SUMMARY.json:

json
{
  "source_framework": "flask",
  "target_framework": "fastapi",
  "total_changes": 47,
  "changes_by_type": {
    "dependency": 5,
    "route": 15,
    "config": 4,
    "test": 23
  },
  "files_modified": [...],
  "next_steps": [...]
}

Tips

  • Always commit or backup your code before migration
  • Review each migration commit individually
  • Test thoroughly after migration
  • Update documentation to reflect framework changes
  • Consider performance improvements with async/await
  • Use the generated API documentation (FastAPI auto-generates OpenAPI docs)
  • Consult reference documentation for complex patterns
  • Run tests frequently during manual adjustments

Troubleshooting

Issue: Import errors after migration

  • Solution: Run pip install -r requirements.txt

Issue: Tests fail with async errors

  • Solution: Add @pytest.mark.asyncio and install pytest-asyncio

Issue: Database connections fail

  • Solution: Update connection strings for async SQLAlchemy

Issue: CORS errors

  • Solution: Configure CORS middleware in FastAPI

See references/migration_guide.md for detailed troubleshooting.

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references, assets) in skills/framework-migration-assistant of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • assets/example_fastapi_app.py
  • assets/example_flask_app.py
  • references/framework_comparison.md
  • references/migration_guide.md
  • references/migration_patterns.md
  • scripts/migrate.py
  • scripts/migrate_config.py
  • scripts/migrate_dependencies.py
  • scripts/migrate_routes.py
  • scripts/migrate_tests.py

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Framework Migration Assistant next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Framework Migration Assistant compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Framework Migration Assistant this skillArabelaTso/Skills-4-SE253—~1.9kAutomated safety check: PassApache-2.0
Pydanticbobmatnyc/claude-mpm155—~8.4kAutomated safety check: NotesCustom licence
Fix Slow Endpointvpcarlos/profyle123—~2.1kAutomated safety check: PassMIT
Mastering Python SkillSpillwaveSolutions/agent-brain120—~1.4kAutomated safety check: NotesMIT
Sentry Python SDKgetsentry/sentry-for-ai268—~4.1kAutomated safety check: PassApache-2.0
Python Appservice Deploymicrosoft/GitHub-Copilot-for-Azure2551 repos~688Automated safety check: PassMIT

Similar skills

  • Pydantic

    bobmatnyc/claude-mpm

    Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.

    155 GitHub stars~8.4k tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes
  • Fix Slow Endpoint

    vpcarlos/profyle

    Diagnose and fix a slow endpoint or request in a Python web app (FastAPI, Flask, Django, Tornado, any ASGI/WSGI framework) using real Profyle/VizTracer traces, then prove the fix by replaying the…

    123 GitHub stars~2.1k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Mastering Python Skill

    SpillwaveSolutions/agent-brain

    Modern Python coaching covering language foundations through advanced production patterns.

    120 GitHub stars~1.4k tokensUpdated 17 days ago
    DevelopmentAuto-check: notes
  • Sentry Python SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Python. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~4.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Python Appservice Deploy

    microsoft/GitHub-Copilot-for-Azure

    Official

    Deploy Python (Flask/Django/FastAPI) code to Azure App Service Linux.

    255 GitHub starsUsed in 1 repo~688 tokens
    Backend & APIsAuto-check passed
  • Fastapi Backend

    cohen-liel/hivemind

    FastAPI best practices for building production Python backends.

    110 GitHub stars~710 tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed

More from ArabelaTso/Skills-4-SE

All 151 skills in this repo
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Taint Instrumentation Assistant

    ArabelaTso/Skills-4-SE

    Instruments code to track the flow of untrusted or sensitive data at runtime, enabling detection of injection vulnerabilities, data leaks, and privilege violations.

    253 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Framework Migration Assistant

What does Framework Migration Assistant do?

Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI). Framework Migration Assistant is an agent skill from ArabelaTso/Skills-4-SE. Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

When should I use Framework Migration Assistant?

Framework Migration Assistant fits situations like: you need to migrate an existing web application to a modern framework while preserving functionality; tasks that involve Backend development; tasks that involve Code migrations.

How do I install Framework Migration Assistant in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill framework-migration-assistant -a claude-code`. Or copy the skill folder (skills/framework-migration-assistant in ArabelaTso/Skills-4-SE) into .claude/skills/framework-migration-assistant in your project. Claude Code loads it when a task matches its description.

How do I install Framework Migration Assistant in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill framework-migration-assistant -a codex`. Or copy the skill folder (skills/framework-migration-assistant in ArabelaTso/Skills-4-SE) into .agents/skills/framework-migration-assistant in your project. Codex loads it when a task matches its description.

Can I use Framework Migration Assistant in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill framework-migration-assistant -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/framework-migration-assistant, .gemini/skills/framework-migration-assistant, .github/skills/framework-migration-assistant and .opencode/skills/framework-migration-assistant in your project.

What does Framework Migration Assistant need to run?

Going by SKILL.md and its folder, Framework Migration Assistant needs Python for the scripts in its folder and the command-line tools its instructions call (git, python, pip, pytest and uvicorn). Our summary lists: Python 3.

Does Framework Migration Assistant access the network?

SKILL.md contains no URLs. Its commands use git and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Framework Migration Assistant safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Framework Migration Assistant use?

Framework Migration Assistant is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Framework Migration Assistant use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.6k tokens, read only when the agent opens those files.

What are the alternatives to Framework Migration Assistant?

Skills that share tags, products or a category with Framework Migration Assistant: Pydantic (bobmatnyc/claude-mpm, 155 stars), Fix Slow Endpoint (vpcarlos/profyle, 123 stars), Mastering Python Skill (SpillwaveSolutions/agent-brain, 120 stars) and Sentry Python SDK (getsentry/sentry-for-ai, 268 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Framework Migration Assistant?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 151 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.