Test Suite Setup Skill
Help set up test validation for any project to enable closed-loop workflows.
When to Use
-
Setting up validation commands for a new project
-
Discovering existing test infrastructure
-
Creating a validation stack for CI/CD or agentic workflows
-
Standardizing test commands across a codebase
Setup Workflow
Step 1: Detect Project Type
Look for configuration files to identify the stack:
File Project Type
package.json
Node.js / TypeScript
pyproject.toml
Python (modern)
requirements.txt
Python (pip)
go.mod
Go
Cargo.toml
Rust
pom.xml
Java (Maven)
build.gradle
Java (Gradle)
Step 2: Identify Existing Test Infrastructure
Check for test directories and configurations:
Common test locations
ls -la tests/ test/ tests/ spec/
Check for test config files
ls -la pytest.ini jest.config.* vitest.config.* .mocharc.*
Step 3: Extract Available Commands
For Node.js projects:
Show available npm scripts
cat package.json | grep -A 30 '"scripts"'
For Python projects:
Check pyproject.toml for tools
cat pyproject.toml | grep -A 10 '[tool.'
Step 4: Generate Validation Commands
Create a validation stack appropriate for the project:
Template:
Validation Commands
Execute every command to validate with 100% confidence
[lint command]- Code style and syntax[type check command]- Type safety (if applicable)[test command]- Behavior correctness[build command]- Production readiness
Quick Reference by Stack
Python (uv + pytest)
Validation Commands
uv run ruff check .- Lintinguv run mypy .- Type checkinguv run pytest -v- Tests
Python (pip + pytest)
Validation Commands
flake8 .orruff check .- Lintingmypy .- Type checkingpytest -v- Tests
TypeScript/JavaScript (npm)
Validation Commands
npm run lint- ESLintnpx tsc --noEmit- Type checkingnpm test- Testsnpm run build- Build verification
TypeScript (Bun)
Validation Commands
bun run lint- Lintingbun tsc --noEmit- Type checkingbun test- Testsbun run build- Build verification
Go
Validation Commands
go fmt ./...- Formattinggo vet ./...- Static analysisgo test ./... -v- Testsgo build ./...- Build verification
Rust
Validation Commands
cargo fmt --check- Formattingcargo clippy- Lintingcargo test- Testscargo build --release- Build verification
Fallback: No Test Infrastructure
If no test infrastructure exists, recommend setup:
Python
Install pytest
uv add --dev pytest pytest-cov
Create test directory
mkdir tests touch tests/init.py touch tests/test_example.py
TypeScript
Install vitest (modern, fast)
npm install -D vitest
Or Jest
npm install -D jest @types/jest ts-jest
Create test directory
mkdir tests
Verification
After setup, verify the validation stack works:
Run each command and confirm success
[lint command] # Should exit 0 [type command] # Should exit 0 [test command] # Should exit 0 [build command] # Should exit 0
Memory References
-
@validation-commands.md - Full validation patterns
-
@test-leverage-point.md - Why tests matter
-
@closed-loop-anatomy.md - Using tests in feedback loops
Version History
- v1.0.0 (2025-12-26): Initial release
Last Updated
Date: 2025-12-26 Model: claude-opus-4-5-20251101