analyze

analyze is a command for Claude Code from alexmond/alexmskills. It costs 19 tokens per session (747 once invoked), scanned B, original, MIT.

A command that reviews one prompt or recent prompts against the complete prompt-coaching rule set.

In plain words
What is it for?
Use it to analyze pasted prompts, review recent prompting history, and receive a short coaching report.
Why use it?
It provides a fuller check than the automatic review, revealing concrete ways to make instructions clearer.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the prompt-coach plugin — 1 skill, 8 commands shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add alexmond/alexmskills
Claude Code
/plugin install prompt-coach

Made for: Claude Code.

Or install prompt-coach, the plugin that ships this one along with the rest of its 1 skill, 8 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/alexmond/alexmskills/analyze.svg)](https://agentmods.dev/commands/alexmond/alexmskills/analyze)
Your own site
<a href="https://agentmods.dev/commands/alexmond/alexmskills/analyze"><img src="https://agentmods.dev/badge/commands/alexmond/alexmskills/analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 747 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00019 $0.00747
Opus 5 $0.00010 $0.00374
Sonnet 5 $0.00004 $0.00149
Haiku 4.5 $0.00002 $0.00075

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

Security

Grade B, and why

analyze scanned grade B with 1 finding 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 5d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

clickable). Keep the voice of the collaborator block: propose, don't preach.
plugins/prompt-coach/commands/analyze.md · 59 lines

How it starts

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

/prompt-coach:analyze

On-demand prompt analysis. Unlike the passive hook — which only checks the handful of active rules and stays quiet — this runs the full 42-rule catalog + positive detectors against either a prompt you name or your recent prompt history, then coaches concrete improvements using the skill's prompting knowledge.

What to do

  1. Locate the config script (same resolution as /prompt-coach:config): ${CLAUDE_PLUGIN_ROOT}/scripts/config.py, else the dev checkout path.

  2. Route on the argument:

    User intent Run
    analyze a prompt they pasted / "analyze this: " --json analyze "<text>"
    "analyze my last N prompts" / "review my last N" / "how have I been prompting" --json analyze --last N (default N=10)
    analyze the prompt before this command (their previous turn) read it from the transcript, pass as analyze "<text>"

    Always pass --json (before the verb) and --cwd <repo> so you get structured data.

  3. Single prompt → the JSON gives fired[] (each with id, tier, name, guidance, url) and positives[]. Produce a short coaching report:

    • If clean: true, say so and name any positive habits detected.
    • Otherwise, for each fired rule give a one-line "why it fired + the fix", then offer a rewritten prompt that resolves the top 2–3 issues. Cite the rule URLs (they're clickable). Keep the voice of the collaborator block: propose, don't preach.
  4. History (--last N) → the JSON gives per-prompt fired[], a rule_frequency map, and rule_detail. Produce a pattern report:

    • Lead with the clean rate (e.g. "6/10 fired no rule").
    • Name the top 2–3 recurring rules and what they mean, with their doc URLs.
    • Give ONE concrete habit to focus on next (the highest-frequency fundamental).
    • Optionally show the single worst prompt with a rewrite as a worked example.
  5. Render the script's own output only if the user asked for raw data; otherwise fold it into your coaching narrative.

Read the full file on GitHub · 59 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. 5d ago First seen · 59 lines · 19 tokens per session scan B 4bc490384ec1

Subscribe to this mod's changes

analyze is a command published in the GitHub repository alexmond/alexmskills (6 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 747 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.