Django REST Framework patterns for serializers, viewsets, permissions, and throttling. Load before any edit to a serializer, viewset, or API view, however small, and for DRF questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Drf Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-drf-patterns)
---
name: drf-patterns
description: Django REST Framework patterns for serializers, viewsets, permissions, and throttling. Load before any edit to a serializer, viewset, or API view, however small, and for DRF questions.
---
# Django REST Framework patterns
Default assumption: DRF 3.18, per the DRF release notes. It supports Django 5.2, 6.0, and 6.1.
A row applies when the DRF, djangorestframework-simplejwt, or django-filter version the project pins, in `pyproject.toml`, a requirements file, or the lockfile, is at least the row's version.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing DRF code, or raising the DRF, simplejwt, or django-filter version | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing DRF code | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing a serializer, a viewset, a router, permissions, authentication, throttling, pagination, filtering, versioning, a renderer, or a schema | [reference/practices.md](reference/practices.md) |
| Configuring ruff or Django's checks for a DRF project | [reference/tooling.md](reference/tooling.md) |