sequential-test-execution
This skill uses Claude hooks which can execute code automatically in response to events. Review carefully before installing.
Sequential Test Execution
Ensures test runs execute one at a time to prevent resource conflicts.
Core Principle
One Test Run at a Time
Test environments share databases, ports, and network resources. Concurrent test execution causes migration conflicts, port collisions, and flaky test results.
Detection Method
Uses Docker container state (not file locks) to detect running tests:
- Self-recovering:
docker compose run --rmauto-removes containers on exit - No stale locks:
docker psreflects actual running state - Graceful degradation: If Docker is unavailable, tests proceed normally
Hook Behavior
PreToolUse (Bash)
- Extract command from
TOOL_INPUT - Check if command is a test execution command
- Query
docker-compose.test.ymlfor runningwebcontainers - Running container found →
exit 2(block with message) - No running container →
exit 0(allow)
PostToolUse (Bash)
- Only triggers on
docker composetest commands - Logs completion timestamp and exit code to
$TMPDIR/claude-workflow/test-execution.log - Always
exit 0(informational only)
When Blocked
If a test run is blocked:
- Wait for the existing test container to complete
- Retry the test command after completion
- Do NOT force-remove the running container
Test Command Patterns Detected
docker compose -f docker-compose.test.yml run ...
phpunit
jest
pytest
composer test
npm test
TEST_ONLY=...
More from masanao-ohba/claude-manifests
requirement-analyzer
Invoke when goal-clarifier analyzes user requirements to extract goals and constraints. Provides structured requirement decomposition into functional/non-functional categories, stakeholder mapping, assumption identification, and documentation format.
37test-case-designer
Invoke when test-strategist plans test coverage for CakePHP features. Produces categorized test case specifications (unit/integration/system) with CakePHP-specific fixtures, IntegrationTestTrait usage, and proper test documentation format.
26functional-designer
Invoke when design-architect creates functional specs for CakePHP features. Produces detailed technical specifications mapping requirements to CakePHP controllers, models, services, and views with data flow diagrams and API endpoint definitions.
18react-architectural-patterns
Invoke when design-architect or code-developer designs React 19 component architecture. Provides component type taxonomy, composition patterns, state management strategies, render optimization techniques, and React 19 feature guidance.
15nextjs-code-reviewer
Invoke when quality-reviewer reviews Next.js 15 App Router code. Provides framework-specific review checklist covering file organization, server/client component usage, data fetching correctness, metadata configuration, and performance patterns.
14security-patterns
Invoke when code-developer or quality-reviewer handles PHP security concerns. Provides input validation patterns, SQL injection prevention, XSS protection, CSRF mitigation, secure session management, and password hashing best practices for PHP.
14