🛠️ Coverage
テストカバレッジに関する質問に対応し、テストされていない部分やテストの不足箇所を分析して、必要なテストを特定し、カバレッジのギャップを明確にするSkill。
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Analyze test coverage gaps. Use when user says "test coverage", "what's not tested", "coverage gaps", "missing tests", "coverage report", or "what needs testing".
🇯🇵 日本人クリエイター向け解説
テストカバレッジに関する質問に対応し、テストされていない部分やテストの不足箇所を分析して、必要なテストを特定し、カバレッジのギャップを明確にするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o coverage.zip https://jpskill.com/download/4671.zip && unzip -o coverage.zip && rm coverage.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4671.zip -OutFile "$d\coverage.zip"; Expand-Archive "$d\coverage.zip" -DestinationPath $d -Force; ri "$d\coverage.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
coverage.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
coverageフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Coverage を使って、最小構成のサンプルコードを示して
- › Coverage の主な使い方と注意点を教えて
- › Coverage を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] カバレッジ
テストカバレッジのギャップを分析する
アプリケーション内のテスト可能なすべての表面をマッピングし、テストされているものと不足しているものを特定します。
手順
1. アプリケーションの表面をマッピングする
Explore サブエージェントを使用して、以下をカタログ化します。
ルート/ページ:
- ルート定義をスキャンします (Next.js
app/、React Router config、Vue Router など)。 - すべてのユーザー向けページとそのパスをリストアップします。
コンポーネント:
- インタラクティブなコンポーネント (フォーム、モーダル、ドロップダウン、テーブル) を特定します。
- 複雑な状態ロジックを持つコンポーネントをメモします。
API エンドポイント:
- API ルートファイルまたはバックエンドコントローラーをスキャンします。
- すべてのエンドポイントとそのメソッドをリストアップします。
ユーザーフロー:
- 重要なパスを特定します: 認証、チェックアウト、オンボーディング、コア機能。
- 複数ステップのワークフローをマッピングします。
2. 既存のテストをマッピングする
すべての *.spec.ts / *.spec.js ファイルをスキャンします。
- どのページ/ルートがカバーされているか (
page.goto()呼び出しによって) を抽出します。 - どのコンポーネントがテストされているか (ロケーターの使用によって) を抽出します。
- どの API エンドポイントがモックされているか、またはヒットされているかを抽出します。
- エリアごとのテスト数をカウントします。
3. カバレッジマトリックスを生成する
## Coverage Matrix
| Area | Route | Tests | Status |
|---|---|---|---|
| Auth | /login | 5 | ✅ Covered |
| Auth | /register | 0 | ❌ Missing |
| Auth | /forgot-password | 0 | ❌ Missing |
| Dashboard | /dashboard | 3 | ⚠️ Partial (no error states) |
| Settings | /settings | 0 | ❌ Missing |
| Checkout | /checkout | 8 | ✅ Covered |
4. ギャップに優先順位を付ける
未カバーのエリアをビジネスへの影響度でランク付けします。
- クリティカル — 認証、支払い、コア機能 → 最初にテストします
- 高 — ユーザー向け CRUD、検索、ナビゲーション
- 中 — 設定、環境設定、エッジケース
- 低 — 静的ページ、概要、利用規約
5. テスト計画を提案する
各ギャップについて、以下を推奨します。
- 必要なテストの数
templates/から使用するテンプレート- 見積もり工数 (quick/medium/complex)
## Recommended Test Plan
### Priority 1: Critical
1. /register (4 tests) — use auth/registration template — quick
2. /forgot-password (3 tests) — use auth/password-reset template — quick
### Priority 2: High
3. /settings (4 tests) — use settings/ templates — medium
4. Dashboard error states (2 tests) — use dashboard/data-loading template — quick
6. 自動生成 (オプション)
ユーザーに尋ねます: 「上位 N 個のギャップのテストを生成しますか? [Yes/No/Pick specific]」
「Yes」の場合、推奨テンプレートを使用して各ギャップに対して /pw:generate を呼び出します。
出力
- カバレッジマトリックス (テーブル形式)
- カバレッジ率の推定
- 工数見積もり付きの優先順位付けされたギャップリスト
- 不足しているテストを自動生成するオプション
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Analyze Test Coverage Gaps
Map all testable surfaces in the application and identify what's tested vs. what's missing.
Steps
1. Map Application Surface
Use the Explore subagent to catalog:
Routes/Pages:
- Scan route definitions (Next.js
app/, React Router config, Vue Router, etc.) - List all user-facing pages with their paths
Components:
- Identify interactive components (forms, modals, dropdowns, tables)
- Note components with complex state logic
API Endpoints:
- Scan API route files or backend controllers
- List all endpoints with their methods
User Flows:
- Identify critical paths: auth, checkout, onboarding, core features
- Map multi-step workflows
2. Map Existing Tests
Scan all *.spec.ts / *.spec.js files:
- Extract which pages/routes are covered (by
page.goto()calls) - Extract which components are tested (by locator usage)
- Extract which API endpoints are mocked or hit
- Count tests per area
3. Generate Coverage Matrix
## Coverage Matrix
| Area | Route | Tests | Status |
|---|---|---|---|
| Auth | /login | 5 | ✅ Covered |
| Auth | /register | 0 | ❌ Missing |
| Auth | /forgot-password | 0 | ❌ Missing |
| Dashboard | /dashboard | 3 | ⚠️ Partial (no error states) |
| Settings | /settings | 0 | ❌ Missing |
| Checkout | /checkout | 8 | ✅ Covered |
4. Prioritize Gaps
Rank uncovered areas by business impact:
- Critical — auth, payment, core features → test first
- High — user-facing CRUD, search, navigation
- Medium — settings, preferences, edge cases
- Low — static pages, about, terms
5. Suggest Test Plan
For each gap, recommend:
- Number of tests needed
- Which template from
templates/to use - Estimated effort (quick/medium/complex)
## Recommended Test Plan
### Priority 1: Critical
1. /register (4 tests) — use auth/registration template — quick
2. /forgot-password (3 tests) — use auth/password-reset template — quick
### Priority 2: High
3. /settings (4 tests) — use settings/ templates — medium
4. Dashboard error states (2 tests) — use dashboard/data-loading template — quick
6. Auto-Generate (Optional)
Ask user: "Generate tests for the top N gaps? [Yes/No/Pick specific]"
If yes, invoke /pw:generate for each gap with the recommended template.
Output
- Coverage matrix (table format)
- Coverage percentage estimate
- Prioritized gap list with effort estimates
- Option to auto-generate missing tests