Agent skill

Django Expert

by Jeffallan in Jeffallan/claude-skills

Builds Django apps and Django REST Framework APIs: models with indexes, ORM query optimization, serializers, viewsets and JWT authentication, with tests.

MITAuto-check passedBackend & APIs

Install Django Expert

skills CLI
$ npx skills add Jeffallan/claude-skills --skill django-expert -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills django-expert --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/django-expert .claude/skills/django-expert && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
django-expert
GitHub stars
12k
Token cost
~1.5k tokens
SKILL.md length
303 words
Files
6 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Builds Django apps and Django REST Framework APIs: models with indexes, ORM query optimization, serializers, viewsets and JWT authentication, with tests.

  • Works in 6 steps: Analyze requirements — Identify models,… → Design models — Create models with… → Implement views — DRF viewsets or Django… → …
  • Building a Django web application or REST API
  • SKILL.md covers When to Use This Skill, Core Workflow, Reference Guide and Minimal Working Example, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The workflow runs from requirements to models, views, endpoint checks, authentication and tests. Models are designed with proper fields, indexes and managers, followed by `manage.py makemigrations` and `migrate`, and the schema is verified before moving on. Views use DRF viewsets or Django 5.0 async views, each endpoint is confirmed with an APITestCase or a curl check before auth is added, and permissions with JWT or session authentication follow.

Constraints require select_related and prefetch_related for related objects, indexes on frequently queried fields, secrets in environment variables, permissions on every endpoint, tests for models and APIs and Django's built-in protections. The skill rules out unparameterized raw SQL, skipped migrations, secrets in settings.py, DEBUG=True in production and unvalidated input. Reference files cover models and ORM, serializers, viewsets, authentication and testing, with a minimal working example, and the excerpt is cut off at the output templates.

When your agent uses it

  • Building a Django web application or REST API
  • Designing Django models with relationships and indexes
  • Fixing slow Django ORM queries with select_related and prefetch_related
  • Adding DRF serializers, viewsets or JWT authentication

Example prompts

  • “Build a DRF API for orders and customers with indexed models and viewsets.”
  • “This Django view runs hundreds of queries. Optimize it with select_related.”
  • “Add JWT authentication and permissions to the existing API endpoints.”

Requirements

  • Python with Django and Django REST Framework

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Analyze requirements — Identify models, relationships, API endpoints
  2. Design models — Create models with proper fields, indexes, managers → run manage.py makemigrations and manage.py migrate; verify schema…
  3. Implement views — DRF viewsets or Django 5.0 async views
  4. Validate endpoints — Confirm each endpoint returns expected status codes with a quick APITestCase or curl check before adding auth
  5. Add auth — Permissions, JWT authentication
  6. Test — Django TestCase, APITestCase

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Django Expert loads about 1.5k tokens when it runs, and up to ~7k if it reads all its reference files. Until then it costs about 118 tokens; SKILL.md has 303 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 303 words, ~1,547 tokens.

Download SKILL.mdSave it as .claude/skills/django-expert/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
django-expert
description
Use when building Django web applications or REST APIs with Django REST Framework. Invoke when working with settings.py, models.py, manage.py, or any Django project file. Creates Django models with proper indexes, optimizes ORM queries using select_related/prefetch_related, builds DRF serializers and viewsets, and configures JWT authentication. Trigger terms: Django, DRF, Django REST Framework, Django ORM, Django model, serializer, viewset, Python web.
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.1.0
metadata.domain
backend
metadata.triggers
Django, DRF, Django REST Framework, Django ORM, Django model, serializer, viewset, Python web
metadata.role
specialist
metadata.scope
implementation
metadata.output-format
code
metadata.related-skills
fullstack-guardian, fastapi-expert, test-master, django-storages-s3

Django Expert

Senior Django specialist with deep expertise in Django 5.0, Django REST Framework, and production-grade web applications.

When to Use This Skill

  • Building Django web applications or REST APIs
  • Designing Django models with proper relationships
  • Implementing DRF serializers and viewsets
  • Optimizing Django ORM queries
  • Setting up authentication (JWT, session)
  • Django admin customization

