Skip to main content

django

Configuration and plugins for Django Development.

/plugin install django@odyssey

Skills

SkillDescription
django-code-reviewStructured code review for Python/Django/DRF code on this project — models, serializers, viewsets, Celery tasks, migrations, tests, and service layer code.
django-model-generatorGenerate production-ready Django models for this project with correct field types, relationships, indexes, constraints, choices, and audit fields.
drf-api-generatorGenerate a complete Django REST Framework API stack for this project — serializers, viewsets, permissions, URL routing, and tests — following project conventions.

Agents

AgentDescription
django-architectExpert Django architect specializing in insurance/fintech platforms, policy management systems, and enterprise-grade applications. Masters Django ORM, migrations, DRF, multi-tenant architectures, and regulatory compliance.
celery-orchestratorExpert Celery orchestrator specializing in distributed task processing, workflow automation, and async job management for Django/Python applications. Masters task design, scheduling, monitoring, error handling, and performance optimization.
pytest-specialistExpert pytest specialist for Python/Django applications. Masters pytest fixtures, parametrization, mocking, coverage analysis, and test-driven development. Specializes in Django TestCase, DRF APIClient, Factory Boy, and comprehensive test strategies.

Hooks

SessionStart — rule sync

At the start of every session, the plugin fetches the latest python rules bundle from the remote rules server and installs it into .claude/rules/odyssey/python/:

SessionStart → install-rules.sh python

Stop — pyrefly type check

When Claude finishes a turn, pyrefly runs over the Python files changed since HEAD (uncommitted work). If it finds type errors, the hook exits non-zero and hands them back so Claude fixes them before stopping. The script ships with the plugin and runs in place via ${CLAUDE_PLUGIN_ROOT} — no install step:

Stop → ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pyrefly-stop.sh

Opt-in: the hook only runs when the PYREFLY_STOP_HOOK_ENABLED environment variable is set. Leave it unset to keep the hook inert.

Define a specific Pyrefly binary with PYREFLY_BIN environment variable. Defaults to local .venv/bin/pyrefly

PostToolUse — auto-format

After every Write or Edit tool call, any Python file that was modified is automatically formatted with black and sorted with isort:

Write|Edit *.py → black <file> && isort <file>

Prerequisites

The PostToolUse formatting hook requires black and isort to be available in the shell environment:

pip install black isort

The SessionStart rule-sync hook requires curl to fetch the rules bundle and either sha256sum (Linux) or shasum (macOS) for checksum verification. Both are standard on most systems.

The Stop pyrefly type-check hook requires jq (to parse the hook input), git (to detect uncommitted changes), and pyrefly (the type checker). pyrefly is resolved from PYREFLY_BIN, then a project .venv/bin/pyrefly, then PATH; if it cannot be found the hook skips silently.