maintain-test-coverage

maintain-test-coverage is a command for Cursor from Consensys/ask-o11y-plugin. It costs 0 tokens per session (700 once invoked), scanned A, original, MIT.

A command set for measuring test coverage, meaning how much of the code is exercised by tests. It combines end-to-end tests, which test the application as a user would, with unit tests, which test small pieces of code.

In plain words
What is it for?
It runs unit and browser-based Playwright tests, merges their coverage data, creates an HTML report, and points developers to where additional tests are needed.
Why use it?
It shows which parts of the code have no test coverage and checks whether the combined result reaches 65 percent line coverage. This makes gaps visible instead of relying on separate reports.

Command for Cursor

Install

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.

agentmods
npx agentmods add commands/consensys/ask-o11y-plugin/maintain-test-coverage
Clone the repo
git clone --depth 1 https://github.com/Consensys/ask-o11y-plugin

Made for: Cursor.

Wrote 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.

agentmods badge for maintain-test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/commands/consensys/ask-o11y-plugin/maintain-test-coverage.svg)](https://agentmods.dev/commands/consensys/ask-o11y-plugin/maintain-test-coverage)
Your own site
<a href="https://agentmods.dev/commands/consensys/ask-o11y-plugin/maintain-test-coverage"><img src="https://agentmods.dev/badge/commands/consensys/ask-o11y-plugin/maintain-test-coverage.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 700 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00700
Opus 5 $0.00000 $0.00350
Sonnet 5 $0.00000 $0.00140
Haiku 4.5 $0.00000 $0.00070

Measured 5d ago against content hash 335cf0b4bcbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

maintain-test-coverage 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 5d ago.

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.

.cursor/commands/maintain-test-coverage.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Maintain Test Coverage

Overview

Achieve 65% line coverage through a combination of E2E tests and unit tests. Coverage reports are merged from both test types into a single unified report.

Commands

Command Description
npm run coverage Run all tests and generate combined coverage report
npm run coverage:e2e Run only E2E tests with coverage (standalone)
npm run coverage:unit Run only unit tests with coverage
npm run coverage:merge Merge existing coverage outputs

Workflow

  1. Run Combined Coverage

    npm run coverage
    

    This command:

    • Cleans previous coverage data
    • Runs unit tests with coverage
    • Builds frontend with instrumentation
    • Runs E2E tests with coverage
    • Merges all coverage into coverage-combined/
  2. Review Coverage Report

    • Check terminal output for line percentage
    • Open coverage-combined/index.html for detailed report
    • If line coverage is below 65%, continue to step 3
  3. Add Tests for Uncovered Code

    • E2E tests: Add to tests/ directory using Playwright
    • Unit tests: Add to src/**/__tests__/ or src/**/*.test.ts
    • Re-run npm run coverage to verify improvement
  4. Iterate Until 65% Line Coverage

Test Strategy

E2E Tests (Playwright) - tests/

Best for:

  • React components with user interactions
  • Page navigation and routing
  • Form submissions and validations
  • Visual state changes

Unit Tests (Jest) - src/**/__tests__/

Best for:

  • Pure utility functions
  • Data transformation logic
  • Parsers and validators
  • Service classes with mockable dependencies

Priority Areas

E2E (UI Components)

  1. Chat Input & Submission
  2. Session Management
  3. AppConfig settings
  4. System Prompt Configuration

Unit Tests (Services)

Read the full file on GitHub · 96 lines

Changes

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.

  1. 5d ago First seen · 96 lines · 0 tokens per session scan A 335cf0b4bcbd

Subscribe to this mod's changes

maintain-test-coverage is a command published in the GitHub repository Consensys/ask-o11y-plugin (40 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 700 tokens. 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-08-30.