MCP HubMCP Hub
スキル一覧に戻る

coverage-reporter

majiayu000
更新日 Today
24 閲覧
58
9
58
GitHubで表示
メタtesting

について

カバレッジレポータースキルは、PythonおよびTypeScriptのテストカバレッジレポートを生成・分析し、不足箇所の特定と傾向の追跡を行います。テスト実行後またはコミット前に起動し、品質基準の達成を保証します。このスキルはGitコンテキストを必要とし、テストおよびコードレビューワークフローと並行して実行可能です。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/majiayu000/claude-skill-registry
Git クローン代替
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/coverage-reporter

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Coverage Reporter Skill

Comprehensive test coverage analysis and reporting for Python and TypeScript code.

When This Skill Activates

  • After running test suite
  • Before committing changes
  • Tracking coverage over time
  • Investigating coverage gaps
  • Reporting on coverage metrics

Coverage Analysis Methodology

Phase 1: Coverage Collection

Python Coverage

cd backend
pytest --cov=app --cov-report=html --cov-report=term-missing

TypeScript Coverage

cd frontend
npm run test:coverage

Phase 2: Gap Analysis

Step 2.1: Identify Untested Code

For each file:
1. Count lines not covered
2. Identify untested functions
3. Identify untested branches
4. Calculate coverage percentage

Step 2.2: Prioritize by Risk

Risk LevelTypePriority
CriticalAuth, crypto, data accessFix immediately
HighBusiness logic, validationFix within 48h
MediumUtils, helpersFix within 1 week
LowFormatting, displayNice to have

Phase 3: Coverage Report Generation

## Test Coverage Report

**Date:** [DATE]
**Overall Coverage:** [X]%

### Summary
- Backend: [X]%
- Frontend: [Y]%
- Target: 80%

### Critical Gaps
- [File]: [X]% - [reason]
- [File]: [Y]% - [reason]

### Trends
- Week 1: 75%
- Week 2: 77%
- Week 3: 79%
- Trend: Improving

### Recommendations
1. [Recommendation 1]
2. [Recommendation 2]

Phase 4: Trend Analysis

1. Historical coverage
   - Track weekly/monthly trends
   - Identify degradation
   - Project future coverage

2. Coverage velocity
   - How fast is coverage improving?
   - Estimate time to target

3. Coverage stability
   - Which areas consistently low?
   - Which areas consistently high?

Coverage Requirements by Layer

LayerTargetMinimum
Services90%80%
Controllers85%75%
Models80%70%
Utils90%85%
Routes75%65%
Components (Frontend)80%70%

Quick Coverage Commands

# Python coverage with details
cd backend
pytest --cov=app --cov-report=html --cov-report=term-missing -v

# Frontend coverage
cd frontend
npm run test:coverage

# Coverage diff against main
# (Identify what new code is untested)
git diff main...HEAD | grep "^+" | wc -l

Gap Remediation Workflow

For Each Untested Component:

1. Understand the code
   - What does it do?
   - When is it called?
   - Why isn't it tested?

2. Determine test strategy
   - Unit test?
   - Integration test?
   - E2E test?

3. Write tests
   - Happy path
   - Error cases
   - Edge cases

4. Verify coverage
   - Re-run coverage
   - Confirm improved

Integration with test-writer

When coverage gaps identified:

  1. Report findings to test-writer skill
  2. Request test generation for gaps
  3. Re-run coverage after tests added
  4. Track improvement

Validation Checklist

  • Coverage >= target percentage
  • No untested critical code
  • All public APIs covered
  • Error paths tested
  • Edge cases covered
  • Coverage trend is improving
  • No artificial coverage inflation

References

  • Coverage requirements in CLAUDE.md
  • See test-writer skill for test generation
  • Testing patterns in python-testing-patterns skill

GitHub リポジトリ

majiayu000/claude-skill-registry
パス: skills/coverage-reporter

関連スキル

content-collections

メタ

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

スキルを見る

evaluating-llms-harness

テスト

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

スキルを見る

cloudflare-turnstile

メタ

This skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.

スキルを見る

webapp-testing

テスト

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

スキルを見る