test-generationlisted
Install: claude install-skill int2t05/engineering-skills
# Test Generation (Language-Agnostic)
Generate anti-pattern-free test code from PRD acceptance criteria and source
code. Read inputs, produce test files. No execution, no reports, no source
modifications.
**Input:** PRD acceptance criteria + architecture docs + source code
## When to use
- Generating tests for a feature or bugfix
- Creating tests from a PRD, API contract, or existing source
- Triggers on "generate tests", "write tests for", "生成测试", "生成测试代码", "补测试"
**Not for:** the TDD red-green-refactor loop (use `tdd`); API contract testing (use `api-testing`); browser E2E flows (use `e2e-testing`).
## Steps
### 1. Detect language & framework
Scan the project before generating. Detection priority: existing test files
(naming conventions) → dependency manifests → test config files. If nothing
found, ask which framework to use.
- Load [references/language-patterns.md](references/language-patterns.md) for the per-language detection table (manifests and test-file patterns to scan for) and the Test Framework | Assertion Style | Mock Library mapping (testify/gomock, pytest/unittest.mock, jest/jest.fn, etc.)
### 2. Read inputs
Ask for or discover: PRD path (default `docs/PRD.md` or `docs/vX.Y/prd.md`), architecture docs
(default `docs/TECH.md` or `docs/vX.Y/tech.md`), source code to test (default `src/`), and the
auto-detected language/framework. Ask only critical questions before proceeding.
### 3. Extract testable conditions
- Per acceptance criterion → one or more t