- Home
- Skills
- APIs & Backend
- Django Backend Engineering Standards
More screenshots
Works with the AI Agents you already use
Django Backend Engineering Standards
Production Django/DRF playbook: factory architecture, scrub→upsert→publish pipeline, Keycloak auth, Celery, safe Postgres migrations.
Free
Django Backend Engineering Standards
Example session with this skill installed
Add an endpoint that lets a partner push product listings in bulk. They may resend the same payload, so it has to be safe to retry. Follow our Django backend standards.
- Read your context and instructions
- Compiled the django backend engineering
Summary
Added a bulk listings endpoint that is safe to retry. Example output: the exact file layout depends on your service style (factory or layered), which the skill checks first.
What the agent did
| Step | Decision | Why |
|---|---|---|
| Identify style | Layered service, so view -> service -> repository | Match the file being edited, then the repo |
| Validate | Scrubber runs before any write and returns clean DTOs | Bad rows are rejected early with clear errors |
| Persist | One bulk upsert keyed on (partner_id, external_id) | A resend updates rows instead of duplicating them |
| Publish | A Celery task serializes and indexes the changed ids | The request stays fast, the task is idempotent and retried |
| Auth | Partner API key, private-by-default permission class | No endpoint is public by accident |
Core of the change
Listing.objects.bulk_create(
rows,
update_conflicts=True,
unique_fields=["partner_id", "external_id"],
update_fields=["title", "price", "updated_at"],
)
publish_listings.delay(ids=changed_ids) # idempotent, retried with backoff
Checks before merge
- No N+1 on the serializer context (prefetch the related rows once)
- Migration for the unique constraint uses a concurrent index
- Structured log line with partner id and row counts (structlog)
Next steps
- Add an API test that posts the same payload twice and asserts the row count is unchanged.
- Add a Celery test for the retry path.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop re-deciding how a Django backend should be built
This skill gives your coding agent a complete, opinionated rulebook for production Django and DRF services. It doesn't teach Django. It tells the agent which pattern to use, why, and what the bad alternative looks like, so the code it writes matches a mature codebase on the first try.
How it helps
- Consistent architecture. The agent works out whether a service is multi-brand factory style or layered/repository style, then follows that style instead of mixing both.
- Safer data writes. Validate, upsert, publish: PostgreSQL-native
ON CONFLICTupserts, then serialize to the index and cache. - Fewer incidents. Timeout-aware migrations, concurrent indexes, and idempotent Celery tasks with retries.
- Less review back-and-forth. Naming, exceptions, structured logging (structlog) and test conventions are spelled out.
- Auth that fits. Keycloak authentication, a Principal permission model, and API keys for service-to-service calls.
What's inside
A short SKILL.md router plus 10 reference guides the agent loads only when it touches that area: architecture, API and views, serializers and scrubbers, models and migrations, queries and database, auth and Keycloak, Celery and jobs, caching and search, logging and observability, and code style and testing.
Every practice explains why it exists, where it's used, when to use it, the tradeoffs, and a production example.
Use it when
Building or reviewing Django/DRF features (views, models, serializers, tasks, queries, auth, caching, search) or scaffolding a new service.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 1 day ago
- Free to download with an account