dmr-from-django-ninja

dmr-from-django-ninja is a skill for Claude Code, Codex from wemake-services/django-modern-rest. It costs 68 tokens per session (1,909 once invoked), scanned A, original, MIT.

A migration guide for moving a Django API from django-ninja or ninja-extra to django-modern-rest. It focuses on replacing the API layer while keeping routes, data formats, authentication, request limits, and tests consistent.

In plain words
What is it for?
Use it to replace Ninja controllers, schemas, routes, authentication, throttling, and exception handling with django-modern-rest controllers, routers, and typed data objects.
Why use it?
It removes the need to plan this framework change from scratch and helps avoid accidental changes to how the API behaves. Business logic is kept unchanged unless you explicitly request otherwise.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Part of the dmr-from-django-ninja plugin — 1 skill shipped together

Good fit Use it to replace Ninja controllers, schemas, routes, authentication, throttling, and exception handling with django-modern-rest controllers, routers, and typed data objects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wemake-services/django-modern-rest/dmr-from-django-ninja
About the project

django-modern-rest is a typed REST framework for Django, the Python web framework, for building APIs that exchange data with clients over HTTP. It is for Django developers who need asynchronous support, schema validation, multiple data formats, and generated OpenAPI descriptions. The catalogue add-ons provide plugins and skills for developing with the framework.

wemake-services/django-modern-rest · 1,519 stars · on GitHub · django-modern-rest.rtfd.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wemake-services/django-modern-rest --skill dmr-from-django-ninja
Clone the repo
git clone --depth 1 https://github.com/wemake-services/django-modern-rest

Made for: Claude Code, Codex.

Or install dmr-from-django-ninja, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dmr-from-django-ninja

README.md
[![agentmods](https://agentmods.dev/badge/skills/wemake-services/django-modern-rest/dmr-from-django-ninja/github.svg)](https://agentmods.dev/skills/wemake-services/django-modern-rest/dmr-from-django-ninja)
Your own site
<a href="https://agentmods.dev/skills/wemake-services/django-modern-rest/dmr-from-django-ninja"><img src="https://agentmods.dev/badge/skills/wemake-services/django-modern-rest/dmr-from-django-ninja/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dmr-from-django-ninja

Your own site · 80×15
<a href="https://agentmods.dev/skills/wemake-services/django-modern-rest/dmr-from-django-ninja"><img src="https://agentmods.dev/badge/skills/wemake-services/django-modern-rest/dmr-from-django-ninja.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.01909
Opus 5.5 $0.00027 $0.00764
Sonnet 5.5 $0.00014 $0.00382
Haiku 4.5 $0.00007 $0.00191

Measured yesterday against content hash 0dda436c77f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dmr-from-django-ninja scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dmr/.agents/skills/dmr-from-django-ninja/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DMR from django-ninja

Overview

Migrate django-ninja / ninja-extra transport layer to django-modern-rest incrementally. Keep business logic unchanged unless user explicitly asks.

Required docs (always reference first):

Migration Policy

  • Default mode: strict transport parity.
  • Preserve by default: paths, methods, request/response schemas, status codes, headers, auth semantics, throttling semantics.
  • If user approves drift (for example switching to DMR-native error format/status), stop forcing legacy behavior and document this as approved drift.
  • Never mix implicit drift: every intentional mismatch must be explicitly listed.
  • Do not preserve Ninja infrastructure internals as implementation strategy. Keep observable contracts, but realize them with DMR + project-native libraries.

Workflow

Inventory Ninja surface

  • Read project API entrypoints and URL wiring first.
  • Find usages of: NinjaExtraAPI, api_controller, http_get/http_post/..., ninja.Schema, ninja_jwt, Ninja exception handlers, Ninja throttles.
  • Build per-endpoint migration matrix:
    • path, method, auth, throttle, input DTO, output DTO,
    • expected statuses, expected headers,
    • known error paths.

Inventory project-native batteries (required)

  • Before writing adapters, inspect existing project libraries and integrations that should power the migrated transport layer.
  • Prefer libraries already used by the project ("Django batteries") through DMR mechanisms over custom wrappers.
  • Examples:
    • rate limiting: prefer django-ratelimit integration when it exists, instead of wrapping Ninja throttles,
    • auth/account lockout: prefer existing project auth stack (e.g. axes/middleware) instead of reusing Ninja-specific auth internals.

Freeze observable behavior

  • Capture behavior from existing tests + DTOs + routing.
  • Mark blocking mismatches before coding:
    • route/method changes,
    • schema field changes,
    • auth/throttle changes,
    • status/header changes.

Read the full file on GitHub · 196 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 196 lines · 68 tokens per session scan A 0dda436c77f1

Subscribe to this mod's changes

dmr-from-django-ninja is a skill published in the GitHub repository wemake-services/django-modern-rest (1,519 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 1,909 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.