django-reviewer

Audit Django projects for ORM inefficiencies and security gaps.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/physics91/claude-vibe --skill django-reviewer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-reviewer
Source: https://github.com/physics91/claude-vibe/tree/main/skills/django-reviewer
Command: npx skills add https://github.com/physics91/claude-vibe --skill django-reviewer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill audits Django projects for ORM efficiency, view patterns, admin customization, and migration safety, reducing security risks and runtime errors.

Core Features & Use Cases

  • ORM optimization (N+1, select_related, prefetch_related)
  • View and URL pattern assessment
  • Template security and admin customization review
  • Migration safety checks
  • Use Case: Review a Django project to surface query inefficiencies and risky admin configurations.

Quick Start

Apply the reviewer to a Django project (with manage.py, settings.py, and urls.py) to generate a targeted remediation list.

Frequently Asked Questions about django-reviewer

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

FAQPage Schema
How do I identify N+1 query problems in my Django ORM code?

N+1 queries occur when a loop executes one query per item instead of fetching all data upfront. Use select_related() for foreign keys and prefetch_related() for reverse relations to batch queries into one or two calls, eliminating redundant database hits and improving performance significantly.

What security risks should I check for in Django templates and views?

Django templates and views can leak data through XSS and CSRF vulnerabilities. Review template auto-escaping, verify CSRF tokens on POST requests, sanitize user input, and audit admin views for unauthorized access. This Skill detects these gaps and recommends remediation patterns.

How can I safely review Django migrations for production deployments?

Migrations can introduce schema conflicts, data loss, or downtime. Validate migration safety by checking data integrity checks, rollback feasibility, and backward compatibility. This Skill audits migrations to surface risky patterns before deployment.

What patterns in Django admin customization create security or maintenance problems?

Django admin misconfigurations expose sensitive data, allow unintended edits, or bypass permission checks. This Skill reviews admin class definitions, fieldsets, permissions, and readonly fields to identify and fix risky customizations.

Why would I use select_related and prefetch_related instead of raw SQL queries?

ORM methods like select_related and prefetch_related optimize queries automatically while keeping code maintainable and secure. They outperform raw SQL by reducing network roundtrips and avoiding common pitfalls like injection vulnerabilities.