django-drf

django-drf is a skill for Claude Code, Codex from prowler-cloud/prowler. It costs 51 tokens per session (3,799 once invoked), scanned A, original, Apache-2.0.

A guide to building web APIs with Django REST Framework, a Django toolkit for letting applications exchange data over HTTP.

In plain words
What is it for?
It helps developers create and review API models, views, serializers, filters, routes, permissions, and OpenAPI documentation.
Why use it?
It removes common implementation mistakes in serializers, filtering, database queries, permissions, and API documentation. It also helps prevent repeated database queries that make an API unnecessarily slow.

Skill for Claude CodeCodex

About the project

Prowler is an open-source cloud security platform that checks cloud environments for security issues and compliance with standards such as CIS, NIST, and GDPR. Security teams use it to assess configurations, prioritize findings, produce reports, and guide remediation.

prowler-cloud/prowler · 14,753 stars · on GitHub · prowler.com

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.

agentmods
npx agentmods add skills/prowler-cloud/prowler/django-drf
Any agent
npx skills add prowler-cloud/prowler --skill django-drf
Clone the repo
git clone --depth 1 https://github.com/prowler-cloud/prowler

Made for: Claude Code, Codex.

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 django-drf

README.md
[![agentmods](https://agentmods.dev/badge/skills/prowler-cloud/prowler/django-drf.svg)](https://agentmods.dev/skills/prowler-cloud/prowler/django-drf)
Your own site
<a href="https://agentmods.dev/skills/prowler-cloud/prowler/django-drf"><img src="https://agentmods.dev/badge/skills/prowler-cloud/prowler/django-drf.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00051 $0.03799
Opus 5 $0.00026 $0.01899
Sonnet 5 $0.00010 $0.00760
Haiku 4.5 $0.00005 $0.00380

Measured 6d ago against content hash 880458a55298, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

django-drf 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/security_patterns.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/django-drf/SKILL.md · 506 lines

How it starts

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

Critical Patterns

  • ALWAYS separate serializers by operation: Read / Create / Update / Include
  • ALWAYS use filterset_class for complex filtering (not filterset_fields)
  • ALWAYS validate unknown fields in write serializers (inherit BaseWriteSerializer)
  • ALWAYS use select_related/prefetch_related in get_queryset() to avoid N+1
  • ALWAYS handle swagger_fake_view in get_queryset() for schema generation
  • ALWAYS use @extend_schema_field for OpenAPI docs on SerializerMethodField
  • NEVER put business logic in serializers - use services/utils
  • NEVER use auto-increment PKs - use UUIDv4 or UUIDv7
  • NEVER use trailing slashes in URLs (trailing_slash=False)

Note: swagger_fake_view is specific to drf-spectacular for OpenAPI schema generation.


Implementation Checklist

When implementing a new endpoint, review these patterns in order:

# Pattern Reference Key Points
1 Models api/models.py UUID PK, inserted_at/updated_at, JSONAPIMeta.resource_name
2 ViewSets api/base_views.py, api/v1/views.py Inherit BaseRLSViewSet, get_queryset() with N+1 prevention
3 Serializers api/v1/serializers.py Separate Read/Create/Update/Include, inherit BaseWriteSerializer
4 Filters api/filters.py Use filterset_class, inherit base filter classes
5 Permissions api/base_views.py required_permissions, set_required_permissions()
6 Pagination api/pagination.py Custom pagination class if needed
7 URL Routing api/v1/urls.py trailing_slash=False, kebab-case paths
8 OpenAPI Schema api/v1/views.py @extend_schema_view with drf-spectacular
9 Tests api/tests/test_views.py JSON:API content type, fixture patterns

Full file paths: See references/file-locations.md


Decision Trees

Which Serializer?

GET list/retrieve → <Model>Serializer
POST create       → <Model>CreateSerializer
PATCH update      → <Model>UpdateSerializer
?include=...      → <Model>IncludeSerializer

Read the full file on GitHub · 506 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. 6d ago First seen · 506 lines · 51 tokens per session scan A 880458a55298

Subscribe to this mod's changes

django-drf is a skill published in the GitHub repository prowler-cloud/prowler (14,753 stars, last pushed yesterday), licensed Apache-2.0. It adds 51 tokens to every session and 3,799 once invoked, about $0.0003 per session on Opus 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-08-30.

Related

Other skills, from other repositories

performing-aws-account-enumeration-with-scout-suite

Perform comprehensive security posture assessment of AWS accounts using ScoutSuite to enumerate resources, identify misconfigurations, and generate actionable security reports.

xalgorix/xalgorix · 39 tokens

cis-aws-database-3.11

Ensure to Regularly Review Security Configuration.

CyberStrikeus/CyberStrike · 17 tokens

ponytail-sec-audit

Full project security audit. Scans the entire codebase across three passes: code that shouldn't exist, all dependencies assessed, all hardening findings. Produces a comprehensive numbered report with blast-radius narrative. Persists findings to .ponytail-sec/ for cross-scan tracking. For per-diff review use…

andypitcher/ponytail-sec · 74 tokens

ponytail-sec

Security companion for active development. Scopes to the current diff or changed files. Three passes: YAGNI code review, new-dep assessment, and up to 3 material hardening findings. Lean by design — surfaces the one thing to fix before merging, not a backlog. Use ponytail-sec-audit for a full project scan.

andypitcher/ponytail-sec · 74 tokens

k8s-securitycontext

Binary Kubernetes securityContext hardening check. Use when reviewing Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Helm templates, or Kubernetes manifests that define containers. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 57 tokens

dockerfile

Binary Dockerfile image-build hardening check. Use when reviewing Dockerfiles, container image builds, multi-stage builds, runtime users, pinned bases, or reproducible dependency installs. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 51 tokens