Skip to content
Skills Library
Programming · Testing

eng-tdd

/eng-tdd

Fix a bug test-first when there is a clear, cheap regression test path. Use when the user asks for TDD, a failing test, or a regression test, or when the bug has an obvious cheap local test target.

Repository
skills ↗
Licence
MIT
Last repository change
23.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Fix a bug test-first when there is a clear, cheap regression test path. Use when the user asks for TDD, a failing test, or a regression test, or when the bug has an obvious cheap local test target.

Original author description

Fix a bug test-first when there is a clear, cheap regression test path. Use when the user asks for TDD, a failing test, or a regression test, or when the bug has an obvious cheap local test target.

How it works

  1. Workflow
  2. If a failing test is impractical
  3. Guardrails
  4. Verify
Original SKILL.md headings · 38 lines, 455 words
SKILL.md preview
---
name: eng-tdd
description: Fix a bug test-first when there is a clear, cheap regression test path. Use when the user asks for TDD, a failing test, or a regression test, or when the bug has an obvious cheap local test target.
---

# TDD bug fix

Repo facts (from AGENTS.md or CLAUDE.md): the test policy (some repos require coverage for every behavior change, others allow a test only where a branch's behavior is uncertain), the test runner per package, and the single-test command. Follow the policy; when it rules out a new test, skip to the closest executable check below.

When the test path is clear and cheap, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it.

Do not force a test when it is impractical: broad harness setup, brittle mocks, slow end-to-end infrastructure, production-only state, vague reproduction steps, or large unrelated fixture churn. Use the closest useful verification instead.

## Workflow

1. **Understand the bug.** Identify intended behavior, current behavior, the affected path, and the smallest observable reproduction.
2. **Choose the narrowest executable check.** Prefer the unit, component, or integration test style already used for that code, in the location the repo uses (often colocated as `foo.test.ts`), run with the repo's single-test command. If no practical path is obvious, do not create one just to satisfy the workflow.
3. **Write the failing test first.** Add the smallest test that would have caught the bug. It encodes intended behavior, not the current implementation.
4. **Run it before fixing.** Confirm it fails for the intended reason. If it passes or fails for an unrelated reason, correct the test first.
5. **Fix the bug.** Make the smallest production change that satisfies the intended behavior and keeps nearby contracts.
6. **Rerun the test.** Confirm it passes.

## If a failing test is impractical

Use the closest executable check: a targeted script, a manual reproduction command, browser automation, a snapshot comparison, or a focused integration check.

Prefer no new test over a bad test. A bad test mostly tests mocks, encodes implementation details, depends on timing or global state, needs expensive infrastructure for a small fix, or would be deleted right after proving the fix.

## Guardrails

- Do not change tests to match a wrong implementation.
- Do not weaken assertions unless the expected behavior genuinely changed and you can say why.
- Keep the test focused on the bug. No fixture churn or unrelated coverage.
- If the bug is flaky, make the test deterministic and document the signal it locks down.
- If the bug exposes a broader class of failures, land the focused regression first, then consider sibling coverage.

## Verify

- Name the check that failed before the fix and the failure it produced.
- Name the passing run after the fix and any nearby validation.
- If failing-before evidence is missing, say why and name the closest check used.

Versions

The database has no other skills named eng-tdd.

Database snapshot: 13.11.2026 · package version 214ab29792ea (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tdd
    Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
  • 100tdd
    Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
  • 100tdd
    Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
  • 100tdd
    Test-first work in two modes: build a feature red → green at agreed seams, or fix a bug by writing the failing regression test first. Use when the user asks for TDD, red-green-refactor, a failing test, or a regression test, when `implement` builds a ticket, OR when a bug has an…
  • 100tdd-pstack
    TDD bug fix: write the failing regression test before the fix. Use only when the user explicitly asks for TDD or a failing/regression test, or when a bug has an obvious cheap local test target; use the full tdd workflow for feature TDD. Skip when the test path is unclear,…
  • 100tdd
    Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.