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 commands/parkerm2/create-claude-workflow/analyze-coveragegit clone --depth 1 https://github.com/ParkerM2/create-claude-workflowWhat 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.00016 | $0.04418 |
| Opus 5 | $0.00008 | $0.02209 |
| Sonnet 5 | $0.00003 | $0.00884 |
| Haiku 4.5 | $0.00002 | $0.00442 |
Grade A, and why
analyze-coverage scanned grade A with 1 finding 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 2d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { execSync } from "child_process"; How it starts
The opening of the file, as written. The whole thing — 628 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Coverage Analysis with Gap Detection
Runs test coverage suite, compares against baseline, flags untested critical paths, and generates specific test suggestions for uncovered code. Supports Jest, pytest, Go, and Rust test frameworks.
Usage
/analyze-coverage [--update-baseline] [--pr] [--changed-only] [--min <percent>] [--format json|markdown]
--update-baseline: Save current coverage as new baseline for comparison--pr: Post results as GitHub PR comment--changed-only: Only analyze files changed in current branch--min <percent>: Fail if coverage below threshold (default: 50)--format: Output format (markdown, json, text)
Workflow
Phase 1: Framework Detection
Automatically detects test framework and coverage tooling.
import { execSync } from "child_process";
import * as fs from "fs";
import * as path from "path";
class CoverageAnalyzer {
constructor() {
this.framework = null;
this.coverageTool = null;
this.config = null;
this.reportPath = null;
}
detectFramework() {
// Check package.json for test scripts and dependencies
let packageJson = {};
try {
const pkg = fs.readFileSync("package.json", "utf-8");
packageJson = JSON.parse(pkg);
} catch (err) {
console.log("ℹ No package.json found; checking for other frameworks");
}
// Jest detection
if (packageJson.devDependencies?.jest || fs.existsSync("jest.config.js")) {
this.framework = "jest";
this.coverageTool = "jest";
this.reportPath = "coverage/coverage-final.json";
return this;
}
// Check for pytest (Python)
if (fs.existsSync("pyproject.toml") || fs.existsSync("setup.cfg")) {
try {
execSync("python -m pytest --version", { stdio: "pipe" });
this.framework = "pytest";
this.coverageTool = "pytest-cov";
this.reportPath = ".coverage";
return this;
} catch (err) {
console.log("ℹ pytest not found");
}
}
// Go coverage detection
if (fs.existsSync("go.mod")) {
this.framework = "go";
this.coverageTool = "go test";
this.reportPath = "coverage.out";
return this;
}
// Rust coverage detection
if (fs.existsSync("Cargo.toml")) {
this.framework = "rust";
this.coverageTool = "cargo tarpaulin";
this.reportPath = "cobertura.xml";
return this;
}
throw new Error("Could not detect test framework. Supported: Jest, pytest, Go, Rust");
}
loadBaselineIfExists() {
const baselinePath = ".coverage-baseline.json";
try {
const baseline = JSON.parse(fs.readFileSync(baselinePath, "utf-8"));
console.log(`✓ Loaded baseline coverage: ${baseline.summary.lines.pct}%`);
return baseline;
} catch (err) {
console.log("ℹ No baseline found; creating fresh baseline");
return null;
}
}
}
const analyzer = new CoverageAnalyzer();
analyzer.detectFramework();
const baseline = analyzer.loadBaselineIfExists();
console.log(`✓ Detected framework: ${analyzer.framework}`);
console.log(`✓ Coverage tool: ${analyzer.coverageTool}`);
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.
- 2d ago First seen · 628 lines · 16 tokens per session scan A b71354529c13
analyze-coverage is a command published in the GitHub repository ParkerM2/create-claude-workflow (4 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 4,418 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.