django-tdd

django-tdd is a skill for Claude Code, Codex from hashgraph-online/awesome-codex-plugins. It costs 32 tokens per session (4,513 once invoked), scanned A, a copy of django-tdd, Apache-2.0.

A Django testing guide for Python web applications, using pytest-django and related tools. It explains test-driven development (TDD), where you write a failing test before the code, then make it pass and improve the code.

In plain words
What is it for?
Use it when building Django applications or Django REST Framework APIs, setting up tests, or checking how much of the code tests cover.
Why use it?
It gives Django projects a repeatable way to test models, views, serializers, and web APIs instead of relying on manual checks. It also covers test setup, mocks, reusable test data, and coverage reports.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building Django applications or Django REST Framework APIs, setting up tests, or checking how much of the code tests cover.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hashgraph-online/awesome-codex-plugins/django-tdd
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hashgraph-online/awesome-codex-plugins --skill django-tdd
Clone the repo
git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for django-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/django-tdd.svg)](https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/django-tdd)
Your own site
<a href="https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/django-tdd"><img src="https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/django-tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,513 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 84% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.04513
Opus 5 $0.00016 $0.02256
Sonnet 5 $0.00006 $0.00903
Haiku 4.5 $0.00003 $0.00451

Measured 2d ago against content hash 99ef0936053a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

django-tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

84% identical to django-tdd — 27 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/Colin4k1024/tsp/skills/django-tdd/SKILL.md · 730 lines

How it starts

The opening of the file, as written. The whole thing — 730 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Django Testing with TDD

Test-driven development for Django applications using pytest, factory_boy, and Django REST Framework.

When to Activate

  • Writing new Django applications
  • Implementing Django REST Framework APIs
  • Testing Django models, views, and serializers
  • Setting up testing infrastructure for Django projects

TDD Workflow for Django

Red-Green-Refactor Cycle

# Step 1: RED - Write failing test
def test_user_creation():
    user = User.objects.create_user(email='[email protected]', password='testpass123')
    assert user.email == '[email protected]'
    assert user.check_password('testpass123')
    assert not user.is_staff

# Step 2: GREEN - Make test pass
# Create User model or factory

# Step 3: REFACTOR - Improve while keeping tests green

Setup

pytest Configuration

# pytest.ini
[pytest]
DJANGO_SETTINGS_MODULE = config.settings.test
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
addopts =
    --reuse-db
    --nomigrations
    --cov=apps
    --cov-report=html
    --cov-report=term-missing
    --strict-markers
markers =
    slow: marks tests as slow
    integration: marks tests as integration tests

Test Settings

# config/settings/test.py
from .base import *

DEBUG = True
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ':memory:',
    }
}

# Disable migrations for speed
class DisableMigrations:
    def __contains__(self, item):
        return True

    def __getitem__(self, item):
        return None

MIGRATION_MODULES = DisableMigrations()

# Faster password hashing
PASSWORD_HASHERS = [
    'django.contrib.auth.hashers.MD5PasswordHasher',
]

# Email backend
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

# Celery always eager
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_EAGER_PROPAGATES = True

conftest.py

# tests/conftest.py
import pytest
from django.utils import timezone
from django.contrib.auth import get_user_model

User = get_user_model()

@pytest.fixture(autouse=True)
def timezone_settings(settings):
    """Ensure consistent timezone."""
    settings.TIME_ZONE = 'UTC'

@pytest.fixture
def user(db):
    """Create a test user."""
    return User.objects.create_user(
        email='[email protected]',
        password='testpass123',
        username='testuser'
    )

@pytest.fixture
def admin_user(db):
    """Create an admin user."""
    return User.objects.create_superuser(
        email='[email protected]',
        password='adminpass123',
        username='admin'
    )

@pytest.fixture
def authenticated_client(client, user):
    """Return authenticated client."""
    client.force_login(user)
    return client

@pytest.fixture
def api_client():
    """Return DRF API client."""
    from rest_framework.test import APIClient
    return APIClient()

@pytest.fixture
def authenticated_api_client(api_client, user):
    """Return authenticated API client."""
    api_client.force_authenticate(user=user)
    return api_client

Read the full file on GitHub · 730 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 730 lines · 32 tokens per session scan A 99ef0936053a

Subscribe to this mod's changes

django-tdd is a skill published in the GitHub repository hashgraph-online/awesome-codex-plugins (947 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 4,513 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to django-tdd, differing in 27 lines, and is treated as a copy.

Related

Other skills, from other repositories

django-tdd

Django testing strategies with pytest-django, TDD methodology, factoryboy, mocking, coverage, and testing Django REST Framework APIs.

loulanyue/awesome-claude-notes · 32 tokens

springboot-tdd

Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.

loulanyue/awesome-claude-notes · 42 tokens

ring:running-dev-cycle

Running the backend dev cycle: implements every task in a rolling-wave plan.md (ring:writing-plans format) for a Go/TS service, driving specialist agents through Gate 0 implementation/TDD, Gate 8 parallel review, and Gate 9 validation per epic, elaborating later phases at each phase boundary. Use when starting or…

LerianStudio/ring · 122 tokens

ring:instrumenting-streaming-events

Instrumenting streaming events: wires lib-streaming event emission end-to-end into a Lerian Go service via a 13-gate cycle (catalog, Builder bootstrap, Emit sites, outbox, HTTP manifest, NoopEmitter fallback, integration and chaos tests), dispatching ring:backend-go under TDD. Consumes the validated…

LerianStudio/ring · 102 tokens

tdd-test-engineer

Use for test-first development, regression tests, flaky test debugging, coverage gaps, test strategy, CI failures, or converting bugs into minimal reproducible tests.

DominikTobureto/awesome-grok-build · 37 tokens

laravel-tdd

Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.

loulanyue/awesome-claude-notes · 27 tokens