Use when adding, changing, testing, or debugging Django Q2 background tasks, scheduled jobs, qcluster workers, Redis broker configuration, or ORM broker fallback in Django projects.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/15/2026
What it changes
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
Without skill95%
With skill100%
Checks it passed that the model alone missed
Use Schedule.objects.get_or_create with a unique name parameter
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+90%
Agent turns
0%
Response time
-41%
Model gemini-3.6-flashMeasured 8/15/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
We want to seed a scheduled background job named 'nightly-backup' in Django using python code executed during deployments. Write the ORM code snippet that creates this `Schedule` entry without generating duplicate schedule rows if the deploy script is executed multiple times.
What was checked, without and with the skill
Checked
Without skill
With skill
Use Schedule.objects.get_or_create with a unique name parameter
Missed
Passed
case-05 · gemini-3.6-flash · 8/15/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md181 lines2 files
Django Q2 Background Jobs
Use this before touching task enqueueing, schedules, worker deployment,
Q_CLUSTER, or code imported by Django Q2 workers.
Configuration Checks
The dependency is django-q2; the Python import path is django_q.
django_q is in INSTALLED_APPS; its migrations provide task result,
schedule, and broker models.
Find Q_CLUSTER in the project's settings module before changing task,
worker, or broker behavior.
Confirm the configured broker. Redis is common, often through an environment
variable such as REDIS_URL; the ORM broker is useful for low-throughput or
Redis-free deployments.
Confirm the project's worker command. The base command is
python manage.py qcluster, but projects may wrap it with uv, Poetry,
Docker Compose, process managers, or platform-specific worker declarations.
If Redis is removed as the broker, review any Redis-dependent cache, health
check, Docker, deployment, and documentation references separately.
Mental Model
Web code calls async_task(...) or creates Schedule rows.
The broker stores queued task packages until a qcluster process reserves
work.
Worker processes execute importable Python functions and save results or
failures.
The scheduler runs inside the cluster. Schedules are database rows; they do
nothing unless qcluster is running.
Adding Tasks
Put the task function in the app that owns the behavior, usually a
tasks.py module or another importable module already used by the project.
Keep the function importable at module import time. Do not rely on request
objects, local closures, or process-local state.
Pass durable identifiers such as primary keys, not model instances, open
files, connections, or large payloads.
Make the task idempotent. Redis does not give exactly-once execution