Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/pramoddutta/qaskills/code-coveragenpx skills add PramodDutta/qaskills --skill code-coveragegit clone --depth 1 https://github.com/PramodDutta/qaskillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pramoddutta/qaskills/code-coverage)<a href="https://agentmods.dev/skills/pramoddutta/qaskills/code-coverage"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/code-coverage.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00045 | $0.02195 |
| Opus 5 | $0.00023 | $0.01097 |
| Sonnet 5 | $0.00009 | $0.00439 |
| Haiku 4.5 | $0.00005 | $0.00219 |
Grade A, and why
Code Coverage Analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Coverage Analysis
This skill makes an AI agent configure coverage collection correctly (Istanbul instrumentation or V8 native coverage), set thresholds that fail builds, read coverage reports to find genuinely untested branches, and exclude generated or config code so the numbers mean something. Trigger it when a user asks "what is our coverage", wants a coverage gate in CI, or when a coverage/ directory, --coverage flag, .nycrc, or coverageThreshold appears in the project.
Core Principles
- Branch coverage is the number that matters. Line coverage marks a line as hit even if only one of its outcomes ran. A guard clause
if (a && b) return x;can be 100 percent line-covered with three of its four branch outcomes untested. - Coverage is a gap detector, not a quality score. 95 percent coverage with assertion-free tests proves nothing. Use coverage to find untested code paths; use mutation testing to check assertion strength.
- Thresholds must fail the build. A coverage report nobody reads is decoration. Wire
coverageThreshold(Jest),thresholds(Vitest), or--check-coverage(nyc/c8) so CI goes red on regression. - Set thresholds at current reality, then ratchet. Dropping a 90 percent global gate onto a 60 percent codebase makes the team delete the gate. Start at today's number minus 1, raise it as coverage improves.
- Measure
allfiles, not just imported ones. By default some tools only report files touched by tests, so a completely untested module is invisible. Enableall: true(nyc),coverage.all(Vitest), or a broadcollectCoverageFrom(Jest). - Exclude generated code explicitly. Protobuf stubs, GraphQL codegen, migrations, and
*.d.tsinflate or deflate numbers randomly. Exclude them in config, never by sprinkling ignore comments through generated files.
Setup and Patterns
1. Jest: collection, thresholds, and per-directory gates
// jest.config.js
module.exports = {
preset: 'ts-jest',
collectCoverage: true,
coverageProvider: 'v8',
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/__generated__/**',
'!src/**/*.stories.tsx',
'!src/test-utils/**',
],
coverageReporters: ['text', 'lcov', 'json-summary'],
coverageThreshold: {
global: {
branches: 80,
functions: 85,
lines: 90,
statements: 90,
},
// Money-handling code gets a stricter gate
'./src/lib/payments/': {
branches: 95,
lines: 98,
},
},
};
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 216 lines · 45 tokens per session scan A 5f50f6643a53
Code Coverage Analysis is a skill published in the GitHub repository PramodDutta/qaskills (214 stars, last pushed 5d ago), licensed MIT. It adds 45 tokens to every session and 2,195 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
test-generator
Generate comprehensive unit, integration, and end-to-end tests. Use when adding test coverage, writing tests for new features, or improving existing test suites.
test-generator
测试生成技能 - 单元测试创建、Mock生成、覆盖率分析.
plugin-test
为 Zhin.js 插件编写和运行测试(Plugin Runtime)。Use when asked to write tests, add test coverage, or verify defineCommand / definePlugin behavior. 引导编写符合 Runtime 的 Vitest 测试。.
argot-setup-ci
Wire argot into a repository's GitHub Actions as a non-blocking configured check on every pull request — a job summary plus code-scanning annotations. Use when the user wants argot "in CI", "on PRs", "as a GitHub Action", or asks to "set up argot CI". Distinct from argot-setup (local checking) and argot-review-pr…
Unit Test Improver
Reviews existing unit tests for gaps, weak assertions, and missing edge cases, then rewrites them to be more robust.
Unit Test Writer
Generates comprehensive unit tests for any function or module with edge cases.