Skip to content
Back to skills

Derive Test Name From Behavior

ASecurity

Produce a single test name in "should <observable behavior>" form from a goal statement. Use when starting the red phase of a TDD cycle and you need a precise, testable name.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
testinggo

Works with

  • cli

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add spencerbeggs/vitest-agent --skill derive-test-name-from-behavior --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Derive Test Name From Behavior?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Derive Test Name From Behavior
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/spencerbeggs-derive-test-name-from-behavior/badge)](https://www.skillsdirectory.com/skills/spencerbeggs-derive-test-name-from-behavior)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: derive-test-name-from-behavior
description: Produce a single test name in "should <observable behavior>" form from a goal statement. Use when starting the red phase of a TDD cycle and you need a precise, testable name.
---

# Derive a test name from a behavior

Given a behavior description, produce **one** test name that asserts a single observable outcome.

## Rules

1. Start with `should`.
2. Describe the observable outcome, not the implementation. `should reject empty username` is observable; `should call validateUsername` is implementation-detail leakage.
3. Be specific about input shape and expected output. `should return ValidationError when username is empty` beats `should validate username`.
4. One test = one assertion target. If you find yourself joining clauses with `and`, split into two tests.

## Examples

- Behavior: "username validation"
  - Bad: `should validate username`
  - Better: `should reject empty username`
  - Better still: `should reject empty username with a ValidationError`

- Behavior: "OAuth flow"
  - Bad: `should handle OAuth`
  - Better: `should redirect to provider when no token is present`
  - Better still: `should redirect to /oauth/authorize with the configured client_id`

## Reusable outside TDD

Coverage-gap workflows use this when proposing tests for uncovered branches.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.