lvtd-llc/skills

django-outside-in-tdd

Drive Django features with outside-in and double-loop TDD: user story, Selenium or functional test, focused Django unit/integration tests, minimal implementation, and refactor.

First seen Jul 12, 2026

Installation

$ npx skills add lvtd-llc/skills --skill django-outside-in-tdd

Summary

  • Drive Django features with outside-in and double-loop TDD: user story, Selenium or functional test, focused Django unit/integration tests, minimal implementation, and refactor.
  • Use when starting or changing Django behavior with tests-first workflow, red/green/refactor, working-state-to-working-state refactors, or deciding which layer should own the next test.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from lvtd-llc/skills · top by installs.

npx skills add lvtd-llc/skills

Browse all from lvtd-llc/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version0.1.0
LicenseMIT
CompatibilityCodex, Claude Code, and other Agent Skills-compatible clients.
Declared agents claude-code codex
More metadata
version
0.1.0
displayName
Django Outside-In TDD
category
Django
tags
django,tdd,testing,functional-tests,unit-tests

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,618 B
  • docs SUMMARY.md 390 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Django Outside-In TDD

Use this skill when a Django feature should be grown from observable user behavior down into views, forms, models, and helpers. Keep the outer test broad enough to prove user value and the inner tests small enough to keep the red/green loop fast.

Source Traceability

Primary source: Harry Percival, Test-Driven Development with Python, 3rd ed. Guidance is transformed and paraphrased from chapters 1-7, chapter 24, and Appendix A, especially the user-story-to-functional-test flow, double-loop TDD, working-state-to-working-state refactoring, and outside-in development.

Workflow

  1. Start from the user-visible behavior.

- Write a short user story or acceptance note. - Choose one functional test only when the behavior crosses browser, routing, template, persistence, or integration boundaries.

  1. Run the outer test and make the failure useful.

- Confirm the failure is expected and points to the next missing behavior. - Improve failure messages before implementation if the failure is vague.

  1. Drop into the inner loop.

- Add the smallest Django test for the next missing component: URL, view, template context, form, model, or helper. - Use Django's test client, RequestFactory, form instances, or model tests at the narrowest useful boundary.

  1. Make the inner test pass with minimal code.

- Avoid speculative data models, URLs, fields, and abstractions. - Keep a scratchpad of next ideas instead of implementing them early.

  1. Refactor only on green.

- Refactor production code first, then test code. - Preserve behavior through the existing tests. - Return to the outer test to choose the next slice.

Read [patterns.md](references/patterns.md) for layer choices, refactoring rules, and failure-handling patterns.

Layer Choice

Signal Next Test
User workflow not proven Functional test
URL or redirect missing URL/view test
Template output changed View/template integration test or HTML parser assertion
Validation rule unclear Form or model test
Domain helper emerging Plain Python unit test
Refactor crosses wiring One integration test plus focused unit tests

Guardrails

  • Do not write production code before a failing proof unless the task is pure cleanup.
  • Do not keep adding Selenium coverage for every branch; promote detailed cases to faster tests.
  • Do not test constants or implementation details unless they are the public contract.
  • Prefer working state to working state over large rewrites.
  • Use existing green tests as a refactoring safety net before changing structure.

Verification

Before finishing, report:

  • Outer behavior covered or intentionally not needed.
  • Inner tests added, updated, or reused.
  • Red failure or characterization observed before implementation when behavior changed.
  • Focused Django test command and result.
  • Any deliberate no-test exception with replacement verification.