$npx skillfedfor your agent

django-idioms

Learn Django conventions that emphasize model-centric design, clean separation of concerns, and test-driven development. This skill covers best practices for the ORM, views, migrations, and testing frameworks like pytest-django, helping you write maintainable, DRY code aligned with Django's philosophy.

django-idioms teaches idiomatic Django patterns for models, views, ORM queries, and testing.

AI-generated summary based on this skill's SKILL.md

150 48 MITupdated by irahardianto

Decision gist · record as of 2026-07-17

django-idioms teaches idiomatic Django patterns for models, views, ORM queries, and testing. Learn Django conventions that emphasize model-centric design, clean separation of concerns, and test-driven development. This skill covers best practices for the ORM, views, migrations, and testing frameworks like pytest-django, helping you write maintainable, DRY code aligned with Django's philosophy.

manual: git clone https://github.com/irahardianto/awesome-agv → cp -r awesome-agv/.agents/skills/django-idioms ~/.claude/skills/django-idioms
.agents/skills/django-idioms/SKILL.md · version 9a84e5d9

Use it when

  • django-idioms covers query optimization through select_related and prefetch_related.
  • django-idioms promotes pytest-django for cleaner, more flexible test organization than Django's default unittest framework.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

irahardianto/awesome-agv/django-idioms · repository language: JavaScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are django best practices for structuring models and views?

django-idioms teaches model-centric design where business logic lives in models, not views. Follow the "fat models, thin views" pattern: use custom managers and QuerySet methods to encapsulate ORM logic, keep views focused on request/response handling, and leverage Django's built-in features like signals and properties. This separation improves testability and reusability across your application.

How does django-idioms address N+1 query problems?

django-idioms covers query optimization through select_related and prefetch_related. Use select_related for forward ForeignKey and OneToOneField relationships to fetch related objects in a single query; use prefetch_related for reverse relations and ManyToMany fields. The skill emphasizes profiling with Django Debug Toolbar and understanding your ORM's SQL output to catch performance issues early.

What testing approach does django-idioms recommend with pytest?

django-idioms promotes pytest-django for cleaner, more flexible test organization than Django's default unittest framework. Use fixtures for setup, parametrize tests for multiple scenarios, and leverage factory-boy for realistic test data. The skill covers testing models, views, serializers, and API endpoints while maintaining fast test suites and clear assertions.

How should I use DRF serializers and class-based views?

django-idioms teaches DRF serializers as the bridge between models and JSON, with validation logic embedded in serializer methods. Combine them with class-based views (CBVs) like ViewSets and generics to reduce boilerplate. Understand when to override to_representation, validate, and create/update methods; keep serializers focused on data transformation, not business rules.

What are django orm anti-patterns to avoid?

django-idioms identifies common pitfalls: querying in loops (N+1), using raw SQL when the ORM suffices, ignoring database constraints, and mixing data access with presentation logic. Learn to recognize these patterns, use Django's query analysis tools, and apply idiomatic solutions like custom managers, aggregation, and proper indexing for maintainable, performant code.

How does django-idioms guide safe database migrations?

django-idioms covers migration best practices: write reversible migrations, avoid data migrations in production, test migrations locally, and use RunPython carefully with explicit rollback logic. Understand schema vs. data changes, deploy migrations before code, and use tools like django-safemigrate to prevent accidental downgrades in multi-environment setups.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Django Idioms and Patterns

Django rewards convention, the ORM, and "batteries included" design. Idiomatic Django = DRY, model-centric, well-tested.

> Scope: Django-specific patterns. For Python: @.agents/skills/python-idioms/SKILL.md.

Models

  1. Fat models, thin views — business logic in models/managers, not views.
  2. Custom managers for common queries: ```python class TaskManager(models.Manager): def active(self): return self.filter(status='active')

class Task(models.Model): objects = TaskManager() ```

  1. Meta class for ordering, constraints, indexes.

Views

  1. Class-based views for CRUD, function-based for simple/custom: python class TaskListView(LoginRequiredMixin, ListView): model = Task queryset = Task.objects.active() paginate_by = 25

  2. DRF serializers for API boundaries: ```python class

(truncated - see the full file via the links below)

File tree — 1 file
.agents/skills/django-idioms/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn idiomatic Django patterns for models, views, and ORM”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Django Reviewer
by vintasoftware · vintasoftware/django-ai-plugins

Django Reviewer analyzes your Django and Python code for clarity, consistency, maintainability, and adherence to project conventions. It identifies anti-patterns in the ORM and Django REST Framework, respects authorization boundaries, and reports findings with suggested refinements rather than making unauthorized changes.

no license declared → metadata onlyupdated Jul 2026
★ 112repo stars
Django Expert
by vintasoftware · vintasoftware/django-ai-plugins

Django Expert delivers comprehensive backend development guidance covering model design, view implementation, Django REST Framework APIs, query optimization, authentication, testing strategies, and security practices. It references bundled documentation on ORM patterns, performance tuning, production deployment, and common pitfalls to help you build maintainable applications.

no license declared → metadata onlyupdated Jul 2026
★ 112repo stars
django-expert
by Jeffallan · Jeffallan/claude-skills

Django Expert guides you through building production-grade REST APIs using Django and Django REST Framework. It covers model design with database indexes, query optimization via select_related and prefetch_related, serializer validation, viewset implementation, and authentication setup. The skill enforces best practices like environment-based secrets, proper permissions, and comprehensive testing.

MITupdated May 2026
★ 10,759repo stars
django-rest-api-development
by Mindrally · Mindrally/skills

This skill provides architectural guidance for constructing production-grade REST APIs with Django and Django REST Framework. It covers project structure, class-based views, database optimization, JWT authentication, and performance strategies including caching and query optimization.

Apache-2.0updated Jun 2026
★ 202repo stars
Spring Boot Idioms
by irahardianto · irahardianto/awesome-agv

Learn idiomatic Spring Boot 3.x patterns grounded in auto-configuration, constructor injection, and actuator-driven observability. Covers dependency injection best practices, Spring Data JPA query methods and projections, REST controller design with DTOs, and structured logging for production readiness. Includes testing patterns for integration and controller slices.

MITupdated Jul 2026
★ 150repo stars
Laravel Idioms
by irahardianto · irahardianto/awesome-agv

Learn Laravel's idiomatic approach to building maintainable applications through Eloquent query scopes, service-oriented architecture, and Form Request validation. Covers testing with Pest, code formatting with Pint, and static analysis via PHPStan to enforce framework best practices.

MITupdated Jul 2026
★ 150repo stars

More skills ml-engineering (MIT) · django-patterns (Apache-2.0) · hono-idioms (MIT) · angular-idioms (MIT) · elixir-idioms (MIT)

Tags
orm-optimizationrest-api-designtest-patternscode-structurequery-performanceschema-managementvalidation-serializationframework-conventions