/coverage
Measure Bun test coverage and close gaps on a specific file. Use when adding or editing tests, when asked about coverage, or when the PostToolUse coverage hook reports uncovered lines.
$ npx -y skills add bendrucker/claude --skill coverage --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/coverage
Context preview
The summary Claude sees to decide when to auto-load this skill.
Measure Bun test coverage and close gaps on a specific file. Use when adding or editing tests, when asked about coverage, or when the PostToolUse coverage hook reports uncovered lines.
SKILL.md
coverage.SKILL.mdname: coverage
description: Measure Bun test coverage and close gaps on a specific file. Use when adding or editing tests, when asked about coverage, or when the PostToolUse coverage hook reports uncovered lines.
allowed-tools:
- Read
- Edit
- Bash(bun *scripts/coverage*)
- Bash(bun test:*)
Coverage
Measure which lines of a source file your tests exercise, then close the gaps. The engine is Bun's built-in coverage (`bun test --coverage`); `scripts/coverage/` resolves the test scope, runs it, and reports the uncovered lines.
Loop
Work one source file at a time:
1. **Measure.** Run coverage scoped to the file:
bun scripts/coverage/index.ts <file>
It runs the tests in the file's scope (its plugin, package, `.claude`, or `user` root) and prints a table plus the exact uncovered line numbers.
2. **Read.** Open the file at those line numbers. Each uncovered line is a branch, error path, or case no test reaches.
3. **Add tests.** Write or extend tests that drive execution through those lines. Target the specific uncovered behavior each line represents.
4. **Re-measure.** Run the same command. Confirm the uncovered list shrinks toward empty. Repeat until the lines you care about are covered.
Notes
- Pass multiple files to measure them together; the command merges their scopes.
- Each run rewrites `coverage/lcov.info`, which the PostToolUse hook reads to flag uncovered lines after later edits. If the hook reports stale data, just re-run the command.
- Coverage is opt-in. Plain `bun test` does not measure it, so normal test runs stay fast.
- Pursue meaningful coverage. A line that only runs in an environment the tests can't reproduce is a worse target than a real untested branch.
Read more
name: coverage description: Measure Bun test coverage and close gaps on a specific file. Use when adding or editing tests, when asked about coverage, or when the PostToolUse coverage hook reports uncovered lines. allowed-tools: - Read - Edit - Bash(bun *scripts/coverage*) - Bash(bun test:*)
Coverage
Measure which lines of a source file your tests exercise, then close the gaps. The engine is Bun's built-in coverage (`bun test --coverage`); `scripts/coverage/` resolves the test scope, runs it, and reports the uncovered lines.
Loop
Work one source file at a time:
1. **Measure.** Run coverage scoped to the file:
bun scripts/coverage/index.ts <file>
It runs the tests in the file's scope (its plugin, package, `.claude`, or `user` root) and prints a table plus the exact uncovered line numbers.
2. **Read.** Open the file at those line numbers. Each uncovered line is a branch, error path, or case no test reaches.
3. **Add tests.** Write or extend tests that drive execution through those lines. Target the specific uncovered behavior each line represents.
4. **Re-measure.** Run the same command. Confirm the uncovered list shrinks toward empty. Repeat until the lines you care about are covered.
Notes
- Pass multiple files to measure them together; the command merges their scopes.
- Each run rewrites `coverage/lcov.info`, which the PostToolUse hook reads to flag uncovered lines after later edits. If the hook reports stale data, just re-run the command.
- Coverage is opt-in. Plain `bun test` does not measure it, so normal test runs stay fast.
- Pursue meaningful coverage. A line that only runs in an environment the tests can't reproduce is a worse target than a real untested branch.
My personal plugin marketplace for Claude Code, Anthropic's AI coding assistant.
Repo: bendrucker/claude
Other skills on bendrucker-claude.
- /agent-ideas
Harvest agent-tooling ideas from prominent developers.
Open skill - /cleye
Type-safe CLI argument parsing with cleye, the standard parser for this repo's Bun scripts. Use when writing or editing any script that takes arguments (flags, positional parameters, subcommands, --help) instead of reading existing scripts for the pattern.
Open skill - /activity
Report real device usage from ActivityWatch. Covers per-app time, window titles, and active vs idle spans. Use when asked "what apps did I use", "how long was I in X", "what did I work on today", "how much was I active vs idle", or to mine usage patterns for automation.
Open skill - /history
Report shell history from atuin's local capture. Covers what commands ran, when, where, and how they exited. Use when asked "what commands did I run", "what was I working on in the terminal", "have I ever run X", "how do I usually invoke X", or about recent shell activity,
Open skill - /bun
Bun runtime patterns. Use when running bun commands, working with package.json/bun.lock, writing TypeScript scripts under Bun, or developing Claude Code plugins.
Open skill - /agent-team
Orchestrating Claude Code agent teams. Use when creating teams, spawning teammates, assigning tasks, configuring teammate modes, or setting up team quality gate hooks.
Open skill

