skills/greenfield/gf-write-tests/SKILL.md
Write tests for a batch of tasks BEFORE implementation. Detects the project's test framework and language, then writes tests that cover happy paths, edge cases, and failure modes. All tests should fail initially since there is no implementation yet. Part of the gf (greenfield) skill family. Use when the user says /gf-write-tests or wants to write tests before implementing a feature or task batch.
npx skillsauth add ricky-yosh/agent-workflows gf-write-testsInstall 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.
Write tests for a batch of tasks before implementation. Tests define the contract; implementation satisfies it later. Do not ask unnecessary questions — read the inputs, make decisions, and write the tests.
Read .aw/greenfield-progress/spec.xml and .aw/greenfield-progress/tasks.json. If either is missing, tell the user which skill to run first and stop.
Pick the target tasks. Read .aw/greenfield-progress/next-task.json. If it exists, use that task — no confirmation needed (resume already selected it). If it doesn't exist, ask which tasks to target. Accept task numbers (e.g., "tasks 2-4") or "all remaining".
Skip if tests don't make sense. Tasks that are purely UI layout, config wiring, file reorganization, docs, or copy changes don't need tests. If the selected task has no testable logic, say so in one line and stop. Otherwise proceed — no announcement needed.
Detect the project's test setup. Find test framework config, existing test files, and their patterns (naming, imports, assertion style). If no test setup exists, ask the user what framework to use. Read existing tests and the source files relevant to the task so you understand the interfaces being tested.
Write the tests. Tests must:
assertEqual(result, 42) not assertNotNone(result)End with a summary table:
| Category | Coverage | Count | |---|---|---:| | Happy path | ... | N | | Edge cases | ... | N | | Error handling | ... | N | | Total | | N |
Iterate until approved.
testing
Generate readable testing notes after a feature is complete. Compares spec against implementation to produce a concise list of what was built, how to test it, and any scope gaps. Writes testing-notes.md to .aw/greenfield-progress/. Part of the gf (greenfield) skill family.
testing
Save current session work to .aw/greenfield-progress/progress.txt. Captures decisions (why, not just what) that git diff cannot show. Updates tasks.json to mark completed tasks. Part of the gf (greenfield) skill family.
testing
Gate the greenfield workflow on user verification after an implementation step. Reads the implementation digest, shows verification steps, and waits for the user to confirm before advancing. Part of the gf (greenfield) skill family.
documentation
Resume work on a long feature by loading context from .aw/greenfield-progress/ files. Reads spec.xml, tasks.json, progress.txt, and recent git log to summarize where you left off. Writes next-task.json for the next not-done task. Part of the gf (greenfield) skill family.