Skip to main content
skill CX Codex

django-python — Claude Code skill: Django rules for your agent

A skill that steers your agent through Django work: MVT structure, ORM over raw SQL, class-based views and view-level error handling.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill django-python -a claude-code
Open on GitHub

What django-python does

This skill turns the assistant into a Django pair programmer. It asks for answers backed by concrete code, PEP 8 compliance and descriptive lowercase names with underscores. Projects should be split into separate Django apps.

The rules cover each layer. Complex logic goes into class-based views, simple tasks stay as functions. Database work runs through the ORM, with raw SQL kept as a last resort. Forms and models get validated by the built-in framework, errors are caught at the view level, and 404 or 500 pages can be customised. Signals handle cases where error handling needs to stay decoupled.

A separate section deals with performance: select_related() and prefetch_related(), indexing, caching through Redis or Memcached, Celery for I/O-bound work, static files via WhiteNoise or CDN. The skill also names the stack it assumes: Django REST Framework, Celery, Redis, PostgreSQL or MySQL. If your project uses none of those, some advice will miss the mark — worth checking what is actually in your dependencies.

What it helps with

  • split a project into separate Django apps
  • choose between class-based and function-based views
  • replace raw SQL queries with the ORM
  • wire up form and model validation
  • speed up queries with select_related() and prefetch_related()

Example prompts for the agent

  • Write a class-based view for a paginated order list and show the template
  • Rewrite this query using the ORM instead of raw SQL
  • Add validation to the signup form and handle errors at the view level

How to install django-python

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill django-python -a claude-code

2Manually: put the files in place

~/.claude/skills/django-python/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/django-python/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about django-python

How do I install django-python in Claude?

Run npx skills add Mindrally/skills --skill django-python -a claude-code. The skill file then lives at ~/.claude/skills/django-python/SKILL.md.

What does django-python do?

It gives the agent Django conventions: MVT, the ORM, built-in authentication, form validation, view-level error handling and query optimisation.

Which dependencies does the skill assume?

It is written around Django REST Framework, Celery, Redis and PostgreSQL or MySQL. Caching and queues run on Redis or Memcached.

Source text

SKILL.md · Apache-2.0
---
name: django-python
description: Expert in Django Python web development with best practices
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Django Python

You are an expert in Django and Python web development.

## Core Principles

- Write clear, technical responses with precise Django examples
- Leverage Django's built-in features and tools extensively
- Maintain PEP 8 compliance and readability
- Use descriptive naming (lowercase with underscores)
- Structure projects modularly using Django apps

## Django/Python Guidelines

- Prefer class-based views for complex logic; function-based views for simpler tasks
- Leverage Django's ORM for database interactions; avoid raw SQL queries unless necessary
- Use Django's built-in authentication and user management
- Implement form and model form classes for validation
- Follow the MVT (Model-View-Template) pattern strictly
- Apply middleware judiciously for cross-cutting concerns

## Error Handling & Validation

- Implement error handling at the view level
- Use Django's validation framework to validate form and model data
- Use try-except blocks for business logic exceptions
- Customize error pages (404, 500) for better UX
- Employ Django signals for decoupled error handling

## Key Dependencies

- Django
- Django REST Framework
- Celery (background tasks)
- Redis (caching/queues)
- PostgreSQL or MySQL

## Performance Optimization

- Use `select_related()` and `prefetch_related()` for efficient queries
- Implement database indexing and query optimization techniques
- Leverage Django's caching framework with Redis/Memcached
- Use Celery for I/O-bound operations
- Optimize static files with WhiteNoise or CDN

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for Backend and APIs →

From the same set168

react This skill gives your agent a fixed React style: hooks, Server Components, Tailwind, TypeScript. Useful when several people or agents touch the same codebase. CX Codex +1 944installs sequelize A skill that gives your agent rules for writing Sequelize code: models, associations, migrations and queries. Useful for Node.js projects on a relational database. CX Codex +1 942installs nestjs-clean-typescript Guides Claude Code to write clean NestJS APIs using TypeScript, MikroORM, class-validator, and Jest testing conventions. CX Codex +1 940installs gcp-development A rule set for building on Google Cloud: Cloud Functions, Cloud Run, Firestore, BigQuery and Terraform. Useful when your agent writes GCP code or infrastructure. CX Codex +1 937installs security-best-practices A skill providing security principles for backend and microservice development. It helps agents enforce strict input validation, protect APIs, and prevent sensitive data leaks. CX Codex +1 930installs flutter Enforces Flutter and Dart standards: feature-first clean architecture, state management with Riverpod or BLoC, and strict limits on widget tree depth. CX Codex +1 925installs laravel-development A skill that keeps your agent inside Laravel conventions: SOLID, PSR-12, Eloquent over raw SQL. Useful whenever the AI writes PHP in a Laravel app. CX Codex +1 909installs unity A skill that makes your coding agent follow Unity conventions: component architecture, ScriptableObjects, object pooling and profiler work. CX Codex +1 908installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor