debug:django

Diagnose Django errors with a four-phase debugging workflow.

9|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin --skill debug-django
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug:django
Source: https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin/tree/main/plugins/debug-and-refactor/skills/debug-django
Command: npx skills add https://github.com/SnakeO/claude-debug-and-refactor-skills-plugin --skill debug-django

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Django applications often encounter misconfigurations, template issues, and ORM inefficiencies that are hard to isolate. This Skill provides a repeatable debugging workflow with guidance, tooling, and best practices to rapidly reproduce, isolate, and fix defects in Django projects.

Core Features & Use Cases

  • Structured workflow: Four-phase methodology (root cause investigation, pattern analysis, hypothesis testing, implementation) for Django bugs.
  • Tooling guidance: Instructions for enabling Django Debug Toolbar, pdb/ipdb, and django-extensions shell_plus to capture SQL queries, stack traces, and interactive debugging.
  • Common scenarios: TemplateDoesNotExist, ImproperlyConfigured, IntegrityError, N+1 queries, migration conflicts, and CSRF issues across Django apps.

Quick Start

Start by enabling the Django Debug Toolbar and pdb/ipdb in your development environment, then reproduce a failing page to collect logs, stack traces, and ORM queries.

Frequently Asked Questions about debug:django

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

FAQPage Schema
How do I debug Django errors like TemplateDoesNotExist and ImproperlyConfigured?

Debug Django IntegrityError and migration conflicts by following a structured diagnostic workflow for root cause investigation, pattern analysis, and hypothesis testing. The process guides you through ORM inspection and database configuration checks to isolate constraint violations.

What is the best way to diagnose N+1 queries in Django ORM?

Diagnose Django N+1 queries by enabling Django Debug Toolbar to capture SQL queries and inspecting the ORM. The workflow integrates with shell_plus to interactively test query optimization patterns and verify that eager loading resolves the inefficiency.

How do I use pdb and Django Debug Toolbar to trace CSRF failures?

Trace Django CSRF failures by enabling Django Debug Toolbar to capture request data and using pdb or ipdb for interactive debugging. This combination allows you to inspect stack traces and middleware configuration to isolate the authentication or token validation issue.

Does this Django debugging workflow work without installing django-extensions?

The Django debugging workflow integrates with django-extensions shell_plus for interactive debugging, but it remains functional without it. You can still execute the four-phase methodology using standard pdb, ipdb, and Django Debug Toolbar to capture logs and stack traces.

Why do I get import errors across my Django apps and how can I trace them?

Django import errors often stem from misconfigurations or circular dependencies. Trace them by applying the root cause investigation phase of the debugging workflow, using logging and interactive pdb sessions to inspect stack traces and isolate the failing module path.