dmr-from-drf
Skill by wemake-services
Migrates a Django REST Framework API to django-modern-rest in bounded slices. It is for teams that want to keep routes, contracts, auth, throttling and pagination stable during the move.
Install dmr-from-drf
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wemake-services/django-modern-rest /tmp/django-modern-rest && mkdir -p ~/.claude/skills && cp -r /tmp/django-modern-rest/dmr/.agents/skills/dmr-from-drf ~/.claude/skills/dmr-from-drfRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wemake-services/django-modern-rest /tmp/django-modern-rest && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/django-modern-rest/dmr/.agents/skills/dmr-from-drf ~/.gemini/antigravity-cli/skills/dmr-from-drfAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through migrating the transport layer of a Django API from Django REST Framework to django-modern-rest. It starts by inventorying DRF views, viewsets, routers, serializers, and auth, permission and throttle classes, then builds a per-endpoint migration matrix. It asks the assistant to freeze observable behavior before coding and to choose an error strategy, either strict parity or approved DMR-native errors. Migration then proceeds slice by slice, replacing serializers with typed DTOs, handlers with DMR controllers, and router wiring with DMR routers. Business logic is left unchanged by default. The skill is aimed at developers maintaining existing Django projects that use DRF and want to move to django-modern-rest while tracking any intentional behavior changes in a three-part report.
Written from the project's SKILL.md and checked against it.
What it can do
- Inventory DRF surfaceFinds DRF views, viewsets, routers, serializers and auth classes and builds a per-endpoint matrix.
- Freeze observable behaviorCaptures routes, schemas, auth, throttling and pagination behavior before any code changes.
- Translate serializers to DTOsReplaces DRF serializers with explicit typed DTOs and maps body, query, path, header and cookie sources.
- Translate handlers to controllersReplaces APIView, GenericAPIView and ViewSet actions with DMR controllers and router composition.
- Replace API wiringSwaps DRF router registration and URL wiring for a DMR router and Django URL include.
- Port auth, permissions and throttlingKeeps endpoint-by-endpoint auth, permission and throttle behavior, including headers such as Retry-After.
- Update tests for DMRRebinds API test fixtures and clients to the migrated stack and checks contract assertions per endpoint.
- Report migration statusReports preserved behavior, approved drift and unresolved gaps at each checkpoint.
What you need
- An existing Django project that uses Django REST Framework
- django-modern-rest installed in the project
- Repository-native CI commands to validate each slice
- Docker, if the project's CI or test environment requires it
Try asking
- Inventory the DRF endpoints in this project and build a migration matrix.
- Migrate the orders app from DRF viewsets to django-modern-rest controllers.
- Convert these DRF serializers into typed DMR DTOs without changing the API contract.
Good to know
- Business logic is left unchanged unless the user explicitly asks otherwise.
- Any intentional behavior change must be listed as approved drift.
- Response validation must be enabled in local development and testing.
- djangorestframework should be removed from dependencies only after migrated API surfaces pass CI, unless the user approves keeping it.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: dmr/.agents/skills/dmr-from-drf/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to dmr-from-drf
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
dmr-from-drf: common questions
Does this skill change business logic during a DRF to django-modern-rest migration?
No, the skill keeps usecases, services and repositories untouched by default and changes only DTOs, controllers and router wiring. Business logic is changed only if the user explicitly asks.
How does the skill handle error responses when moving to django-modern-rest?
The user must choose either strict parity, which keeps existing error statuses and payloads, or approved DMR-native errors, which updates tests and docs to match. The choice is recorded before edits begin.
Can the skill keep existing DRF token authentication models?
The skill suggests keeping an existing Opaque Token model by swapping DMR's default Token model for it, and asks the user about this explicitly.
How do I install dmr-from-drf?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is dmr-from-drf free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is dmr-from-drf safe to use?
It scores 79 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to dmr-from-drf?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
