Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Generates production-ready Django + DRF code following a strict layered architecture: views, serializers, services, selectors, and models each confined to defined responsibilities. Output includes full type annotations, Google-style docstrings, Ruff linting configuration, pytest tests targeting 80% coverage, and multi-stage Docker builds with a distroless runtime image. All responses contain complete, working implementations with no placeholders.
Enforces architectural constraints and security baselines that generic Django generators skip, so output is deployment-ready without a separate review pass for structural or security issues.
When to use it
- Scaffolding a new Django REST API with production project structure
- Adding a service/selector-layered app to an existing Django project
- Configuring ASGI deployment with Gunicorn and Uvicorn workers
- Building Docker Compose stacks with PostgreSQL, Redis, and Nginx
- Generating pytest test suites with factory-boy fixtures for Django views and services
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: Create a users app with registration and token authentication
- 1Generates canonical directory structure under apps/users/ with models, views, serializers, services, selectors, and tests
- 2Implements custom AbstractUser model and sets AUTH_USER_MODEL in pydantic-settings config
- 3Writes services.py with business logic and selectors.py for read queries, keeping views thin
- 4Creates DRF serializers with explicit field lists and permission_classes declared at view level
- 5Produces pytest test files using factory-boy fixtures targeting 80%+ coverage
Complete users app with working registration endpoint, token auth, health check, Docker Compose stack, and passing test suite