What problem does it solve? Writing tests in the opencode-swarm repository is error-prone because Bun's shared module cache leaks mocks across test files, Windows path and environment behavior breaks naive tests, and broad test-runner scopes can stall the agent. This Skill encodes the repository's testing conventions so new or modified tests pass on all three CI platforms. ## Core Features & Use Cases - Mock isolation rules: Enforces a three-tier mocking strategy (_test_exports, _internals DI seams, mock.module) with mandatory cleanup patterns to prevent cross-file pollution. - Cross-platform test patterns: Covers path resolution, symlink differences, temp directory handling, per-platform environment variable redirection, and line-ending normalization for ubuntu, macOS, and Windows CI. - CI pipeline structure and file placement: Documents the six CI test steps, per-file isolation loops, sharding, quarantine filters, and naming conventions for unit, adversarial, integration, and regression tests. - Use Case: Before adding a test for a new hook factory, load this Skill to choose the correct mock tier, place the file in tests/unit/hooks/, and avoid the Windows EBUSY and mock-restore pitfalls that previously caused hundreds of CI failures. ## Quick Start Load the writing-tests skill before writing or modifying any test file in the opencode-swarm repository.