django

Develop, migrate, and harden Django 6 web applications with ORM and deployment guidance.

15|2|Updated May 23, 2026
One-click install
npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill django-vkirill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django
Source: https://github.com/VKirill/antigravity-for-claude-code/tree/main/skills/django
Command: npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill django-vkirill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Django projects fail or slow down when setup, models, routing, templates, auth, migrations, async behavior, and production hardening are handled inconsistently, leading to security bugs, broken deployments, and performance issues like N+1 queries.

Core Features & Use Cases

  • Model + ORM correctness: design models safely (including on_delete), write efficient QuerySets with select_related/prefetch_related, and avoid common N+1 pitfalls.
  • Production-ready migrations & deployment: create safe schema migrations (including RunPython, multi-db, --fake guidance) and deploy with a correct DEBUG=False + HTTPS + static/media pipeline.
  • Web layer implementation: wire views and URLs (FBV/CBV, generic views, namespacing), implement forms and validation (Form/ModelForm), and render templates (including Django 6 template partials).
  • Security and operability: set auth with AUTH_USER_MODEL, configure admin hardening, manage CSRF/session behavior, and handle async correctly (async ORM calls, ASGI choices).

Quick Start

Ask: "Using the django skill, review my Django 6 project for N+1 query issues in the admin changelist and show the exact code changes I should make to fix them."

Frequently Asked Questions about django

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix N+1 query problems in my Django admin changelist?

Fix N+1 query problems by applying `select_related` for ForeignKey traversals and `prefetch_related` for reverse or many-to-many relations within your QuerySets. This ORM optimization pattern prevents unnecessary database hits when rendering related model data.

How do I write safe Django migrations for production deployment?

Write safe Django migrations by using `RunPython` for complex data transformations, applying `--fake` only when necessary, and structuring schema changes to avoid locking tables. This ensures zero-downtime production deployment without breaking existing database state.

Does Django 6 async ORM work with regular views and queries?

Django 6 async ORM requires using specific async methods like `aget` and `afilter` within async views. You cannot mix standard synchronous ORM calls inside async view logic without causing execution issues, requiring correct ASGI deployment configurations.

What's the best way to harden Django session and CSRF security?

Harden Django session and CSRF security by configuring `AUTH_USER_MODEL` correctly, enforcing strict cookie policies, and running `python manage.py check --deploy`. This identifies production security gaps like insecure `DEBUG=True` configurations.

When do I need WSGI vs ASGI deployment for Django applications?

You need ASGI deployment for Django applications utilizing async views or async ORM calls, while WSGI is suitable for standard synchronous models and views. Choosing the correct gateway interface ensures your server matches your application's concurrency requirements.

How do I design Django models with explicit on_delete behavior?

Design Django models with explicit `on_delete` behavior by declaring `CASCADE`, `PROTECT`, or `SET_NULL` directly on ForeignKey fields. This mandatory ORM requirement prevents unintended data loss and ensures referential integrity during record deletion.