Skip to content

// Django + DRF: serializers, viewsets, permissions, throttling, async views — production REST APIs.

Django REST Builder

skill --stat
  • last update

    May 23, 2026

  • license

    MITv1.0.0

  • format

    SKILL.md

quickstart.sh
3 steps
  1. Install

    // Downloads SKILL.md into ~/.claude/skills/django-rest-builder/

    $ curl -fsSL --create-dirs -o ~/.claude/skills/django-rest-builder/SKILL.md https://claudeskil.com/skills/django-rest-builder/SKILL.md
  2. Invoke

    // Inside Claude Code, type the skill name as a slash command

    > /django-rest-builder scaffold a typed REST endpoint
  3. Or just ask

    // Claude loads the skill by itself when a request matches its description

    > scaffold a typed REST endpoint
django-rest-builder/
references
SKILL.md
readonly
name:
Django REST Builder
slug:
django-rest-builder
version:
v1.0.0
license:
MIT
author:
@chiragthummar16
categories:
tags:
#django#drf#python#rest#postgres
description:

Django + DRF: serializers, viewsets, permissions, throttling, async views — production REST APIs.

features.md
6 capabilities

// What you can do with it

  • Serializers — generates serializers.ModelSerializer subclasses with explicit fields, nested relations, readonlyfields, and SerializerMethodField stubs where appropriate.
  • Viewsets & routers — produces ModelViewSet / ReadOnlyModelViewSet classes and registers them with DefaultRouter in urls.py.
  • Auth — wires restframeworksimplejwt (TokenObtainPairView, TokenRefreshView) or DRF's TokenAuthentication, including DEFAULTAUTHENTICATIONCLASSES.
  • Permissions & throttling — sets DEFAULTPERMISSIONCLASSES, custom BasePermission subclasses, and scoped ScopedRateThrottle / UserRateThrottle with rates in DEFAULTTHROTTLERATES.
  • OpenAPI docs — configures drf-spectacular (SpectacularAPIView, Swagger UI, Redoc).
  • Async views — scaffolds async def views compatible with ASGI for non-blocking endpoints.

README.md

django-rest-builder/README.md
7 sections

Django REST Builder

Django REST Builder scaffolds production-grade REST APIs on top of Django and Django REST Framework. It generates the serializers, viewsets, routers, permission classes, auth wiring, throttling, and OpenAPI schema you'd otherwise hand-write for every new app — following DRF conventions rather than a bespoke abstraction. It's aimed at backend and full-stack developers who already know Django and want a correct, opinionated starting point instead of copy-pasting boilerplate across projects.

When to use it

  • You're adding a new resource to an existing DRF project and want a ModelSerializer + ModelViewSet + router registration in one pass.
  • You're standing up a fresh API and need JWT or token auth, per-view throttling, and Swagger/Redoc docs configured coherently.
  • You want consistent permission patterns (IsAuthenticated, object-level checks, role gates) across many endpoints.
  • You need an async view for an I/O-bound endpoint and want it wired correctly under ASGI.

What it does

  • Serializers — generates serializers.ModelSerializer subclasses with explicit fields, nested relations, read_only_fields, and SerializerMethodField stubs where appropriate.
  • Viewsets & routers — produces ModelViewSet / ReadOnlyModelViewSet classes and registers them with DefaultRouter in urls.py.
  • Auth — wires rest_framework_simplejwt (TokenObtainPairView, TokenRefreshView) or DRF's TokenAuthentication, including DEFAULT_AUTHENTICATION_CLASSES.
  • Permissions & throttling — sets DEFAULT_PERMISSION_CLASSES, custom BasePermission subclasses, and scoped ScopedRateThrottle / UserRateThrottle with rates in DEFAULT_THROTTLE_RATES.
  • OpenAPI docs — configures drf-spectacular (SpectacularAPIView, Swagger UI, Redoc).
  • Async views — scaffolds async def views compatible with ASGI for non-blocking endpoints.

Usage

bash
curl -fsSL --create-dirs -o ~/.claude/skills/django-rest-builder/SKILL.md https://claudeskil.com/skills/django-rest-builder/SKILL.md

# then, inside your Django project:
"Build a REST API for the Order model with JWT auth, owner-only
write permissions, and 100/day throttling, plus Swagger docs."

Produces a serializer, a ModelViewSet, router registration, an IsOwnerOrReadOnly permission, throttle config, and a /api/schema/ + /api/docs/ route.

Tips & gotchas

  • SimpleJWT tokens are stateless — add rest_framework_simplejwt.token_blacklist to INSTALLED_APPS and run migrations if you need logout/revocation.
  • Async DRF views can't call the ORM synchronously; wrap queries in sync_to_async or use async ORM methods (aget, acreate), and run under an ASGI server like Uvicorn/Daphne.
  • ScopedRateThrottle needs a throttle_scope attribute on the view plus a matching key in DEFAULT_THROTTLE_RATES, or throttling silently no-ops.
  • Regenerate the schema after model changes; drf-spectacular reads annotations, so add @extend_schema for non-obvious request/response shapes.

FAQ

JWT or token auth — which does it scaffold? Either. Default is SimpleJWT (access/refresh pairs); ask for DRF TokenAuthentication if you want simple opaque tokens instead.

Does it touch my existing settings? It edits INSTALLED_APPS and the REST_FRAMEWORK dict additively and shows a diff before applying.

Postgres-specific? It targets Postgres for ArrayField/JSONField and indexes, but the generated DRF code runs on any Django-supported database.

$ cat reviews/

Reviews

// No reviews yet. Be the first.
Loading review form…

$ ls related/

explore all →