framework-migration-assistant — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited framework-migration-assistant (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
# Navigate to your repository
cd /path/to/your/repo
# Run migration
python scripts/migrate.py . --from flask --to fastapiThe migration process will:
# 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!What gets migrated:
@app.route() → @app.get(), @app.post(), etc.request.args → query parameters, request.json → Pydantic modelsjsonify() → direct returnExample transformation:
Before (Flask):
@app.route('/users/<int:user_id>', methods=['GET'])
def get_user(user_id):
user = db.get_user(user_id)
return jsonify(user)After (FastAPI):
@app.get('/users/{user_id}')
async def get_user(user_id: int) -> UserSchema:
user = await db.get_user(user_id)
return userWhat gets migrated:
The migration tool automatically:
Updates package dependencies:
requirements.txtpyproject.tomlExample 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.6Transforms route definitions and handlers:
Updates configuration files:
Adapts test files:
Creates a comprehensive report:
MIGRATION_SUMMARY.jsonpython 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)You can also run individual migration steps:
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()After migration completes:
git log --oneline
git diff main..migrate-flask-to-fastapi pip install -r requirements.txt pytest uvicorn main:app --reload git checkout main
git merge migrate-flask-to-fastapiExample applications are provided in assets/:
example_flask_app.py - Flask application before migrationexample_fastapi_app.py - Same application after migration to FastAPICompare these files to understand the transformations applied.
After migration, review MIGRATION_SUMMARY.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": [...]
}Issue: Import errors after migration
pip install -r requirements.txtIssue: Tests fail with async errors
@pytest.mark.asyncio and install pytest-asyncioIssue: Database connections fail
Issue: CORS errors
See references/migration_guide.md for detailed troubleshooting.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.