updating-coverage

Run coverage scripts with pnpm and update the README badge.

125|42|Updated May 19, 2025
One-click install
npx skills add https://github.com/SocketDev/socket-mcp --skill updating-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: updating-coverage
Source: https://github.com/SocketDev/socket-mcp/tree/main/.claude/skills/fleet/updating-coverage
Command: npx skills add https://github.com/SocketDev/socket-mcp --skill updating-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This workflow orchestrates updating the root README's coverage badge by discovering and running the repo's coverage script and rewriting the badge line to reflect current test coverage.

Core Features & Use Cases

  • Discovery & Validation: identifies the appropriate coverage script in package.json (cover / coverage / test:cover) and validates its presence.
  • Execution: runs the repo's coverage tooling with the project’s standard workflow (e.g., pnpm run <script>), surfacing failures clearly.
  • Rewrite & Commit: updates the README badge via the dedicated badge script and commits the changes according to fleet norms.
  • Umbrella Alignment: designed as part of the updating umbrella alongside updating-security and updating-lockstep.

Quick Start

Invoke the update-coverage flow to refresh the root README's coverage badge and commit the change.

Frequently Asked Questions about updating-coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically update my test coverage badge in a pnpm repository?

To automatically update your test coverage badge, the workflow discovers coverage scripts like cover or test:cover in package.json, executes them with pnpm, and rewrites the README badge line. It then commits the updated badge according to fleet norms.

What script names does the coverage workflow look for in package.json?

The coverage workflow looks for specific script names in package.json such as cover, coverage, or test:cover. It validates the presence of these scripts before executing them with pnpm to generate the current coverage metrics.

Can I use this workflow if my README does not have a coverage badge?

No, this workflow is designed for repositories that already maintain a README coverage badge. It coordinates the discovery and execution of coverage scripts to rewrite the existing badge line, rather than generating a new badge from scratch.

What happens if the coverage script fails during the badge update?

If the coverage script fails during the badge update, the workflow surfaces the failures clearly during the pnpm execution phase. This prevents the badge rewrite and commit steps from proceeding with invalid or outdated coverage data.

How does this coverage automation compare to other updating workflows in the fleet?

This coverage automation aligns with the updating umbrella alongside updating-security and updating-lockstep. It is specifically specialized for discovering coverage scripts, running them with pnpm, and committing README badge updates according to fleet norms.