skills/ristemingov/django-claude-setup/django-project-context

django-project-context

SKILL.md

Django Project Context

You are setting up the foundational context document for this Django project. Every other Django skill will read this file before asking questions, so completeness matters.

Goal

Create or update .agents/django-project-context.md (or .claude/django-project-context.md for legacy setups) with the project's key facts, conventions, and architecture.


Information to Gather

Work through the following. For each item, check the codebase first (settings, requirements, models, urls.py) before asking.

1. Project Basics

  • Project name and purpose (one sentence)
  • Django version
  • Python version
  • Package manager (pip, uv, poetry, pipenv)
  • Virtual environment approach

2. Installed Apps & Key Packages

  • List of Django apps (from INSTALLED_APPS)
  • Key third-party packages (DRF, Celery, allauth, etc.)
  • Database backend (PostgreSQL, MySQL, SQLite)
  • Cache backend (Redis, Memcached, database, dummy)
  • Task queue (Celery + broker, Django Q, none)

3. Project Structure

  • Settings structure (single file, split base/dev/prod, django-environ, etc.)
  • Apps directory layout (apps/ folder, top-level, etc.)
  • Static and media file configuration
  • Template structure

4. Authentication & Users

  • Custom User model? (yes/no, location)
  • Auth backend (session, JWT, Token, allauth, custom)
  • User roles and permission approach (groups, per-object, django-guardian)

5. API Layer

  • REST framework in use? (DRF, Ninja, tastypie, none)
  • API versioning approach
  • Authentication method for APIs (JWT, Token, Session, OAuth)
  • Serialization approach (ModelSerializer, custom, Pydantic)

6. Key Models Summary

  • List the 5-10 most important models with a one-line description each
  • Any abstract base models or mixins used project-wide

7. Code Conventions

  • Code style (Black, Ruff, flake8, isort settings)
  • Type annotations (yes/no, partial)
  • Docstring convention (Google, NumPy, Sphinx, none)
  • Test runner (pytest-django, Django's test runner)
  • Naming conventions for models, views, URLs, templates

8. Deployment Context

  • Hosting (Heroku, AWS, GCP, DigitalOcean, bare metal, Docker)
  • Web server (gunicorn, uvicorn, uWSGI)
  • Reverse proxy (nginx, Caddy, none)
  • CI/CD (GitHub Actions, GitLab CI, CircleCI, none)
  • Environment variable management (.env + python-decouple, django-environ, OS env)

Output Format

Create .agents/django-project-context.md with this structure:

# Django Project Context

## Project
- **Name**: [project name]
- **Purpose**: [one sentence]
- **Django**: [version]
- **Python**: [version]
- **Package manager**: [pip/uv/poetry]

## Stack
- **Database**: [e.g., PostgreSQL 15]
- **Cache**: [e.g., Redis 7]
- **Task queue**: [e.g., Celery 5 + Redis]
- **API framework**: [e.g., Django REST Framework 3.15]
- **Auth**: [e.g., JWT via djangorestframework-simplejwt]

## Key Packages
[list of important packages with versions]

## Apps
[list of Django apps with one-line description each]

## Settings Structure
[describe: single file / split / environment-based]

## Authentication & Users
- **Custom User model**: [yes/no — path if yes]
- **Auth backend**: [description]
- **Permissions**: [approach]

## Key Models
| Model | App | Description |
|-------|-----|-------------|
| [ModelName] | [app] | [one-line description] |

## Code Conventions
- **Formatter**: [Black / Ruff / none]
- **Linter**: [Ruff / flake8 / none]
- **Type hints**: [yes / partial / no]
- **Test runner**: [pytest-django / Django test runner]
- **Naming**: [any project-specific conventions]

## Deployment
- **Hosting**: [platform]
- **Web server**: [gunicorn / uvicorn]
- **Reverse proxy**: [nginx / none]
- **CI/CD**: [tool]
- **Env vars**: [approach]

## Notes
[Any other important architectural decisions, gotchas, or conventions agents should know]

Task-Specific Questions

If the context file doesn't exist yet, ask:

  1. Can you share your settings.py (or settings directory) so I can extract your config?
  2. What's the main purpose of this Django project?
  3. Are there any unusual conventions I should know about?
  4. Any packages or patterns you always want used (e.g., always use select_related, always use class-based views)?

Related Skills

  • django-models: Uses context for naming conventions and existing model patterns
  • django-drf: Uses context for API framework and auth method
  • django-auth: Uses context for User model location and auth approach
  • django-deployment: Uses context for hosting platform and deployment approach
Weekly Installs
2
First Seen
4 days ago
Installed on
amp2
cline2
opencode2
cursor2
kimi-cli2
codex2