← ClaudeAtlas

component-test-writerlisted

Generates component-level unit tests from source files and (optionally) a scenario-set.md. Framework-aware (vitest | jest) via repo-fingerprint, never guesses. Enforces strict Arrange-Act-Assert structure, preserves every scenario as a test case, and refuses to overwrite existing tests. PIPELINE-1 step 4.
mytechsonamy/VibeFlow · ★ 0 · Testing & QA · score 75
Install: claude install-skill mytechsonamy/VibeFlow
# Component Test Writer ## Phase Contract This skill runs in **DEVELOPMENT** or **TESTING** only. Before any other step, read `vibeflow.config.json`'s `currentPhase`. If it is not in {DEVELOPMENT, TESTING}, emit: > component-test-writer is for DEVELOPMENT or TESTING phase; current is > `<phase>`. Run `/vibeflow:test-strategy-planner` (PLANNING) first and > `/vibeflow:advance` into DEVELOPMENT before writing tests. …and stop. The PreToolUse `phase-write-guard` hook will also reject any test-file writes this skill attempts outside those phases. An L1 Truth-Validation skill. Takes a source file (or a small set of files) and produces test files whose structure the reader can audit in fifteen seconds. This skill does not run tests — it only generates them. ## When You're Invoked - During PIPELINE-1 step 4 after `test-strategy-planner` has produced a `scenario-set.md`. In that pipeline, this skill runs once per component in parallel with `contract-test-writer`, `business-rule-validator`, and `test-data-manager`. - On demand as `/vibeflow:component-test-writer <path-or-glob>`. ## Input Contract | Input | Required | Notes | |-------|----------|-------| | Source file(s) | yes | Path, glob, or directory. Non-test files only. | | `scenario-set.md` | optional but preferred | Output of `test-strategy-planner`; maps scenarios → test cases. | | Framework config | derived | Read from `repo-fingerprint.json` or detected via `ci_analyze_structure`. Never hardcoded. | | Existing