Drives test-driven development through a strict RED-GREEN-REFACTOR cycle with test-runner detection, a "fails for the right reason" gate, checkpoint commits, and a short evidence report. Use when implementing a feature, fixing a bug, or refactoring logic where the expected behaviour can be written as a test before the code exists.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# TDD Workflow
Tests come first. The failing test is the specification; the passing test is the proof.
This skill gives the cycle enough structure that "I wrote tests" always means
"a test failed, then passed, and here is the evidence".
## When to use
- New behaviour with definable inputs and outputs (business logic, parsers, API handlers, validators, state machines).
- Bug fixes: the reproducer test is the first artefact, always.
- Refactors of logic that already has tests (the tests are the safety net) or should have them.
- A task in a plan produced by `opm:writing-plans` whose `verify` step names a test.
Skip TDD (write tests afterwards, or not at all) for: pure layout and styling, throwaway prototypes,
one-off scripts, configuration edits, glue with no logic. The heuristic: can you write
`expect(fn(input)).toBe(output)` before writing `fn`? If yes, use this skill.
## Step 0: Detect the test runner
Never assume `npm test`. Resolve the commands once, before writing any test.
**Node / TypeScript.** Package manager comes from the lockfile or `package.json` `packageManager`:
`pnpm-lock.yaml` -> pnpm, `yarn.lock` -> yarn, `bun.lock`/`bun.lockb` -> bun, otherwise npm.
…
The line at the top of this page pins the label git:20260912.a10a790, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
A 17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (11136 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
harshadmadaye/opm · 5 stars · license MIT · pushed 2026-10-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_etbpmphwqzlf3t5r
GET https://markdownregistry.com/api/v1/resolve?ref=harshadmadaye/opm/tdd-workflow
GET https://markdownregistry.com/api/v1/blob/6a0459b8ab750d3e160909954ceebb2c11be2a3c523b3c831c52285428a0147f
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
harshadmadaye/opm · plugins/opm-video/skills/explainer-video/SKILL.md · Turns a spec or document into a narrated explainer video. Produces a 1920x1080 MP4 of illustrated still slides with a…
harshadmadaye/opm · skills/brainstorming/SKILL.md · Turns a rough idea into an approved design or written spec through one-question-at-a-time dialogue, scaled to spike…
harshadmadaye/opm · skills/brew-idea/SKILL.md · Runs a multi-agent debate over a project idea. Four angle agents (product, engineering, skeptic, market research)…
harshadmadaye/opm · skills/compound-learnings/SKILL.md · Captures a solved, non-obvious problem as a durable learning doc under docs/solutions/ with validated frontmatter, and…
harshadmadaye/opm · skills/executing-plans/SKILL.md · Executes a written implementation plan task-by-task by dispatching a fresh implementer subagent per task, a reviewer…
harshadmadaye/opm · skills/jump-start/SKILL.md · Creates an entire new project from one prompt. Takes a project name plus a brief, clarifies only what would change the…
harshadmadaye/opm · skills/milestone-planning/SKILL.md · Structures multi-week work as a milestone with a roadmap, a short always-read STATE digest, phased executable PLAN…
harshadmadaye/opm · skills/python-patterns/SKILL.md · Provides idiomatic modern Python (3.11+) patterns covering type hints, dataclasses and pydantic at boundaries, pathlib…
harshadmadaye/opm · skills/using-opm/SKILL.md · Establishes how to find and invoke OPM skills before taking any other action, including clarifying questions. Use when…
harshadmadaye/opm · skills/verification-before-completion/SKILL.md · Requires running verification commands and reading their actual output before any claim that work is complete, fixed…
affaan-m/ecc · .agents/skills/tdd-workflow/SKILL.md · Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+…
affaan-m/ecc · docs/es/skills/tdd-workflow/SKILL.md · Usar este skill al escribir nuevas funcionalidades, corregir bugs o refactorizar código. Aplica el desarrollo guiado…
affaan-m/ecc · .kiro/skills/tdd-workflow/SKILL.md · Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+…
travisjneuman/.claude · skills/tdd-workflow/SKILL.md · Test-Driven Development workflow enforcement with RED-GREEN-REFACTOR cycle. Use only when the user explicitly asks for…
naimkatiman/continuous-improvement · plugins/continuous-improvement/skills/tdd-workflow/SKILL.md · Enforces Law 3 (One Thing at a Time) and Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Use this…