Imported from Mr-Q526/TeamCC-Platform (
skill-graph/skills-flat/unit-test-strategy/SKILL.md). Install upstream withnpx skills add Mr-Q526/TeamCC-Platform --skill unit-test-strategy. Copyright stays with the author.
Unit Test Strategy
Use this skill when the task involves unit test design, missing test analysis, mocks, fixtures, and behavior coverage.
Goal: produce reliable engineering guidance and implementation steps focused on meaningful assertions, boundary cases, maintainability, and regression prevention.
Working model
- Identify the affected system, data, users, and failure modes.
- Define invariants, inputs, outputs, ownership, and rollback needs.
- Prefer small, auditable changes with explicit validation.
- Call out security, performance, concurrency, and data-loss risks when relevant.
- Finish with concrete verification steps and residual risks.
Rules
- Ground recommendations in the current codebase or runtime evidence.
- Prefer explicit contracts, typed boundaries, and defensive validation.
- Do not hide operational concerns behind generic best practices.
- Include negative cases, edge cases, and failure behavior.
- For review tasks, list findings first with file and line references when possible.
- For test or performance tasks, define the workload, success criteria, and measurement method.
Checklist
- Are assumptions and ownership boundaries explicit?
- Are risky changes reversible or safely deployable?
- Are observability and diagnostics sufficient for production issues?
- Are tests or validation steps targeted to the actual risk?
- Are security and data-integrity concerns addressed?