coverage-analysis
Fungsinya
Skill ini menjelaskan laporan cakupan pengujian .NET, dengan menunjukkan baris dan cabang mana yang sudah diuji dan mana yang belum. Skill ini untuk pengembang yang memiliki angka cakupan dan perlu tahu artinya serta apa yang diuji berikutnya.
Kapan dipakai
- βSaat Anda punya laporan cakupan .NET dan perlu tahu apa yang sebenarnya ditunjukkan angkanya.
- βSaat cakupan berhenti naik dan Anda ingin tahu kode mana yang menghambat.
- βSaat Anda perlu menghitung seberapa banyak cakupan tambahan yang diperlukan untuk mencapai target.
Link skill
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/coverage-analysis/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βCakupan kami terhenti di 72 persen. Berdasarkan laporan ini, kode apa yang menghalangi kami mencapai 80?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent membaca data cakupan yang Anda berikan secara langsung, mengidentifikasi baris dan cabang yang belum tercakup, lalu menghitung arti setiap celah bagi target.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Coverage Analysis
Purpose
Explain what .NET coverage evidence proves, reconcile target arithmetic, and identify the code blocking progress. Add complexity/CRAP ranking only when the user explicitly asks for risk hotspots, CRAP, priorities by risk, or refactoring safety.
When to Use
Use this skill for interpreting supplied .NET line/branch/condition evidence, coverage gaps and plateaus, target arithmetic, or explicit project-wide coverage-backed risk analysis.
When Not to Use
- Named method, class, or file CRAP/refactoring-safety analysis β use the
crap-scoreskill instead - Static source-to-test pairing or listing files with no tests β use
find-untested-sources - Behavioral or pseudo-mutation gaps in existing tests β use
test-gap-analysis - Test trait/category distributions or coverage shape by test type β use
test-tagging - Writing or generating tests β this skill identifies where tests are needed, not write them
- General test execution unrelated to coverage or CRAP analysis
- Only collecting .NET coverage or printing a raw percentage with no diagnosis β use
run-tests; use native tooling for non-.NET coverage collection or analysis. Interpreting .NET line/branch gaps remains in scope here
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
| Project/solution path | No | Current directory | Path to the .NET solution or project |
| Line coverage threshold | No | 80% | Minimum acceptable line coverage |
| Branch coverage threshold | No | 70% | Minimum acceptable branch coverage |
| Existing Cobertura path | No | Discover only if not supplied | Preferred input; never rerun tests when usable |
| CRAP threshold | No | 30 | Used only for explicit risk/CRAP requests |
| Hotspot count | No | 3 | Explicit risk requests only; cap at 10 unless the user asks for more |
Discover optional inputs from the workspace. Do not ask for a project path when the current directory or a supplied report is sufficient.
Choose the smallest matching path
| User intent | Required work | Do not do |
|---|---|---|
| Explain a supplied excerpt, condition, or summary | Answer directly from the supplied evidence | Tools, CRAP, discovery, report files |
| Interpret a supplied Cobertura path or diagnose a plateau | Read that report, reconcile totals, name all material gaps, answer directly | Rerun tests, install tools, compute CRAP, or generate files unless explicitly requested |
| Rank risk hotspots, compute project-wide CRAP, or assess refactoring safety | Use the supplied/existing report, read references/guidelines.md, and compute CRAP before ranking |
Coverage-only ranking or a full report template unless requested |
| Analyze coverage when no report exists | Invoke run-tests to collect coverage with the repository-compatible runner, then analyze the generated report |
Choose or execute a test command independently; CRAP unless risk was requested |
| Produce a full markdown/HTML/CSV report | First deliver the direct answer; then read references/output-format.md or references/report-generation.md |
Report generation before the answer |
Words such as analyze coverage, what is blocking coverage, or why is coverage stuck do not by themselves request CRAP. Explicit signals include risk hotspot, CRAP, complexity-weighted priority, safe to refactor, or an equivalent request to combine complexity with coverage.
Existing-data fast path
When the user supplies a coverage excerpt, summary, or valid Cobertura path:
- Treat it as authoritative input and start there.
- Do not discover the solution or test projects unless source mapping is necessary.
- Do not run
dotnet test, install ReportGenerator, add a coverage package, or readreferences/setup-discovery.mdorreferences/report-generation.md. - Do not write
coverage-analysis.mdor create a report directory unless the user requested a saved/full report. - For interpretation and plateau questions, parse only the evidence needed to
answer. For explicit project-wide risk requests, use the bundled scripts as
described in
references/guidelines.md.
A failed read/view operation is not proof that a named path does not exist. Classify the failure, then make one targeted existence probe and use a normalized path or alternate reader only for confirmed tool availability, transport, or path-normalization failures and only af
Pertanyaan umum
Apakah skill ini menjalankan pengujian untuk mendapat cakupan?
Tidak secara default. Skill menganalisis bukti cakupan yang Anda berikan, kecuali Anda secara eksplisit memintanya mengumpulkan cakupan.
Apakah skill ini mengurutkan kode berdasarkan risiko?
Hanya jika Anda meminta titik risiko atau analisis CRAP.
Apakah skill ini menulis pengujian?
Tidak. Skill menunjukkan di mana pengujian diperlukan, tetapi penulisannya dilakukan skill lain.
Detail
Deskripsi asli dari pembuat
Activation requires either supplied .NET coverage reports/percentages/line, branch, or condition metrics, or an explicit request to collect .NET coverage for analysis. USE FOR: interpreting that evidence, including Cobertura data, partial conditions, plateaus, target arithmetic, project-wide coverage-backed CRAP, and coverage-backed refactoring safety. Analyze supplied reports directly without rerunning tests or installing tools. DO NOT USE FOR: requests with neither coverage evidence nor explicit coverage-collection intent, including hypothetical change-survival questions (use test-gap-analys
repo: dotnet/skills
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14625
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
create-custom-agent
5.8kMembantu agent Anda membuat file agen kustom VS Code dengan alatnya sendiri, instruksi, dan serah terima ke agent lain.
create-skill
5.8kMembantu agent Anda membuat skill agent baru dengan nama yang valid, deskripsi pemicu yang jelas, dan file SKILL.md yang mengikuti standar.
csharp-scripts
5.8kMembantu agent Anda menjalankan program C# kecil sebagai satu file dengan alat baris perintah .NET, tanpa membuat proyek lengkap.
dotnet-pinvoke
5.8kMembantu agent Anda memanggil pustaka native C atau C++ dari .NET dengan benar, mencakup tanda tangan, penanganan string, memori, dan safe handle.
Skill serupa
test-driven-development
311kMengajari agent Anda menulis tes yang gagal dulu, melihatnya gagal, lalu menulis kode terkecil yang lulus, sebelum membangun fitur atau perbaikan apa pun.
verification-before-completion
311kMengajari agent Anda menjalankan pemeriksaan nyata dan membaca keluarannya sebelum menyatakan tugas, perbaikan, atau build sudah selesai atau lulus.
migrate-to-shoehorn
310kMengganti type cast berisiko di file tes Anda dengan pustaka shoehorn, sehingga tes bisa memakai data parsial dan tetap lulus pemeriksaan tipe.