workflows/workflows/agent-environment-setup/platforms/copilot/skills/django-drf/SKILL.md
Use when building Django 5.1+ REST APIs with Django REST Framework 3.15+, covering serializers, viewsets, permissions, filtering, pagination, and async support.
npx skillsauth add cubetiq/cubis-foundry django-drfInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use when building Django 5.1+ REST APIs with Django REST Framework 3.15+, covering serializers, viewsets, permissions, filtering, pagination, and async support.
Meta options before writing serializers because serializers derive field behavior from models and missing constraints surface as silent data corruption.create/update methods that are tedious and error-prone to replicate.SerializerMethodField and control depth explicitly because depth = N auto-nesting exposes unpredictable schema shapes and triggers uncontrolled joins.get_queryset() in ViewSets to scope data by the authenticated user or tenant because the default queryset class attribute returns all rows and is the most common authorization bypass in DRF projects.IsAuthenticated because inline if checks in view methods are untestable, easy to forget on new actions, and invisible to DRF's schema introspection.select_related and prefetch_related in get_queryset() for every endpoint returning related objects because DRF serializers trigger lazy loads per row and N+1 queries are the leading performance problem in DRF APIs.django-filter FilterSet classes for query-parameter filtering instead of manual request.query_params parsing because FilterSet integrates with DRF schema generation, validates filter values, and prevents injection of arbitrary lookups.transaction.atomic() and use serializer.save() inside the block because partial writes without transactions leave the database in states that no serializer validation can prevent.APITestCase tests with APIClient and factory-generated data for every endpoint because DRF content negotiation, authentication, and permission classes introduce integration-layer bugs that model-level tests do not catch.@action decorator for custom ViewSet endpoints instead of standalone APIView classes because @action inherits the ViewSet's permission, throttle, and queryset configuration automatically.manage.py check --deploy and manage.py showmigrations as verification checkpoints because these commands surface missing migrations, insecure settings, and deployment configuration gaps before code review.../web-testing/SKILL.md only when the task needs live browser evidence against a Django-backed UI surface.Provide implementation guidance, code examples, management commands, and settings snippets as appropriate to the task. Include migration operations when schema changes are involved.
Load on demand. Do not preload all reference files.
| File | Load when |
| --- | --- |
| references/serializers-viewsets.md | You need serializer design, nested serializer patterns, ViewSet mixins, or router configuration guidance. |
| references/permissions.md | You need custom permission classes, object-level permissions, or authentication backend configuration. |
| references/filtering-pagination.md | You need django-filter setup, search/ordering backends, cursor pagination, or query-parameter validation. |
| references/testing.md | You need APITestCase patterns, APIClient usage, factory_boy integration, or test database strategies. |
| references/async-support.md | You need Django 5.1 async views, async ORM queries, ASGI configuration, or async middleware patterns. |
No helper scripts are required for this skill right now. Keep execution in SKILL.md and references/ unless repeated automation becomes necessary.
tools
Use when investigating latest vendor behavior, comparing tools or platforms, verifying claims beyond the repo, or gathering external evidence before implementation.
documentation
Use when designing database schemas, normalization strategies, indexing plans, query optimization, and migration workflows for relational, document, or hybrid data stores.
development
Use when writing, reviewing, or refactoring modern C#/.NET code, including minimal APIs, records, async streams, pattern matching, DI lifetimes, and memory-efficient performance tuning.
development
Use when conducting code reviews, building review checklists, calibrating review depth, providing structured feedback, or establishing team review practices. Covers review methodology, feedback patterns, automated checks, and batch review strategies.