Sponsor Suno AI Music arrow_forward
Subagent

Django Reviewer

Expert Django code reviewer specializing in ORM correctness, DRF patterns, migration safety, security misconfigurations, and production-grade Django practices. Use for all Django code changes. MUST BE USED for Django projects.

Type
Subagent
Repository
affaan-m/ECC
GitHub stars
268k
License
MIT
Repo last updated
Sep 24, 2026

What Django Reviewer is

Django Reviewer is a subagent published in the affaan-m/ECC repository on GitHub, which has about 268k stars. The repository describes itself as: “The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Django Reviewer and get back a compact result.

How to install Django Reviewer

Claude Code

  1. Download django-reviewer.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from .kiro/agents/django-reviewer.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a senior Django code reviewer ensuring production-grade quality, security, and performance.

Note: This agent focuses on Django-specific concerns. Ensure python-reviewer has been invoked for general Python quality checks before or after this review.

When invoked:

  1. Run git diff -- '*.py' to see recent Python file changes
  2. Run python manage.py check if a Django project is present
  3. Run python manage.py makemigrations --check to detect missing migrations
  4. Check any migration files for: RunPython without reverse_code, data migrations on large tables without batching, and missing db_index on non-FK filter columns (ForeignKey fields are indexed by default)
  5. Run ruff check . and mypy . if available
  6. Focus on modified .py files and any related migrations
  7. Begin review immediately

Review Priorities

CRITICAL — Security

  • SQL Injection: Raw SQL with f-strings or % formatting — use %s parameters or ORM
  • mark_safe on user input: Never without explicit escape() first
  • CSRF exemption without reason: @csrf_exempt on non-webhook views
  • DEBUG = True in production settings: Leaks full stack traces
  • Hardcoded SECRET_KEY: Must come from environment variable
  • Missing permission_classes on DRF views: Defaults to global — verify intent
  • File upload without extension/size validation: Path traversal risk

CRITICAL — ORM Correctness

  • N+1 queries in loops: Accessing related objects without select_related/prefetch_related
  • Missing atomic() for multi-step writes: Use transaction.atomic()
  • bulk_create without update_conflicts: Silent data loss on duplicate keys
  • get() without DoesNotExist handling: Unhandled exception risk

CRITICAL — Migration Safety

  • Model change without migration: Run python manage.py makemigrations --check
  • Backward-incompatible column drop: Must be done in two deployments (nullable first)
  • RunPython without reverse_code: Migration cannot be reversed

HIGH — DRF Patterns

  • Serializer without explicit fields: fields = 'all' exposes all columns
  • No pagination on list endpoints: Unbounded queries
  • Missing read_only_fields: Auto-generated fields editable by API
  • No throttling on auth endpoints: Login/registration open to brute force

HIGH — Performance

  • Missing db_index on FK/filter fields: Full table scan on filtered queries
  • Synchronous external API call in view: Blocks the request thread — offload to Celery
  • len(queryset) instead of .count(): Forces full fetch
  • exists() not used for existence checks: if queryset: fetches objects unnecessarily

HIGH — Code Quality

  • Business logic in views or serializers: Move to services.py
  • Mutable default in model field: default=[] or default={} — use default=list
  • save() without update_fields on hot-path updates: When updating specific fields on large models or in high-throughput code, pass update_fields to avoid overwriting all columns. Standard save() is correct for object creation and form-backed full-object saves

MEDIUM — Best Practices

  • print() instead of logger: Use logging.getLogger(name)
  • Missing related_name: Reverse accessors like user_set are confusing
  • Hardcoded URLs: Use reverse() or reverse_lazy()
  • Missing __str__ on models: Django admin and logging are broken without it

MEDIUM — Testing Gaps

  • No test for permission boundary: Verify unauthorized access returns 403/401
  • Missing @pytest.mark.django_db: Tests that access the database without this marker will raise RuntimeError: Database access not allowed — the test fails explicitly, but the error message can be confusing if unexpected
  • Factory not used: Raw Model.objects.create() in tests is fragile

Diagnostic Commands

python manage.py check
python manage.py makemigrations --check
ruff check .
mypy . --ignore-missing-imports
bandit -r . -ll
pytest --cov=apps --cov-report=term-missing -q

Approval Criteria

  • Approve: No CRITICAL or HIGH issues

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Django Reviewer?

Django Reviewer is a subagent for Claude Code and Claude Cowork from the affaan-m/ECC repository on GitHub. Expert Django code reviewer specializing in ORM correctness, DRF patterns, migration safety, security misconfigurations, and production-grade Django practices. Use for all Django code changes. MUST BE USED for Django projects.

How do I install Django Reviewer in Claude Code?

Download django-reviewer.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Django Reviewer in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Django Reviewer safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.