# Django Orm Architecture Review

> Use when reviewing Django ORM model boundaries, querysets, migrations, managers, transactions, and data access patterns.

- Skill: `tomevault-io/django-orm-architecture-review` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/django-orm-architecture-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/django-orm-architecture-review/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/django-orm-architecture-review

---


# Django ORM Architecture Review

## When To Use

- The main decision is about Django model design, queryset optimization, migration safety, or transaction boundaries.
- Reviewing N+1 query behavior, model fatness, or data migration strategy.

## Workflow

1. Identify the model structure — field types, relationships, indexes, and constraints.
2. Review queryset patterns — select_related, prefetch_related, and annotate usage.
3. Check for N+1 query patterns in serializers, templates, or DRF views.
4. Review manager and queryset design — custom managers, chaining, and reuse.
5. Check transaction boundaries — `atomic()` blocks and transaction per request.
6. Review migration safety — data migrations, lock risks, and long-running migrations.
7. Recommend the smallest structural change that improves performance or maintainability.

## Output Format

```markdown
Django ORM review:
- Model structure:
- Queryset patterns:
- N+1 analysis:
- Manager design:
- Transaction boundaries:
- Migration safety:
- Recommended change:
- Verification:
```

---
> Source: [WangYao-GoGoGo/architecture-agent-skills](https://github.com/WangYao-GoGoGo/architecture-agent-skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

