Index of every page on this site: llms.txt
All skills
nnennandukwe avatar

/tdd-bdd

@6837c5b
Run it yourself

Drive implementation and bug fixes from behavior and failing tests. Use when working in test-driven development or behavior-driven development style: translate requirements or bugs into Given/When/Then scenarios, choose the smallest useful test layer, write a failing test before production code, implement the minimum change to pass, and refactor with coverage preserved.

Use this Skill: https://skilld.dev/gh/nnennandukwe/skills/tdd-bdd

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesscenario-shaping.md

≈657 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Scenario Shaping

Use this reference when requirements are underspecified, bug reports mix symptoms with guesses, or a feature request needs to be broken into small Given/When/Then scenarios.

Scenario Template

Use one concrete rule per scenario:

Given <relevant starting state>
When <single trigger>
Then <observable outcome>

Good scenarios are:

  • Observable
  • Small
  • Deterministic
  • Free of implementation detail

Start With The Simplest Example

Choose the smallest example that proves the rule.

Examples:

  • Empty cart gets free-shipping banner removed
  • Invalid token returns 401
  • Duplicate username is rejected
  • Archived record is hidden from active lists

Only add richer fixtures after the simplest example is covered.

Slicing Heuristics

Split the behavior when the story contains:

  • and in the When
  • Multiple outcomes in the Then that can fail independently
  • Setup that does not matter to the rule being tested
  • UI narration that hides the actual business rule

Prefer:

Given a suspended account
When the user signs in
Then access is denied

Over:

Given a suspended account with three pending invoices and a profile image
When the user opens the app, clicks Sign In, submits email and password, waits for redirect, and opens billing
Then access is denied, invoices stay pending, and a warning banner is shown

Bug Regression Template

Turn bug reports into this shape:

  1. Remove any guessed cause from the scenario.
  2. Keep only the triggering conditions.
  3. State the expected outcome and the actual wrong outcome.
  4. Write the expected outcome as the new test.

Example:

  • Report: "CSV import crashes when a row has a blank date because the parser assumes ISO strings."
  • Scenario:
Given an import row with a blank date
When the import runs
Then the row is rejected with a validation error instead of crashing

Acceptance Criteria Template

For feature work, derive:

  1. One happy-path scenario
  2. One validation or gating scenario
  3. One edge case if the domain obviously demands it

Example:

Given an unpublished draft
When an editor clicks Publish
Then the draft becomes publicly visible

Given a draft missing a title
When an editor clicks Publish
Then publishing is blocked with a title-required message

Naming Tests

Prefer names that state behavior, not implementation:

  • rejects_blank_dates_with_validation_error
  • shows_free_shipping_only_above_threshold
  • blocks_publish_when_title_missing

Avoid names like:

  • test_parser_handles_case_3
  • calls_validate_then_save
  • works_correctly

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The skill provides instructional guidance for Test-Driven Development (TDD) and Behavior-Driven Development (BDD). It contains no executable code, remote downloads, or suspicious instructions.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 6837c5b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 4 months ago

README badge

README badge for nnennandukwe/skills/tdd-bdd