supercov
できること
このツールは、コードの中でテストされていない部分を見つけます。そのうえで、不足している部分をカバーする新しい、焦点を絞ったテストを書き、ソフトウェアの品質を高めます。
使う場面
- ✓既存のテストを追加・改善したいとき。
- ✓テストされていないコードの部分を知りたいとき。
- ✓プロジェクトのテストカバレッジを高めたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/supercov/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のコードのうち、テストされていない部分を見つけて、最初の部分のテストを書いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
まず、ツールが既存のテストをすべて実行して、何が不足しているかを確認します。次に、テストされていない小さなコード片を特定し、それ専用の新しいテストを書きます。最後に、すべてのテストを再実行して改善を確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Supercov
Overview
Supercov runs the project's own test command on the user's machine and reports line, branch and MC/DC coverage per test. It changes no source, tests or configuration. This skill uses that report to pick one untested piece of code at a time and write a focused test for it.
It works with JavaScript, TypeScript, Python, Ruby, Rust, Go, Java and Kotlin projects.
When to Use This Skill
- Use when the user asks to add or improve tests.
- Use when the user asks which code is untested, or asks to raise coverage.
- Use when the user asks which file to refactor first and has agreed to a quality check (see "Quality check").
Preconditions
- Node.js 22 or newer. If it is missing, tell the user. Do not install software without the user's approval.
- The project's test command, for example
npm test,pytestorcargo test. Ask if it is not obvious from the repository. - Always run the pinned version,
npx supercov@3.0.4. The first run downloads that release from npm, so get the user's approval before it.
How It Works
Step 1: Measure the suite
Run the full test command under Supercov. Coverage is measured locally and sends nothing over the network.
npx supercov@3.0.4 -- npm test
Step 2: Pick a target
List the untested code, pick one item, and read it in context.
npx supercov@3.0.4 runs latest gaps --limit 5
npx supercov@3.0.4 runs latest file src/session.js
Step 3: Write one focused test
Write one test for the chosen target. Change only test files unless the user asks otherwise.
Step 4: Rerun and report
Rerun the command from step 1. Report the test you added and the coverage before and after.
For anything not shown here, npx supercov@3.0.4 docs <topic> prints the guide for that version. Topics: agent-loop, quality, supported-suites, troubleshooting.
Examples
Example 1: Add a test for untested code
npx supercov@3.0.4 -- npm test
npx supercov@3.0.4 runs latest gaps --limit 5
# add one test for the first gap, then:
npx supercov@3.0.4 -- npm test
Example 2: Other languages
npx supercov@3.0.4 -- pytest
npx supercov@3.0.4 -- cargo test
npx supercov@3.0.4 -- go test ./...
npx supercov@3.0.4 -- ./gradlew test
Quality check
npx supercov@3.0.4 quality ranks files by code smells, and npx supercov@3.0.4 quality patch reports what a change introduced.
- These two commands send the project's source files to TypeSafe's API for analysis. Run them only when the user asked for a quality check, and tell the user before running that their source files will be sent to TypeSafe.
- They need the user's own
TYPESAFE_API_KEYin the environment. Never ask the user to paste a key into the conversation, and never create, read or print one. - If the key is missing, tell the user the check needs it, then answer from reading the code and say Supercov did not check it.
Best Practices
- ✅ Measure the full suite first, so the gaps reflect every test.
- ✅ Add one test per gap and rerun before picking the next.
- ✅ Report coverage before and after with the numbers Supercov printed.
- ❌ Don't change application code to raise coverage unless the user asks.
- ❌ Don't run the quality commands without the user's request and consent.
Limitations
- Coverage shows which code ran under a test. It does not show that the test checked the result.
- Supercov measures the suites listed in
npx supercov@3.0.4 docs supported-suites. Other runners are not measured. - The test command runs as the project defines it. If the suite needs services, credentials or network access, those needs still apply.
- This skill does not replace environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, or safety boundaries are missing.
Security & Safety Notes
- The skill runs the project's own test command and writes test files in the user's repository. Run it only in a repository the user has authorized, and keep changes to test files unless the user asks otherwise.
- Supercov writes its run data to a
.supercovdirectory in the project. It does not edit source, tests or configuration. npx supercov@3.0.4downloads a pinned release from the npm registry. Get the user's approval before the first run. Upgrading the pin needs a new review.
…
よくある質問
何かインストールする必要がありますか?
このツールは`npx`というコマンドを使い、最新版を自動でダウンロードして実行します。初回は、ダウンロードの許可を求められます。
メインのコードは変更されますか?
いいえ。新しいテストファイルを作成したり、既存のテストファイルを変更したりするだけです。メインのコードは変更されません。
どのプログラミング言語でも使えますか?
JavaScript、TypeScript、Python、Ruby、Rust、Go、Java、Kotlinで使えます。
詳細
作者による元の説明
Measure line, branch and MC/DC coverage of a project's existing tests with the supercov CLI, then write small, focused tests for the code no test reaches.
人気
- GitHubのスター
- 48k
- ランキング
- #5902
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。