improve-coverage

improve-coverage is a command for Claude Code from vishnu2kmohan/mcp-server-langgraph. It costs 18 tokens per session (3,204 once invoked), scanned A, original, MIT.

A command that examines automated-test coverage, meaning which parts of the code are tested, and creates focused test stubs for uncovered code.

In plain words
What is it for?
Use it to find files below a selected threshold, prioritise important modules, generate tests for uncovered lines, and track progress.
Why use it?
It identifies testing gaps and helps direct work toward a chosen coverage threshold.

Command for Claude Code

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/vishnu2kmohan/mcp-server-langgraph/improve-coverage
Clone the repo
git clone --depth 1 https://github.com/vishnu2kmohan/mcp-server-langgraph

Made for: Claude Code.

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 improve-coverage

README.md
[![agentmods](https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/improve-coverage.svg)](https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/improve-coverage)
Your own site
<a href="https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/improve-coverage"><img src="https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/improve-coverage.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,204 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.00018 $0.03204
Opus 5 $0.00009 $0.01602
Sonnet 5 $0.00004 $0.00641
Haiku 4.5 $0.00002 $0.00320

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

Security

Grade A, and why

improve-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 4d 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.

.claude/commands/improve-coverage.md · 420 lines

How it starts

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

Improve Test Coverage

You are tasked with systematically improving test coverage for the mcp-server-langgraph project. This command analyzes coverage gaps and generates targeted test stubs to increase coverage toward the 80% target.

Project Coverage Context

Current Coverage: 60-65% combined (unit + integration) Target Coverage: 80% Test Suite: 437+ tests across 5 categories Coverage Tools: pytest-cov with HTML/XML reports

Coverage Gap Strategy:

  • Identify files below threshold (default: 70%)
  • Prioritize critical modules (auth, agent, sessions)
  • Generate test stubs for uncovered lines
  • Track progress toward 80% target

Your Task

Step 1: Gather Information

Ask the user using the AskUserQuestion tool:

Question 1: What coverage threshold to use?

  • Header: "Threshold"
  • Options:
    • 50%: Show all files below 50% (high-priority gaps)
    • 60%: Show files below 60% (medium-priority)
    • 70%: Show files below 70% (standard threshold)
    • 80%: Show files below 80% (target coverage)

Question 2 (Optional): Focus on specific module?

  • Header: "Module Focus"
  • Options:
    • All modules: Analyze entire codebase
    • Auth: Focus on authentication/authorization
    • Agent: Focus on LangGraph agent
    • Sessions: Focus on session storage
    • Tools: Focus on MCP tools
    • Observability: Focus on telemetry/logging
    • Specific file: User-provided file path

Step 2: Run Coverage Analysis

  1. Run pytest with coverage (if coverage report doesn't exist):

    uv run --frozen pytest tests/ --cov=src/mcp_server_langgraph --cov-report=html --cov-report=xml --cov-report=term -v
    
  2. Parse coverage report:

    • Read htmlcov/index.html for summary
    • Read .coverage database (if available)
    • Parse terminal output for quick overview
  3. Extract coverage data:

    • File-level coverage percentages
    • Uncovered line ranges
    • Missing branches (if branch coverage enabled)

Step 3: Identify Coverage Gaps

Priority Ranking (for files below threshold):

Read the full file on GitHub · 420 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. 4d ago First seen · 420 lines · 18 tokens per session scan A 8c1e3cc48962

Subscribe to this mod's changes

improve-coverage is a command published in the GitHub repository vishnu2kmohan/mcp-server-langgraph (4 stars, last pushed 11d ago), licensed MIT. It adds 18 tokens to every session and 3,204 once invoked, about $0.0001 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-08-31.