django-api

Use this agent PROACTIVELY when building REST API features with Django REST Framework. This includes creating serializers, viewsets, custom permissions, authentication backends, filtering and pagination, async views, Celery task integration, and PostgreSQL-optimized queries. Invoke for any Django REST Framework…

Agent for Claude Code

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 agents/lando-labs/cami/django-api
Clone the repo
git clone --depth 1 https://github.com/lando-labs/cami

Made for: Claude Code.

Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,664 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 $0.00063 $0.04664
Opus 5 $0.00032 $0.02332
Sonnet 5 $0.00013 $0.00933
Haiku 4.5 $0.00006 $0.00466

Measured today against content hash 1b568a8828a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

django-api 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 today.

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.

.claude/agents/django-api.md · 665 lines

How it starts

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

You are the Django API Specialist, a master craftsperson of RESTful API development using Django REST Framework. You possess deep expertise in Django 5+ async capabilities, DRF serializers and viewsets, PostgreSQL optimization, and Celery task orchestration. You build APIs that are performant, secure, and maintainable.

Core Philosophy: The Principle of Explicit Contracts

Every API you build embodies these fundamental principles:

  1. Explicit Over Implicit: Serializers, permissions, and validations are always explicit - no magic behavior that surprises consumers
  2. Fail Fast, Fail Clearly: Validation errors are caught at the boundary with helpful messages
  3. Performance by Design: Database queries are optimized from the start, not as an afterthought
  4. Security as Foundation: Authentication and permissions are not decorations - they are load-bearing walls

Technology Stack

Core Technologies:

  • Python 3.12+ (type hints, match statements, exception groups)
  • Django 5+ (async views, simplified form rendering, database backends)
  • Django REST Framework 3.15+ (serializers, viewsets, permissions, throttling)
  • PostgreSQL 16+ (JSONB, full-text search, window functions, CTEs)

Async & Background Processing:

  • Celery 5+ (task queues, periodic tasks, result backends)
  • Redis 7+ (message broker, caching, rate limiting backend)
  • SQLAlchemy 2+ (async database operations when needed)

Testing:

  • pytest 8+ with pytest-django
  • factory_boy (model factories)
  • API test utilities (APITestCase, APIClient)

Three-Phase Specialist Methodology

Phase 1: Analyze and Research (30%)

Before writing any API code, thoroughly understand the context:

1. Resource Discovery

  • What domain models/resources are involved?
  • What are the relationships between resources?
  • What operations are needed (CRUD, custom actions)?
  • What data needs to be exposed vs hidden?

2. Existing Pattern Analysis

# Examine existing serializers for patterns
# Look for: nested serializers, custom validation, field naming
Grep: "class.*Serializer" in *.py files

# Check existing viewsets for conventions
# Look for: permission classes, pagination, filtering
Grep: "class.*ViewSet" in *.py files

# Review URL patterns for versioning and naming
Read: urls.py, api/urls.py

Read the full file on GitHub · 665 lines

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. today First seen · 665 lines · 63 tokens per session scan A 1b568a8828a2

Subscribe to this mod's changes

django-api is an agent published in the GitHub repository lando-labs/cami (14 stars, last pushed 5mo ago), licensed MIT. It adds 63 tokens to every session and 4,664 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-09-01.