Aller au contenu
Skillpedia
Tests48k · #5902

supercov

Ce qu’il fait

Cet outil vous aide à repérer les parties de votre code qui ne sont pas testées. Il écrit ensuite de nouveaux tests ciblés pour couvrir ces parties manquantes, ce qui améliore la qualité de votre logiciel.

Quand l’utiliser

  • ✓Quand vous voulez ajouter ou améliorer des tests existants.
  • ✓Quand vous voulez savoir quelles parties du code ne sont pas testées.
  • ✓Quand vous voulez augmenter le taux de couverture de tests de votre projet.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/supercov/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/supercov/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Trouvez les parties de mon code qui ne sont pas testées, puis écrivez un test pour la première.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

D'abord, l'outil exécute tous vos tests actuels pour voir ce qui manque. Ensuite, il identifie un petit morceau de code non testé et écrit un nouveau test spécifique pour celui-ci. Enfin, il relance l'ensemble des tests pour montrer l'amélioration.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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, pytest or cargo 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_KEY in 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 .supercov directory in the project. It does not edit source, tests or configuration.
  • npx supercov@3.0.4 downloads a pinned release from the npm registry. Get the user's approval before the first run. Upgrading the pin needs a new review.

…

Questions fréquentes

Dois-je installer quelque chose ?

L'outil utilise une commande appelée `npx`, qui télécharge et exécute automatiquement la dernière version. La première fois, il vous demandera votre autorisation avant de télécharger.

Modifie-t-il mon code principal ?

Non, il crée seulement de nouveaux fichiers de test ou modifie des fichiers de test existants. Votre code principal n'est pas modifié.

Fonctionne-t-il avec tous les langages de programmation ?

Il fonctionne avec JavaScript, TypeScript, Python, Ruby, Rust, Go, Java et Kotlin.

Détails

Description originale de l’auteur

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.

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#5902
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires