pmd

pmd is a command for Claude Code from TheWayWithin/agent-11. It costs 13 tokens per session (1,405 once invoked), scanned A, original, MIT.

A post-mortem command that investigates a failure and looks for its root causes across agents, documentation, tools, configuration, and working processes. A post-mortem is a structured review after an incident or failed task.

In plain words
What is it for?
Analyzing deployment failures, coordination breakdowns, incorrect tool use, weak documentation, and recurring process problems.
Why use it?
It turns a failure into specific fixes and prevention steps instead of only recording what went wrong. It can also reveal repeated problems across incidents.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

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/thewaywithin/agent-11/pmd
Clone the repo
git clone --depth 1 https://github.com/TheWayWithin/agent-11

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 pmd

README.md
[![agentmods](https://agentmods.dev/badge/commands/thewaywithin/agent-11/pmd.svg)](https://agentmods.dev/commands/thewaywithin/agent-11/pmd)
Your own site
<a href="https://agentmods.dev/commands/thewaywithin/agent-11/pmd"><img src="https://agentmods.dev/badge/commands/thewaywithin/agent-11/pmd.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,405 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.1 $0.00013 $0.01405
Opus 5 $0.00006 $0.00702
Sonnet 5 $0.00003 $0.00281
Haiku 4.5 $0.00001 $0.00140

Measured yesterday against content hash d6c38174ccfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pmd 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 yesterday.

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/pmd.md · 227 lines

How it starts

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

POST MORTEM DUMP (PMD) COMMAND 🔍

Command: /pmd [issue_description]

Purpose: Conduct systematic root cause analysis of failures to identify improvements in agents, documentation, and processes.

WHAT IS PMD?

PMD (Post Mortem Dump) is a diagnostic command that analyzes failures and issues to identify their root causes across multiple system layers:

  • Agent performance and prompts
  • Documentation quality and completeness
  • Tool usage and configuration
  • Process and coordination issues

KEY FEATURES

  • Systematic Analysis: Examines agents, docs, tools, and processes
  • Root Cause Identification: Pinpoints primary and contributing factors
  • Actionable Recommendations: Provides specific fixes with file locations
  • Pattern Recognition: Identifies recurring issues across failures
  • Prevention Strategies: Suggests monitoring and validation improvements

USAGE SCENARIOS

# Analyze recent failures from progress.md
/pmd

# Analyze specific issue
/pmd "Coordinator not using Task tool correctly"

# Analyze deployment failure
/pmd "Installation script failing on Windows"

# Analyze coordination breakdown
/pmd "Agents producing conflicting outputs"

ANALYSIS CATEGORIES

1. Agent Performance

  • Prompt clarity and completeness
  • Scope boundary compliance
  • Coordination protocol adherence
  • Tool usage correctness
  • Error handling robustness

2. Documentation Quality

  • CLAUDE.md currency and accuracy
  • Project-plan.md task definition
  • Progress.md issue logging
  • Ideation document sufficiency
  • README troubleshooting coverage

3. Tool Usage

  • MCP prioritization
  • Task tool delegation
  • File operation accuracy
  • Error detection and handling
  • Performance optimization

4. Process Issues

  • Planning adequacy
  • Communication clarity
  • Testing coverage
  • Issue detection speed
  • Escalation procedures

OUTPUT STRUCTURE

Generates post-mortem-analysis.md containing:

Executive Summary

High-level description of issue and impact

Read the full file on GitHub · 227 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. yesterday First seen · 227 lines · 13 tokens per session scan A d6c38174ccfa

Subscribe to this mod's changes

pmd is a command published in the GitHub repository TheWayWithin/agent-11 (15 stars, last pushed 13d ago), licensed MIT. It adds 13 tokens to every session and 1,405 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-09-04.

Related

Other commands, from other repositories