Core Workflow

  1. Analyze requirements — Identify models, relationships, API endpoints
  2. Design models — Create models with proper fields, indexes, managers → run manage.py makemigrations and manage.py migrate; verify schema before proceeding
  3. Implement views — DRF viewsets or Django 5.0 async views
  4. Validate endpoints — Confirm each endpoint returns expected status codes with a quick APITestCase or curl check before adding auth
  5. Add auth — Permissions, JWT authentication
  6. Test — Django TestCase, APITestCase

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Modelsreferences/models-orm.mdCreating models, ORM queries, optimization
Serializersreferences/drf-serializers.mdDRF serializers, validation
ViewSetsreferences/viewsets-views.mdViews, viewsets, async views
Authenticationreferences/authentication.mdJWT, permissions, SimpleJWT
Testingreferences/testing-django.mdAPITestCase, fixtures, factories

Minimal Working Example

The snippet below demonstrates the core MUST DO constraints: indexed fields, select_related, serializer validation, and endpoint permissions.

python
# models.py
from django.db import models

class Article(models.Model):
    title = models.CharField(max_length=255, db_index=True)
    author = models.ForeignKey(
        "auth.User", on_delete=models.CASCADE, related_name="articles"
    )
    published_at = models.DateTimeField(auto_now_add=True, db_index=True)

    class Meta:
        ordering = ["-published_at"]
        indexes = [models.Index(fields=["author", "published_at"])]

    def __str__(self):
        return self.title

# serializers.py
from rest_framework import serializers
from .models import Article

class ArticleSerializer(serializers.ModelSerializer):
    author_username = serializers.CharField(source="author.username", read_only=True)

    class Meta:
        model = Article
        fields = ["id", "title", "author_username", "published_at"]

    def validate_title(self, value):
        if len(value.strip()) < 3:
            raise serializers.ValidationError("Title must be at least 3 characters.")
        return value.strip()

# views.py
from rest_framework import viewsets, permissions
from .models import Article
from .serializers import ArticleSerializer

class ArticleViewSet(viewsets.ModelViewSet):
    """
    Uses select_related to avoid N+1 on author lookups.
    IsAuthenticatedOrReadOnly: safe methods are public, writes require auth.
    """
    serializer_class = ArticleSerializer
    permission_classes = [permissions.IsAuthenticatedOrReadOnly]

    def get_queryset(self):
        return Article.objects.select_related("author").all()

    def perform_create(self, serializer):
        serializer.save(author=self.request.user)
python
# tests.py
from rest_framework.test import APITestCase
from rest_framework import status
from django.contrib.auth.models import User

class ArticleAPITest(APITestCase):
    def setUp(self):
        self.user = User.objects.create_user("alice", password="pass")

    def test_list_public(self):
        res = self.client.get("/api/articles/")
        self.assertEqual(res.status_code, status.HTTP_200_OK)

    def test_create_requires_auth(self):
        res = self.client.post("/api/articles/", {"title": "Test"})
        self.assertEqual(res.status_code, status.HTTP_403_FORBIDDEN)

    def test_create_authenticated(self):
        self.client.force_authenticate(self.user)
        res = self.client.post("/api/articles/", {"title": "Hello Django"})
        self.assertEqual(res.status_code, status.HTTP_201_CREATED)

Constraints

MUST DO
  • Use select_related/prefetch_related for related objects
  • Add database indexes for frequently queried fields
  • Use environment variables for secrets
  • Implement proper permissions on all endpoints
  • Write tests for models and API endpoints
  • Use Django's built-in security features (CSRF, etc.)
MUST NOT DO
  • Use raw SQL without parameterization
  • Skip database migrations
  • Store secrets in settings.py
  • Use DEBUG=True in production
  • Trust user input without validation
  • Ignore query optimization

Output Templates

When implementing Django features, provide:

  1. Model definitions with indexes
  2. Serializers with validation
  3. ViewSet or views with permissions
  4. Brief note on query optimization

Knowledge Reference

Django 5.0, DRF, async views, ORM, QuerySet, select_related, prefetch_related, SimpleJWT, django-filter, drf-spectacular, pytest-django

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/django-expert of Jeffallan/claude-skills.

  • SKILL.md
  • references/authentication.md
  • references/drf-serializers.md
  • references/models-orm.md
  • references/testing-django.md
  • references/viewsets-views.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

