django-tdd

django-tdd is a skill for Claude Code, Codex from sjarmak/coding-agent-workflows. It costs 32 tokens per session (4,570 once invoked), scanned A, a copy of django-tdd, MIT.

A testing guide for Django, a Python web framework, using pytest and test-driven development (TDD). TDD means writing a failing test before the code that makes it pass.

In plain words
What is it for?
Use it to create Django tests, test REST APIs, build test data, replace external parts with mocks, and track test coverage.
Why use it?
It provides a repeatable way to catch broken models, views, serializers, and web APIs while they are being built.

Skill for Claude CodeCodex

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

Good fit Use it to create Django tests, test REST APIs, build test data, replace external parts with mocks, and track test coverage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sjarmak/coding-agent-workflows/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 sjarmak/coding-agent-workflows --skill django-tdd
Clone the repo
git clone --depth 1 https://github.com/sjarmak/coding-agent-workflows

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/sjarmak/coding-agent-workflows/django-tdd/github.svg)](https://agentmods.dev/skills/sjarmak/coding-agent-workflows/django-tdd)
Your own site
<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/django-tdd"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/django-tdd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for django-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/django-tdd"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/django-tdd.svg" alt="Reviewed on agentmods" width="80" 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,570 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 81% 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.04570
Opus 5.5 $0.00013 $0.01828
Sonnet 5.5 $0.00006 $0.00914
Haiku 4.5 $0.00003 $0.00457

Measured 1mo ago against content hash 4d77225d4f14, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 1mo 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

81% identical to django-tdd — 7 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.

optional/skills/django-tdd/SKILL.md · 735 lines

How it starts

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

Django Testing with TDD

Use the project's installed version and conventions. Verify version-sensitive APIs, security settings, and deployment support with documentation-lookup before applying examples; these patterns are reference guidance, not a tested guarantee for every current release. Do not replace an existing toolchain solely to match an example.

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

Read the full file on GitHub · 735 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. 1mo ago First seen · 735 lines · 32 tokens per session scan A 4d77225d4f14

Subscribe to this mod's changes

django-tdd is a skill published in the GitHub repository sjarmak/coding-agent-workflows (7 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 4,570 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 81% identical to django-tdd, differing in 7 lines, and is treated as a copy.

Related

django-tdd compared with skills from other repositories

django-tdd next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
django-tddsjarmak/coding-agent-workflowsSkill72d agoMITA32Claude Code, Codex
tddmxyhi/ok-skillsSkill5189d agoApache-2.0A33Codex
test-driven-developmentaddyosmani/agent-skillsSkill121k6d agoMITA118Claude Code
Vibe Coding MasteryLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA61Claude Code, Codex
tddbacknotprop/pstackSkill5.5ktodayMITA52Claude Code, Codex, Cursor
user-story-writermohitagw15856/pm-claude-skillsSkill1.6ktodayMITA79Claude Code, Codex
planning-with-filesmxyhi/ok-skillsSkill5189d agoApache-2.0A117Claude Code