.claude/skills/test-spec/SKILL.md
Generate BDD test specifications for story in 6 categories (API, UI, Load, Infrastructure, Security, Integration). Use when user wants to create test cases or mentions /test-spec command.
npx skillsauth add rakovi4/continue-example test-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate BDD-style test specifications for a story in 6 categories. Each category produces two files: main (critical tests) and extended (nice-to-have tests).
/test-spec "Story name"
/test-spec 5 # By MVP story number
/test-spec # Interactive selection
Read before generating: ProductSpecification/BriefProductDescription.txt, ProductSpecification/stories.md, ProductSpecification/ExpectedLoad.txt, story folder (stories/*/): mockups, *.md, endpoints.md, interview.md.
Parse input: by name ("Login/Logout"), by number (5), or interactive (list and ask).
If interview.md exists, extract:
Prerequisite analysis (mandatory): Read the story's Prerequisites section and Validation Rules table. For each prerequisite (Board exists, Column exists, etc.), generate guard scenarios in BOTH API and UI tests following the Prerequisite Guard Checklist in test-spec-format.md. Cross-reference existing stories (e.g., Story 5 tests/01_API_Tests.md sections 0-1, tests/02_UI_Tests.md section 0) for established blocker patterns.
Load .claude/templates/spec/test-spec-format.md for category formats, ordering principles, and BDD rules.
Create files in ProductSpecification/stories/NN-story-name/tests/:
Main files (critical ~27-34 total tests):
01_API_Tests.md, 02_UI_Tests.md, 03_Load_Tests.md04_Infrastructure_Tests.md, 05_Security_Tests.md, 06_Integration_Tests.mdExtended files in extended/ subfolder (nice-to-have edge cases):
extended/01_API_Tests_Extended.md through extended/06_Integration_Tests_Extended.mdAdd this header to extended files:
> These are additional edge case tests. Implement after core tests pass.
Report: folder path, files created, test counts per file.
test-spec-format.md. Skip technologies not in the stack (NoSQL, LDAP, XXE). Skip cross-cutting concerns tested globally (security headers, CORS, HTTPS). Include IDOR for resource-by-ID endpoints (tasks/{id}, boards/{id}), JWT security for auth stories, input validation for task fields. Merge related scenarios (e.g., one SQL injection test covering all fields). Target 6-10 focused scenarios per story.testing
Run use-case module tests quickly. Use when user wants to run use-case tests or mentions /test-usecase command.
testing
Review tests to replace loose validation (contains, isNotNull, isNotEmpty) with strict validation (isEqualTo on parsed fields). Use when user wants to improve test assertions or mentions /test-review command.
development
Run frontend tests. Use when user wants to run frontend unit tests or mentions /test-frontend command.
development
Run tests with coverage and report uncovered lines/branches per class. Use when user wants to check test coverage, find untested code, identify coverage gaps, or mentions /test-coverage command. Also use after green phases to verify new code is well-covered.