Django Expert next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Django Expert compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Django Expert this skillJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Fastcrudbenavlabs/fastcrud1.6k—~5kAutomated safety check: PassMIT
Django Access Reviewgetsentry/skills1k3 repos~2.6kAutomated safety check: NotesApache-2.0
Fastapi Appccplugins/awesome-claude-code-plugins970—~1.1kAutomated safety check: NotesApache-2.0
Fastapiericrisco/rsc-harness174—~5kAutomated safety check: NotesMIT
Django Q2hashgraph-online/awesome-codex-plugins1.3k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Fastcrud

    benavlabs/fastcrud

    A skill your agent uses when building or modifying CRUD endpoints with FastCRUD (the fastcrud PyPI package) in a FastAPI project — covers FastCRUD, crudrouter, EndpointCreator, FilterConfig…

    1.6k GitHub stars~5k tokensUpdated 14 days ago
    Backend & APIsAuto-check passed
  • Django Access Review

    getsentry/skills

    Official

    Django access control and IDOR security review. An agent skill from getsentry/skills.

    1k GitHub starsUsed in 3 repos~2.6k tokens
    Backend & APIsAuto-check: notes
  • Fastapi App

    ccplugins/awesome-claude-code-plugins

    Bootstrap a new FastAPI backend with async SQLAlchemy 2.0, asyncpg, Alembic, Pydantic v2, and no deprecated APIs.

    970 GitHub stars~1.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes
  • Fastapi

    ericrisco/rsc-harness

    A skill your agent uses when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0…

    174 GitHub stars~5k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Django Q2

    hashgraph-online/awesome-codex-plugins

    A skill your agent uses when adding, changing, testing, or debugging Django Q2 background tasks, scheduled jobs, qcluster workers, Redis broker configuration, or ORM broker fallback in Django…

    1.3k GitHub stars~1.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Fastapi Itechmeat

    Kilo-Org/kilo-marketplace

    FastAPI Python framework. An agent skill from Kilo-Org/kilo-marketplace.

    190 GitHub stars~1.5k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Apache Spark Engineer

    Jeffallan/claude-skills

    Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Works with

Categories

Questions about Django Expert

What does Django Expert do?

Builds Django apps and Django REST Framework APIs: models with indexes, ORM query optimization, serializers, viewsets and JWT authentication, with tests. The workflow runs from requirements to models, views, endpoint checks, authentication and tests.py makemigrations` and `migrate`, and the schema is verified before moving on.

When should I use Django Expert?

Django Expert fits situations like: building a Django web application or REST API; designing Django models with relationships and indexes; fixing slow Django ORM queries with select_related and prefetch_related; adding DRF serializers, viewsets or JWT authentication.

How do I install Django Expert in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill django-expert -a claude-code`. Or copy the skill folder (skills/django-expert in Jeffallan/claude-skills) into .claude/skills/django-expert in your project. Claude Code loads it when a task matches its description.

How do I install Django Expert in Codex?

Run `npx skills add Jeffallan/claude-skills --skill django-expert -a codex`. Or copy the skill folder (skills/django-expert in Jeffallan/claude-skills) into .agents/skills/django-expert in your project. Codex loads it when a task matches its description.

Can I use Django Expert in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill django-expert -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/django-expert, .gemini/skills/django-expert, .github/skills/django-expert and .opencode/skills/django-expert in your project.

What does Django Expert need to run?

SKILL.md names no scripts, command-line tools or credentials: Django Expert is instructions for the agent only. Our summary lists: Python with Django and Django REST Framework.

Does Django Expert access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is Django Expert safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Django Expert use?

Django Expert is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Django Expert use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.5k tokens, read only when the agent opens those files.

What are the alternatives to Django Expert?

Skills that share tags, products or a category with Django Expert: Fastcrud (benavlabs/fastcrud, 1.6k stars), Django Access Review (getsentry/skills, 1k stars), Fastapi App (ccplugins/awesome-claude-code-plugins, 970 stars) and Fastapi (ericrisco/rsc-harness, 174 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Django Expert?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,788 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.