# django-perf-review

This skill reviews Django code for N+1 queries, unbounded querysets and missing indexes. Useful before a release or when a page slows down on large tables.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2900 installs · ★ 1089
- Author: getsentry
- License: LICENSE · policy=link-only · description only; the file stays with the author
- Source: https://github.com/getsentry/skills/tree/HEAD/skills/django-perf-review/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/django-perf-review

## What it does

The skill reviews Django code and reports only performance issues it can prove. It starts by researching the codebase: tracing the data flow, checking for existing optimizations, verifying data volume. A pattern match is not validation, so an issue has to be confirmed before it lands in the report.

Findings are grouped by impact. N+1 queries and unbounded querysets sit at the top: they multiply as data grows and end in timeouts or workers killed for memory. Missing indexes and write loops come next, where a single statement turns into N. DRF serializers get the same treatment, because touching a related field inside a serializer produces the same N+1 when the queryset is not optimized.

Zero findings is an acceptable outcome, and the skill is told not to manufacture issues to look thorough. It runs with `Read`, `Grep`, `Glob`, `Bash` and `Task` allowed, since tracing a view down to a template or serializer and checking table size needs those tools.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/skills --skill django-perf-review -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/django-perf-review/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/django-perf-review/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/skills --skill django-perf-review -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/django-perf-review/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/skills --skill django-perf-review -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/django-perf-review/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install getsentry/skills django-perf-review
```

2. **Manually: put the files in place**
- File: `.github/skills/django-perf-review/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/skills --skill django-perf-review -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/getsentry/skills --path skills/django-perf-review
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/django-perf-review/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add getsentry/skills --skill django-perf-review -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/getsentry/skills/tree/HEAD/skills/django-perf-review/SKILL.md

## When to use it
- find N+1 queries in list views and templates
- check querysets for missing pagination
- spot unindexed fields used in filters and ordering
- replace create() and save() loops with bulk operations
- catch N+1 inside DRF serializers

## Example prompts
- review Django performance in the orders app
- find N+1 queries in the user list view
- check the catalog querysets for unbounded loads

## Similar
- [django-expert](https://affpapa.org/en/nevibecode/skills/django-expert.md) — skill · 5700 installs
- [django-patterns](https://affpapa.org/en/nevibecode/skills/django-patterns.md) — skill · 5200 installs
- [django-developer](https://affpapa.org/en/nevibecode/agents/django-developer.md) — subagent · 344 installs
- [django-python](https://affpapa.org/en/nevibecode/skills/django-python.md) — skill · 933 installs
- [django-security](https://affpapa.org/en/nevibecode/skills/django-security.md) — skill · 5000 installs
- [django-celery-expert](https://affpapa.org/en/nevibecode/skills/django-celery-expert.md) — skill · 1100 installs

From the same set: [getsentry/skills](https://affpapa.org/en/nevibecode/by/getsentry/skills.md) — 20 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
