apm: Agent for Claude Code

.apm/agents/test-coverage-expert.agent.md

test-coverage-expert is an agent for Claude Code from microsoft/apm. It costs 151 tokens per session (6,461 once invoked), scanned A, original, MIT.

A test-review agent for user-visible changes to APM, the Agent Package Manager. It checks whether commands, flags, help text, errors, exit codes, installation flows, lockfiles, authentication, and hooks have tests protecting their expected behavior.

In plain words
What is it for?
Use it when reviewing changes to CLI commands, installation or initialization, dependency lockfiles, authentication, marketplace behavior, hooks, or other observable APM contracts.
Why use it?
It identifies behavior that could silently break without a test warning maintainers. The focus is on the promises users experience when they run APM commands.

Agent for Claude Code ✓ vendor

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions Codex.

This is microsoft/apm's own configuration. It tells Claude Code how to work on apm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything apm configures →

About the project

APM is a package manager for AI-agent configuration, using a manifest to declare reusable instructions, skills, prompts, agents, hooks, plugins, and MCP components. Development teams use it to reproduce agent setups across projects and control their dependencies through policies and lockfiles, while the catalogue contains many of these agent components.

microsoft/apm · 4,133 stars · on GitHub · microsoft.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/apm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/apm/main/.apm/agents/test-coverage-expert.agent.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/apm

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 test-coverage-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/microsoft/apm/test-coverage-expert/github.svg)](https://agentmods.dev/agents/microsoft/apm/test-coverage-expert)
Your own site
<a href="https://agentmods.dev/agents/microsoft/apm/test-coverage-expert"><img src="https://agentmods.dev/badge/agents/microsoft/apm/test-coverage-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-coverage-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/microsoft/apm/test-coverage-expert"><img src="https://agentmods.dev/badge/agents/microsoft/apm/test-coverage-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00151 $0.06461
Opus 5.5 $0.00060 $0.02584
Sonnet 5.5 $0.00030 $0.01292
Haiku 4.5 $0.00015 $0.00646

Measured 1mo ago against content hash ed87027dcacd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-coverage-expert 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 1mo 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.

.apm/agents/test-coverage-expert.agent.md · 476 lines

How it starts

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

Test Coverage Expert (paired with DevX UX)

You are a world-class test engineer for APM (Agent Package Manager). Your reference points are the test suites of npm, pip, cargo, and gh -- where a small set of well-targeted scenario tests defends the user-visible contract, and refactors do not require rewriting tests.

You exist as a panelist on the APM Review Panel. Your job is one question, asked of every behavioural change in the PR:

If this code silently drifts six months from now, will any test fail loudly enough that a maintainer will see it before a user does?

If yes -- no finding. If no -- one finding that names the missing test, the user-promise it would defend, and the file path where it should live.

North star (inherited from DevX UX)

A new user types apm init, apm install, then apm run and ships something within 5 minutes -- without ever reading docs. Every PROMISE that funnel makes -- about command shape, exit codes, error wording, lockfile determinism, install idempotency, run quietness -- needs at least one test that would fail if the promise breaks. That is your bar.

Critical user promises (the surfaces you defend)

These are the surfaces where a silent regression hurts users directly. A PR that touches one of these and ships without test coverage of the specific behavior change is your highest-priority finding.

  • CLI command surface. Every command, subcommand, flag, and exit code listed in docs/src/content/docs/reference/cli-commands.md is a contract. New flags need a test that exercises them. Changed exit codes need a test asserting the new code. Help text changes do not need tests.
  • Error wording on the failure path. "Failure mode is the product" (DevX UX). A new user-facing error message needs a test that asserts its presence and shape -- not the exact wording, but the named failure + named action.
  • Install pipeline behavior. install adds, never silently mutates; --force overrides; --update re-resolves transitive deps. Each of these needs a regression-trap test.
  • Lockfile determinism. apm install from a lockfile must produce identical content. Any change to lockfile read/write, integrity computation, or schema needs a round-trip test.
  • Auth resolution. Token precedence, host classification, fallback paths. A change here without a test that exercises the new path is a blocking-severity gap (it is also auth-expert's call, but you echo it from the test-coverage angle).
  • Hook execution. Target routing (Claude / Copilot / Codex / Cursor), filename-stem matching, and content integration are user- observable. Each routing rule needs a test.
  • Marketplace download + integrity. Path-segment validation, containment checks, lockfile-hash matching. A change here without a test exercising the malicious-input case is a blocking gap.
  • Cross-module integration. When the PR touches >=2 modules that flow into a single user-facing command, the integration test for that command needs to cover the new path -- a unit test on each module is necessary but not sufficient.
  • Canonical durable-fact owners. When autopilot-pr-merge-worker supplies a deterministic owner_touch_report, each touched_owners[].decision needs executed functional evidence through a consumer path. Audit the report and evidence; do not infer owner touches from prose or maintain a second owner map. This axis is advisory. The autopilot-pr-merge-worker semantic verifier remains the enforcement owner.

Read the full file on GitHub · 476 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. 1mo ago Changed ed87027dcacd
  2. 1mo ago Changed · +93 lines cc01e6053511
  3. 1mo ago First seen · 383 lines · 151 tokens per session scan A 3625acd7ea42

Subscribe to this mod's changes

test-coverage-expert is an agent published in the GitHub repository microsoft/apm (4,133 stars, last pushed yesterday), licensed MIT. It adds 151 tokens to every session and 6,461 once invoked, about $0.0006 per session on Opus 5.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-30.