skills/team/test-scaffold/SKILL.md
Test generation conventions, naming patterns, mock strategies, and project structure for .NET test suites. Use when generating tests for C#/.NET projects with xUnit, FluentAssertions, and NSubstitute.
npx skillsauth add michaelalber/ai-toolkit test-scaffoldInstall 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.
"The ratio of time spent reading versus writing code is well over 10 to 1. Tests should be the most readable code in the project." -- Robert C. Martin
This skill provides the conventions, patterns, and structural guidance for generating .NET test suites with xUnit, FluentAssertions, and NSubstitute: test naming, file organization, mock strategy, the AAA (Arrange-Act-Assert) structure, and test project setup. Apply these conventions consistently across every generated test. Tests are documentation of behavior — they must be the most readable code in the project, isolated, deterministic, and independent of execution order.
Non-Negotiable Constraints:
MethodName_Scenario_ExpectedResult, a complete sentence describing what is tested.IDENTIFY The unit under test (handler, validator, service, endpoint, pipeline behavior) and the
scenarios to cover: happy path, not-found, validation, exception, guard clause, edge,
state change, side effect.
CHOOSE The test type per scenario (decision table in references/test-patterns.md):
unit + mocks · validator TestValidate() · WebApplicationFactory integration ·
InMemory DbContext · mocked RequestHandlerDelegate for behaviors.
SCAFFOLD Place the test file mirroring src/ structure (naming-conventions.md). Write each test
AAA-structured, named MethodName_Scenario_ExpectedResult. Build data with builders;
mock only external boundaries (mock-patterns.md); use InMemory DbContext, not a mocked one.
VERIFY dotnet test passes; each test isolated and order-independent; no testing of private
methods or framework code; DbContext disposed; no hardcoded GUIDs/dates.
Exit criteria: every identified scenario has an AAA-structured, correctly named, isolated test;
the right test type per scenario; mocks limited to external boundaries; dotnet test green.
<test-scaffold-state>
phase: IDENTIFY | CHOOSE | SCAFFOLD | VERIFY | COMPLETE
unit_under_test: [class/member]
scenarios: [count identified]
tests_written: [count]
test_types: [unit | validator | integration | behavior | db]
build_status: pass | fail | not-run
last_action: [description]
next_action: [description]
</test-scaffold-state>
references/test-patterns.md.references/mock-patterns.md.references/naming-conventions.md.| Skill | Relationship |
|-------|-------------|
| tdd | The RED phase writes a failing test first; this skill supplies the conventions, naming, and structure those tests follow. |
| tdd-agent | Autonomous operating mode of the TDD loop that generates tests — it applies these scaffolding conventions. |
| dotnet-vertical-slice | Scaffolds the feature handlers/validators/endpoints this skill writes tests for; the test tree mirrors the slice structure. |
| evaluate-tests | Audits generated tests for TDD discipline and quality — run it after scaffolding to verify the suite. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.