analyze

analyze is a command for Claude Code from JuanMarchetto/agent-skills. It costs 24 tokens per session (735 once invoked), scanned A, original, MIT.

A command that examines the latest build, test, or migration run and produces a structured post-run analysis.

In plain words
What is it for?
It is for investigating recent runs, summarizing errors, and checking trends against run history.
Why use it?
It helps explain failures, compare results with earlier runs, and record useful measurements and generated files.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the post-run-analysis plugin — 1 skill, 3 commands shipped together

Good fit It is for investigating recent runs, summarizing errors, and checking trends against run history.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/juanmarchetto/agent-skills/analyze
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/JuanMarchetto/agent-skills

Made for: Claude Code.

Or install post-run-analysis, the plugin that ships this one along with the rest of its 1 skill, 3 commands.

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 analyze

README.md
[![agentmods](https://agentmods.dev/badge/commands/juanmarchetto/agent-skills/analyze.svg)](https://agentmods.dev/commands/juanmarchetto/agent-skills/analyze)
Your own site
<a href="https://agentmods.dev/commands/juanmarchetto/agent-skills/analyze"><img src="https://agentmods.dev/badge/commands/juanmarchetto/agent-skills/analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 735 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.00024 $0.00735
Opus 5 $0.00012 $0.00367
Sonnet 5 $0.00005 $0.00147
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

analyze 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 4d 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.

skills/post-run-analysis/commands/analyze.md · 81 lines

How it starts

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

/analyze -- Force Post-Run Analysis

You are the Post-Run Analysis skill's analysis engine. The user has triggered /analyze to force a full post-mortem on the most recent run.

Instructions

  1. Find the most recent run output. Search for:

    • The last background task completion in this conversation
    • Recent log files: run*-output.log, *.log in project root
    • Artifact directories: .artifacts/, build/, output/, dist/, target/
    • Test runner output from the last test command
    • Build output from the last build command
    • Any stdout/stderr from a recently completed long-running process
  2. If no run output is found, tell the user: "No recent run output found. Run a build, test, or migration first, or point me to a log file."

  3. Execute the full 5-phase protocol:

    Phase 1: Gather Data

    • Extract duration, success/failure counts, error categories, resource usage, quality metrics
    • Identify all artifacts produced

    Phase 2: Compare With History

    • Load run history from MEMORY.md or .claude/run-history.md
    • Build the comparison table for this target
    • Flag trends and anomalies
    • If no history exists, note this is the baseline run

    Phase 3: Error Pattern Analysis

    • Group errors by type/code
    • Check which errors are recurring vs new
    • For recurring errors: check if fixes exist and whether they regressed

    Phase 4: Actionable Recommendations

    • Classify each finding: FIXED / FIXABLE / NEEDS_INVESTIGATION / ACCEPTED
    • For FIXABLE: specify file, change, and expected impact

    Phase 4.5: Secret Sanitization

    • Scan ALL output for API keys, tokens, passwords, connection strings, absolute paths, emails, IPs
    • Redact before persisting anything

    Phase 5: Update Memory

    • Append to run history table
    • Persist only FIXABLE and NEEDS_INVESTIGATION findings
    • Update warm-start artifacts if this run is the new best
  4. Present the analysis using the standard output format:

Read the full file on GitHub · 81 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. 4d ago First seen · 81 lines · 24 tokens per session scan A b02a1f97d6f3

Subscribe to this mod's changes

analyze is a command published in the GitHub repository JuanMarchetto/agent-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 735 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-03.