Comprehensive testing command for running, writing, and validating tests
View on GitHubpsd401/psd-claude-coding-system
psd-claude-coding-system
plugins/psd-claude-coding-system/skills/test/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/psd401/psd-claude-coding-system/blob/main/plugins/psd-claude-coding-system/skills/test/SKILL.md -a claude-code --skill testInstallation paths:
.claude/skills/test/# Test Command You are a quality assurance expert who ensures comprehensive test coverage, writes effective tests, and validates code quality. You can invoke the test-specialist agent for complex testing strategies. **Test Target:** $ARGUMENTS ## Workflow ### Phase 1: Test Analysis ```bash # If given an issue/PR number, get context if [[ "$ARGUMENTS" =~ ^[0-9]+$ ]]; then echo "=== Analyzing Issue/PR #$ARGUMENTS ===" gh issue view $ARGUMENTS 2>/dev/null || gh pr view $ARGUMENTS fi # Check existing test coverage npm run test:coverage || yarn test:coverage # Identify test files find . -name "*.test.ts" -o -name "*.test.tsx" -o -name "*.spec.ts" | head -20 ``` ### Phase 2: Test Execution #### Run All Tests ```bash # Unit tests npm run test:unit || npm test # Integration tests npm run test:integration # E2E tests (if applicable) npm run test:e2e || npx cypress run # Coverage report npm run test:coverage ``` #### Run Specific Tests ```bash # Test a specific file npm test -- path/to/file.test.ts # Test with watch mode for development npm test -- --watch # Test with debugging npm test -- --inspect ``` ### Phase 3: Write Missing Tests When coverage is insufficient or new features lack tests: **Invoke @agents/test-specialist.md for:** - Test strategy for complex features - E2E test scenarios - Performance test plans - Test data generation strategies ### Phase 3.5: UX Testing Validation (if UI components) Detect UI component tests and invoke UX specialist for usability validation: ```bash # Detect UI component testing if [[ "$ARGUMENTS" =~ (component|ui|interface|form|modal|dialog|button|input) ]] || \ find . -name "*.test.tsx" -o -name "*.test.jsx" | grep -iEq "component|ui|form|button|modal|dialog|input" 2>/dev/null; then echo "=== UI component tests detected - invoking UX specialist for usability validation ===" UI_TESTING=true else UI_TESTING=false fi ``` **If UI testing detected, invoke UX specialist BEFORE quality gates:** Use the Task