retro

retro is a command for Claude Code from ShaheerKhawaja/ProductionOS. It costs 30 tokens per session (3,144 once invoked), scanned A, original, MIT.

An engineering retrospective command that reviews recent development activity and tracks changes over time. A retrospective is a structured look back at what happened during a project or time period.

In plain words
What is it for?
It analyzes Git commits, work patterns, code and test changes, self-evaluation scores, agent usage, and ProductionOS health for periods such as the last day, week, or month, including comparisons with an earlier period.
Why use it?
It helps reveal trends in coding work, code quality, testing, self-assessments, and use of other agents instead of relying on memory.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

Part of the productionos plugin — 4 skills, 41 commands, 11 agents shipped together

Good fit It analyzes Git commits, work patterns, code and test changes, self-evaluation scores, agent usage, and ProductionOS health for periods such as the last day, week, or month, including comparisons with an earlier period.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/shaheerkhawaja/productionos/retro
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.

Clone the repo
git clone --depth 1 https://github.com/ShaheerKhawaja/ProductionOS

Made for: Claude Code.

Or install productionos, the plugin that ships this one along with the rest of its 4 skills, 41 commands, 11 agents.

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 retro

README.md
[![agentmods](https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/retro/github.svg)](https://agentmods.dev/commands/shaheerkhawaja/productionos/retro)
Your own site
<a href="https://agentmods.dev/commands/shaheerkhawaja/productionos/retro"><img src="https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/retro/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 retro

Your own site · 80×15
<a href="https://agentmods.dev/commands/shaheerkhawaja/productionos/retro"><img src="https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/retro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 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,144 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.00030 $0.03144
Opus 5 $0.00015 $0.01572
Sonnet 5 $0.00006 $0.00629
Haiku 4.5 $0.00003 $0.00314

Measured 9d ago against content hash 61a066d575c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

retro 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 9d 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/retro.md · 342 lines

How it starts

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

/retro — Engineering Retrospective

Comprehensive engineering retrospective with ProductionOS-specific metrics. Analyzes commit history, work patterns, code quality, self-eval scores, and agent dispatch patterns.

Step 0: Preamble

Run templates/PREAMBLE.md.

Step 1: Parse Arguments

Parse $ARGUMENTS to determine time window:

  • /retro--since="7 days ago" (default)
  • /retro 24h--since="24 hours ago"
  • /retro 14d--since="14 days ago"
  • /retro 30d--since="30 days ago"
  • /retro compare → compare current 7d vs prior 7d
  • /retro compare 14d → compare current 14d vs prior 14d

If argument doesn't match: show usage and stop.

Detect default branch:

git remote show origin 2>/dev/null | grep "HEAD branch" | sed 's/.*: //' || echo "main"

Detect current user:

git config user.name

Step 2: Gather Raw Data

Run ALL of these git commands in parallel (they are independent):

# 1. All commits with stats
git log --since="<window>" --format="%H|%aN|%ae|%ai|%s" --shortstat

# 2. Per-commit numstat for test vs prod LOC breakdown
git log --since="<window>" --format="COMMIT:%H|%aN" --numstat

# 3. Timestamps for session detection (Pacific time)
TZ=America/Los_Angeles git log --since="<window>" --format="%at|%aN|%ai|%s" | sort -n

# 4. File hotspots
git log --since="<window>" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn

# 5. PR numbers from commit messages
git log --since="<window>" --format="%s" | grep -oE '#[0-9]+' | sed 's/^#//' | sort -n | uniq | sed 's/^/#/'

# 6. Author commit counts
git shortlog --since="<window>" -sn --no-merges

# 7. Test file count
find . -name '*.test.*' -o -name '*.spec.*' -o -name '*_test.*' -o -name '*_spec.*' 2>/dev/null | grep -v node_modules | wc -l

# 8. Test files changed in window
git log --since="<window>" --format="" --name-only | grep -E '\.(test|spec)\.' | sort -u | wc -l

# 9. TODOS.md backlog (if available)
cat TODOS.md 2>/dev/null | head -50 || true

Read the full file on GitHub · 342 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. 9d ago First seen · 342 lines · 30 tokens per session scan A 61a066d575c1

Subscribe to this mod's changes

retro is a command published in the GitHub repository ShaheerKhawaja/ProductionOS (8 stars, last pushed 4mo ago), licensed MIT. It adds 30 tokens to every session and 3,144 once invoked, about $0.0002 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.