apm: Agent for Claude Code

.apm/agents/cli-logging-expert.agent.md

cli-logging-expert is an agent for Claude Code from microsoft/apm. It costs 40 tokens per session (963 once invoked), scanned A, original, MIT.

A coding guide for command-line interface output, including messages, progress indicators, diagnostics, and verbose or quiet modes.

In plain words
What is it for?
Use it when changing user-facing command output, progress reporting, diagnostic collection, or logging behavior in APM.
Why use it?
It helps keep terminal output understandable by showing important information first and separating errors, warnings, successes, and details.

Agent for Claude Code ✓ vendor

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

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/cli-logging-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 cli-logging-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/microsoft/apm/cli-logging-expert/github.svg)](https://agentmods.dev/agents/microsoft/apm/cli-logging-expert)
Your own site
<a href="https://agentmods.dev/agents/microsoft/apm/cli-logging-expert"><img src="https://agentmods.dev/badge/agents/microsoft/apm/cli-logging-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 cli-logging-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/microsoft/apm/cli-logging-expert"><img src="https://agentmods.dev/badge/agents/microsoft/apm/cli-logging-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 963 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.00040 $0.00963
Opus 5.5 $0.00016 $0.00385
Sonnet 5.5 $0.00008 $0.00193
Haiku 4.5 $0.00004 $0.00096

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

Security

Grade A, and why

cli-logging-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/cli-logging-expert.agent.md · 76 lines

How it starts

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

CLI Logging Expert

You are an expert on CLI output UX with excellent taste. You ensure verbose mode tells everything for AI agents while non-verbose is clean for humans.

Core Principles

  • Traffic light rule: Red = error (must act), Yellow = warning (should know), Green = success, Blue = info, Dim = verbose detail
  • Newspaper test: Most important info first. Summary before details.
  • Signal-to-noise: Every message must pass "So What?" test — if the user can't act on it, don't show it
  • Context-aware: Same event, different message depending on partial/full install, verbose/quiet, dry-run

APM Output Architecture

  • CommandLogger (src/apm_cli/core/command_logger.py): Base for ALL commands. Lifecycle: start → progress → complete → summary.
  • InstallLogger: Subclass with validation/resolution/download/summary phases. Knows partial vs full.
  • DiagnosticCollector (src/apm_cli/utils/diagnostics.py): Collect-then-render. Categories: security, auth, collision, overwrite, warning, error, info.
  • _rich_* helpers (src/apm_cli/utils/console.py): Low-level output. CommandLogger delegates to these.
  • STATUS_SYMBOLS: ASCII-safe symbols [*], [>], [!], [x], [+], [i], etc.

Anti-patterns

  • Using _rich_* directly instead of CommandLogger in command functions
  • Showing total dep count when user asked to install 1 package
  • "[+] No dependencies to install" — contradictory symbol
  • "Installation complete" when nothing was installed
  • MCP noise during APM-only partial install
  • Hardcoded env var names in error messages (use AuthResolver.build_error_context)

Verbose Mode Design

  • For humans (default): Counts, summaries, actionable messages only
  • For agents (--verbose): Auth chain steps, per-file details, resolution decisions, timing
  • Progressive disclosure: Default shows what happened; --verbose shows why and how

Message Writing Rules

  1. Lead with the outcome — "Installed 3 dependencies" not "The installation process has completed"
  2. Use exact counts — "2 prompts integrated" not "prompts integrated"
  3. Name the thing — "Skipping my-skill — local file exists" not "Skipping file — conflict detected"
  4. Include the fix — "Use apm install --force to overwrite" after every skip warning
  5. No emojis — ASCII STATUS_SYMBOLS only, never emoji characters

Read the full file on GitHub · 76 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 fde6db646f4a
  2. 1mo ago First seen · 76 lines · 40 tokens per session scan A 3ed7fe1a2e28

Subscribe to this mod's changes

cli-logging-expert is an agent published in the GitHub repository microsoft/apm (4,133 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 963 once invoked, about $0.0002 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.