Agent skill
Testing & Verification
Test execution workflows after code generation, bug fixes, or refactoring. Invoke when new code exists to verify correctness and quality.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/testing-verification
SKILL.md
Testing & Verification
Invocation Context
After: code generation, bug fix, refactor, architecture-sensitive changes
Commands
Quick Verification
composer test:fast- syntax, unit, style (~5-10s, use first)composer test- full suite before commit (~30-60s)
Targeted Tests
composer test:unit- unit onlycomposer test:integration- DB/filesystemcomposer test:architecture- constraints/naming/complexity (23 tests)composer test:security- dangerous functions check
Static Analysis
composer test:types- PHPStan level 9composer test:style- PHP CS Fixer validationcomposer test:syntax- parallel-lint parse check
Coverage
composer test:coverage- enforce 95% thresholdcomposer test:coverage-report- HTML report in build/coverage-html/
Architecture Analysis
composer analyze:architecture- Deptrac layer boundaries
Execution Patterns
Post-Generation
composer test:fast → if fail, fix → rerun → composer test
Bug Fix
composer test:unit (or test:integration) → composer test
Refactor
composer analyze:architecture → composer test:architecture → composer test → composer test:coverage
Pre-commit Integration
v2.1 Conditional Checks (based on what changed):
- Docs-only: All checks skipped (~2-12s)
- App code: Full suite + dual PHPStan (~40-110s)
- Config tools: Full suite (~30-90s)
- Composer: Full suite + audit (~40-120s)
Key Features:
- Dual PHPStan on app changes (staged → full project)
- Config file detection (phpstan.neon, deptrac.yaml, etc.)
- Conditional composer audit (only when dependencies change)
Any fail = commit blocked
Fix: composer fix:style → composer test → commit
Details: docs/PRE-COMMIT-HOOK.md
Result Handling
OK (N tests, M assertions)- proceed- Any failure - invoke Error Resolution Skill
Test Organization
tests/
├── Unit/ - mocked, fast
├── Integration/ - DB/filesystem
├── Architecture/ - 23 constraint tests
└── Security/ - dangerous functions
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?