# Use Context Reviewer Testability

> Testable code design review. Do NOT use for security (use-context-reviewer-security) or readability (use-context-reviewer-readability).

- Skill: `thkt/use-context-reviewer-testability` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add thkt/use-context-reviewer-testability`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thkt/use-context-reviewer-testability/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: thkt (https://skillmd.com/u/thkt)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/thkt/use-context-reviewer-testability

---


# use-context-reviewer-testability

## Detection

| ID  | Pattern                      | Fix                             |
| --- | ---------------------------- | ------------------------------- |
| TE1 | Direct `import { db }` usage | Inject dependency as parameter  |
| TE1 | `new Service()` inside class | Constructor injection           |
| TE2 | `fetch()` inside component   | Extract to hook/service, inject |
| TE2 | Mixed side effects + logic   | Separate pure/impure            |
| TE3 | Deep mock chains             | Simplify dependencies           |
| TE4 | Global `config` access       | Pass config as prop/parameter   |
| TE4 | `Date.now()` in logic        | Inject clock/time provider      |
| TE5 | Tight coupling               | Depend on abstractions (DIP)    |

## Criteria

Test setup fits in under 10 lines.

## References

| Topic   | File                                                   |
| ------- | ------------------------------------------------------ |
| DI      | ${CLAUDE_SKILL_DIR}/references/dependency-injection.md |
| Pure    | ${CLAUDE_SKILL_DIR}/references/pure-functions.md       |
| Mocking | ${CLAUDE_SKILL_DIR}/references/mock-friendly.md        |

