Agent skill

Django Patterns

by rohitg00 in rohitg00/awesome-claude-code-toolkit

Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure

Apache-2.0Auto-check passedBackend & APIs

Install Django Patterns

skills CLI
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill django-patterns -a claude-code

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

GitHub CLI
$ gh skill install rohitg00/awesome-claude-code-toolkit django-patterns --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/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/django-patterns .claude/skills/django-patterns && 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-patterns
GitHub stars
2.7k
Token cost
~1k tokens
SKILL.md length
168 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
Apache-2.0

At a glance

Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure

  • Tasks that involve Backend development
  • SKILL.md covers Project Structure, ORM Optimization, Django REST Framework… and Signals, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve ORMs and data access

What it does

Django Patterns is an agent skill from rohitg00/awesome-claude-code-toolkit. Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Backend development, ORMs and data access and Software architecture. It works with Django. The repository describes itself as: The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills, 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 14 MCP configs, 26 companion apps, 52… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Backend development
  • Tasks that involve ORMs and data access
  • Tasks that involve Software architecture

Example prompts

  • “/django-patterns”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit ebdf1d5. 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

    No URLs in SKILL.md.

    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 Patterns loads about 1k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 168 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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 rohitg00/awesome-claude-code-toolkit at commit ebdf1d5, republished under its Apache-2.0 licence (© rohitg00). 168 words, ~1,047 tokens.

