Teaching AI agents to write Django like senior developers

Raí Siqueira
January 30, 2026

AI coding agents are reshaping how software gets built. Tools like Cursor, Claude Code, and GitHub Copilot can scaffold features in minutes, navigate large codebases, and unblock developers on tricky implementation details. For many teams, they already feel indispensable.

But if you work with Django long enough, you’ve probably noticed a pattern: the code runs, but something feels off.

Models are technically correct but awkward; views work but ignore conventions; migrations exist, but no one would feel confident shipping them to production. Celery tasks function, yet subtly violate patterns that only show their cost months later.

The gap is the accumulated experience with real Django systems. AI agents are great at generating code. What they lack is the kind of Django-specific judgment that teams accumulate after years of building, maintaining, and fixing real systems.

At Vinta, we decided to address that gap directly: we distilled more than a decade of Django production experience into reusable, open-source skills that teach AI agents how experienced Django developers actually build software.

Table of Contents

Why Django is hard to “prompt” correctly

Django rewards consistency and punishes improvisation. There are dozens of ways to define a model, structure a view, or expose an API endpoint. Most of them work; only some of them age well.

Experienced Django teams develop strong instincts around things like:

  • When a model should be split, and when it should not
  • How to structure migrations to avoid painful rollbacks
  • Where business logic belongs, and where it absolutely does not
  • How to design Celery tasks that are safe to retry in production
  • Which Django REST Framework abstractions scale, and which quietly accumulate debt

These decisions are rarely documented in one place. They live in code reviews, postmortems, and institutional memory.

When you ask an AI agent to “create a Django model” or “add a Celery task”, it doesn’t have access to that context. So it fills the gap with generic patterns, or worse, patterns borrowed from other frameworks. The result is code that compiles, but doesn’t feel like Django written by an expert team.

From human experience to agent-readable knowledge

We approached this problem by packaging Django expertise itself into a form that AI agents can reason about and apply. That mechanism is called Agent Skills.

Agent Skills are an open format for extending AI coding agents with deep, domain-specific knowledge. Each skill is a small, self-contained bundle that includes:

  • A clear description of when it should be used
  • Structured instructions for how to approach a task
  • Optional reference documents, templates, or scripts

What makes this powerful is progressive disclosure: agents load only high-level skill metadata at startup, pulling detailed guidance only when a task requires it. This keeps agents fast and focused, while still giving them access to deep expertise exactly when it matters.

What’s inside the Django AI Skills

We started by encoding the areas where AI agents most often struggle in Django projects. The result is Django AI Skills, an open-source set of agent skills available on our GitHub repository.

django-expert

This skill provides comprehensive guidance across core Django development areas, including:

  • Model and database design, with attention to migrations and long-term schema evolution
  • View and URL routing patterns, including when to use function-based or class-based views
  • Django REST Framework conventions for serializers, viewsets, pagination, and filtering
  • Testing strategies that balance speed, coverage, and confidence
  • Security defaults around CSRF, authentication, and common injection risks
  • Performance considerations like query optimization, indexing, and caching
  • Production-readiness patterns for settings, monitoring, and deployment

When activated, the agent follows a structured workflow:

  • Analyze the request
  • Load only the relevant references
  • Apply production-tested patterns
  • Validate the output against quality expectations

django-celery-expert

Asynchronous work is one of the fastest ways to accumulate invisible technical debt, especially with AI-generated code.

This skill focuses specifically on Celery in Django projects, covering:

  • Correct integration with Django transactions using transaction.on_commit
  • Task idempotency and retry safety
  • Broker configuration for Redis, RabbitMQ, or SQS
  • Error handling strategies with exponential backoff
  • Periodic task scheduling and monitoring
  • Deployment patterns for Docker, Kubernetes, and systemd

Instead of treating background tasks as an afterthought, the agent learns to design them the way experienced teams do: defensively, observably, and with failure in mind.

Skills vs runtime introspection: how this fits with Django AI Boost

If you’ve seen our previous work on Django AI Boost, you might wonder how these pieces relate.

They solve different problems, and they work best together. Django AI Boost is an MCP server that lets AI agents inspect your actual Django project at runtime. It exposes tools to:

  • Discover existing models and fields
  • Inspect URL configurations
  • Examine database schemas
  • Read application logs and settings

In short, it gives the agent eyes into your specific codebase. Django AI Skills do something different. They don’t look at your project at all. Instead, they encode how Django should be built, based on proven patterns and production experience.

One answers:
“What does this project look like?”

The other answers:
“How should I build this properly?”

When combined, the agent can understand your current system and apply expert-level Django judgment while writing new code.

Building on strong foundations

We see these skills as part of a broader ecosystem, not a standalone trick. Many teams already rely on solid foundations like:

  • Cookiecutter Django for well-structured project scaffolding
  • Vinta’s Django React Boilerplate for full-stack applications with modern frontends

These tools establish a strong baseline. Django AI Skills sit on top of that foundation, helping agents respect and extend it rather than fight against it.

The result is a workflow where:

  • New projects start from well-understood structures
  • AI agents generate code that aligns with those structures
  • Teams spend less time rewriting and more time shipping confidently

Raising the floor for AI-assisted Django work

AI coding agents are only as reliable as the context they operate with. If we want them to be genuinely useful for serious Django work, we need to give them the same kind of knowledge experienced developers carry. And we need to do that in a way that’s transparent, inspectable, and improvable.

That’s why Django AI Skills are fully open source: we see them as living artifacts of Django practice, shaped by real projects and refined through community contribution.

Our hope is that this approach helps teams trust AI agents more, without lowering their standards. The future of Django development is one where experienced teams are amplified by AI, not displaced by it.