Back to skills
SKILL.md
Use Context Reviewer Testability
ASecurityテスト可能なコード設計のレビュー。セキュリティ (use-context-reviewer-security)、可読性 (use-context-reviewer-readability) には使わない。
- 12 stars
- 0 votes
- 0 copies
- 0 views
- Added September 24, 2026
Security analysis
100/100Pro scans all 4 files and shows the line behind each finding
npx -y skills add thkt/dotclaude --skill use-context-reviewer-testability --agent claude-codeAre you the author of Use Context Reviewer Testability?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thkt-use-context-reviewer-testability)---
name: use-context-reviewer-testability
description: テスト可能なコード設計のレビュー。セキュリティ (use-context-reviewer-security)、可読性 (use-context-reviewer-readability) には使わない。
when_to_use: テスト容易性, モック, mock-friendly, DI
allowed-tools: Read Agent Bash(ugrep:*) Bash(bfs:*)
agent: reviewer-testability
context: fork
user-invocable: false
---
# use-context-reviewer-testability
## 検出
| ID | パターン | 修正 |
| --- | ------------------------------ | ------------------------------- |
| TE1 | `import { db }` の直接使用 | 依存をパラメータとして注入 |
| TE1 | クラス内の `new Service()` | コンストラクタ注入 |
| TE2 | コンポーネント内の `fetch()` | hook/service に抽出して注入 |
| TE2 | 副作用とロジックの混在 | pure/impure を分離 |
| TE3 | 深い mock チェーン | 依存を簡潔にする |
| TE4 | グローバルな `config` アクセス | config を prop/parameter で渡す |
| TE4 | ロジック内の `Date.now()` | clock/time provider を注入 |
| TE5 | 密結合 | 抽象に依存する (DIP) |
## 基準
テストセットアップが 10 行未満に収まる。
## 参照ファイル
| トピック | ファイル |
| -------- | ------------------------------------------------------ |
| DI | ${CLAUDE_SKILL_DIR}/references/dependency-injection.md |
| Pure | ${CLAUDE_SKILL_DIR}/references/pure-functions.md |
| Mocking | ${CLAUDE_SKILL_DIR}/references/mock-friendly.md |
Files in this skill
- SKILL.md
- references/dependency-injection.md
- references/mock-friendly.md
- references/pure-functions.md
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.