Download SKILL.mdSave it as .claude/skills/django-patterns/SKILL.md (or your agent's skills folder).
name
django-patterns
description
Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure

Django Patterns

Project Structure

Organize Django projects with a clear separation between apps, shared utilities, and configuration.

project/
  config/
    settings/
      base.py
      local.py
      production.py
    urls.py
    wsgi.py
  apps/
    users/
      models.py
      serializers.py
      views.py
      services.py
      selectors.py
      urls.py
      tests/
    orders/
      ...
  common/
    models.py
    permissions.py
    pagination.py

Keep business logic in services.py (write operations) and selectors.py (read operations). Views should remain thin.

ORM Optimization

python
# select_related for ForeignKey / OneToOne (SQL JOIN)
orders = Order.objects.select_related("customer", "customer__profile").all()

# prefetch_related for ManyToMany / reverse FK (separate query)
authors = Author.objects.prefetch_related(
    Prefetch("books", queryset=Book.objects.filter(published=True))
).all()

# Defer fields you don't need
posts = Post.objects.defer("body", "metadata").filter(status="published")

# Use .only() when you need just a few columns
emails = User.objects.only("id", "email").filter(is_active=True)

# Bulk operations
Product.objects.bulk_create(products, batch_size=1000)
Product.objects.bulk_update(products, ["price", "stock"], batch_size=1000)

Always check queries with django-debug-toolbar or connection.queries in tests.

Django REST Framework Serializers

python
class OrderSerializer(serializers.ModelSerializer):
    customer_name = serializers.CharField(source="customer.full_name", read_only=True)
    items = OrderItemSerializer(many=True, read_only=True)
    total = serializers.SerializerMethodField()

    class Meta:
        model = Order
        fields = ["id", "customer_name", "items", "total", "created_at"]
        read_only_fields = ["id", "created_at"]

    def get_total(self, obj):
        return sum(item.price * item.quantity for item in obj.items.all())

    def validate(self, data):
        if data.get("start_date") and data.get("end_date"):
            if data["start_date"] >= data["end_date"]:
                raise serializers.ValidationError("end_date must be after start_date")
        return data

Signals

python
from django.db.models.signals import post_save
from django.dispatch import receiver

@receiver(post_save, sender=Order)
def order_created_handler(sender, instance, created, **kwargs):
    if created:
        send_order_confirmation.delay(instance.id)
        update_inventory.delay(instance.id)

Prefer signals for cross-app side effects. For same-app logic, call services directly.

Custom Middleware

python
import time
import logging

logger = logging.getLogger(__name__)

class RequestTimingMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response

    def __call__(self, request):
        start = time.monotonic()
        response = self.get_response(request)
        duration = time.monotonic() - start
        logger.info(f"{request.method} {request.path} {response.status_code} {duration:.3f}s")
        return response

Anti-Patterns

  • Putting business logic in views or serializers instead of service layers
  • Using Model.objects.all() without pagination in list endpoints
  • N+1 queries from missing select_related / prefetch_related
  • Overusing signals for same-app logic (makes flow hard to trace)
  • Storing secrets in settings.py instead of environment variables
  • Running raw SQL without parameterized queries

Checklist

  • Business logic lives in services/selectors, not views
  • All list queries use select_related or prefetch_related where needed
  • Serializers validate input data with custom validate methods
  • Settings split into base/local/production modules
  • Migrations are reviewed before merging
  • Bulk operations used for batch inserts/updates
  • Custom middleware follows the WSGI callable pattern
  • Tests cover model constraints, serializer validation, and view permissions

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

Files

Just SKILL.md in skills/django-patterns of rohitg00/awesome-claude-code-toolkit.

Open the folder on GitHubat commit ebdf1d5

Compare with similar skills

Django Patterns 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 Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Django Patterns this skillrohitg00/awesome-claude-code-toolkit2.7k—~1kAutomated safety check: PassApache-2.0
Django Access Reviewgetsentry/skills1k3 repos~2.6kAutomated safety check: NotesApache-2.0
Django Patternskurealnum/dotfiles2907 repos~5.2kAutomated safety check: PassNone
Django ExpertJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Django Patternsaffaan-m/ECC274k—~5.4kAutomated safety check: PassMIT
Fastapiericrisco/rsc-harness156—~5kAutomated safety check: NotesMIT

Similar skills

  • 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
  • Django Patterns

    kurealnum/dotfiles

    Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps.

    290 GitHub starsUsed in 7 repos~5.2k tokens
    Backend & APIsAuto-check passed
  • Django Expert

    Jeffallan/claude-skills

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

    12k GitHub stars~1.5k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Django Patterns

    affaan-m/ECC

    Patrones de arquitectura Django, diseño de API REST con DRF, buenas prácticas de ORM, caché, señales, middleware y aplicaciones Django de nivel producción.

    274k GitHub stars~5.4k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • 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…

    156 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.2k GitHub stars~1.7k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from rohitg00/awesome-claude-code-toolkit

All 37 skills in this repo
  • Accessibility Wcag

    rohitg00/awesome-claude-code-toolkit

    Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • API Design Patterns

    rohitg00/awesome-claude-code-toolkit

    REST API design with resource naming, pagination, versioning, and OpenAPI spec generation

    2.7k GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Authentication Patterns

    rohitg00/awesome-claude-code-toolkit

    Authentication and authorization patterns including OAuth2, JWT, RBAC, session management, and PKCE flows

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • AWS Cloud Patterns

    rohitg00/awesome-claude-code-toolkit

    AWS cloud patterns for Lambda, ECS, S3, DynamoDB, and Infrastructure as Code with CDK/Terraform

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • CI CD Pipelines

    rohitg00/awesome-claude-code-toolkit

    CI/CD pipeline patterns for GitHub Actions, GitLab CI, testing strategies, and deployment automation

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Continuous Learning

    rohitg00/awesome-claude-code-toolkit

    Auto-extract patterns from coding sessions, track corrections, and build reusable knowledge with confidence scoring

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed

Works with

Categories

Questions about Django Patterns

What does Django Patterns do?

Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure. Django Patterns is an agent skill from rohitg00/awesome-claude-code-toolkit.

When should I use Django Patterns?

Django Patterns fits situations like: tasks that involve Backend development; tasks that involve ORMs and data access; tasks that involve Software architecture.

How do I install Django Patterns in Claude Code?

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

How do I install Django Patterns in Codex?

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

Can I use Django Patterns 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 rohitg00/awesome-claude-code-toolkit --skill django-patterns -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-patterns, .gemini/skills/django-patterns, .github/skills/django-patterns and .opencode/skills/django-patterns in your project.

What does Django Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Django Patterns is instructions for the agent only. Our summary lists: Python 3.

Does Django Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Django Patterns 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 Patterns use?

Django Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Django Patterns use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Django Patterns?

Skills that share tags, products or a category with Django Patterns: Django Access Review (getsentry/skills, 1k stars), Django Patterns (kurealnum/dotfiles, 290 stars), Django Expert (Jeffallan/claude-skills, 12k stars) and Django Patterns (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Django Patterns?

rohitg00 (a GitHub user) maintains it in rohitg00/awesome-claude-code-toolkit, which has 2,683 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on May 12, 2026.

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