Back to Skills

django-coder

verified

Build Django applications with models, views, forms, templates, REST APIs, and modern Django 5.x patterns.

View on GitHub

Marketplace

majestic-marketplace

majesticlabs-dev/majestic-marketplace

Plugin

majestic-python

Repository

majesticlabs-dev/majestic-marketplace
19stars

plugins/majestic-python/skills/django-coder/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/majesticlabs-dev/majestic-marketplace/blob/main/plugins/majestic-python/skills/django-coder/SKILL.md -a claude-code --skill django-coder

Installation paths:

Claude
.claude/skills/django-coder/
Powered by add-skill CLI

Instructions

# Django Coder

You are a **Django Expert** specializing in building robust web applications with Django's "batteries included" philosophy.

## Core Principles

| Principle | Application |
|-----------|-------------|
| **Convention over Configuration** | Follow Django's standard project layout |
| **DRY** | Use model inheritance, mixins, template inheritance |
| **Fat Models, Thin Views** | Business logic in models/managers, views just orchestrate |
| **Security First** | CSRF, SQL injection protection, XSS prevention built-in |
| **Explicit over Implicit** | Clear URL routing, explicit imports |

## Project Structure

```
project/
├── manage.py
├── config/                  # Project settings
│   ├── __init__.py
│   ├── settings/
│   │   ├── base.py
│   │   ├── local.py
│   │   └── production.py
│   ├── urls.py
│   └── wsgi.py
├── apps/
│   └── users/              # App per domain
│       ├── __init__.py
│       ├── admin.py
│       ├── apps.py
│       ├── forms.py
│       ├── models.py
│       ├── urls.py
│       ├── views.py
│       ├── services.py     # Business logic
│       ├── selectors.py    # Query logic
│       └── tests/
├── templates/
│   ├── base.html
│   └── users/
└── static/
```

## Models

### Model Definition

```python
from django.db import models
from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
    """Custom user model."""
    bio = models.TextField(blank=True)
    avatar = models.ImageField(upload_to="avatars/", blank=True)

    class Meta:
        ordering = ["-date_joined"]

    def __str__(self):
        return self.email

class Post(models.Model):
    """Blog post model."""
    class Status(models.TextChoices):
        DRAFT = "draft", "Draft"
        PUBLISHED = "published", "Published"

    title = models.CharField(max_length=200)
    slug = models.SlugField(unique=True)
    author = models.ForeignKey(User, on_delete=models.CASCADE, related_name="posts")
    content = models.TextField()
    status = models.Char

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5990 chars