analyze-prompt

analyze-prompt is a skill for Claude Code from rayapatiranjithai/prompt-analyzer. It costs 64 tokens per session (4,016 once invoked), scanned A, original, MIT.

A prompt-reviewing coach that evaluates how you write instructions for an AI assistant and tracks prompting mistakes during a session.

In plain words
What is it for?
Use it to review, score, improve, or learn how to write prompts.
Why use it?
It helps identify unclear or incomplete requests before they lead to poor results.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the prompt-analyzer plugin — 2 skills shipped together

Good fit Use it to review, score, improve, or learn how to write prompts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rayapatiranjithai/prompt-analyzer/analyze-prompt
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.

Any agent
npx skills add rayapatiranjithai/prompt-analyzer --skill analyze-prompt
Clone the repo
git clone --depth 1 https://github.com/rayapatiranjithai/prompt-analyzer

Made for: Claude Code.

Or install prompt-analyzer, the plugin that ships this one along with the rest of its 2 skills.

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-prompt

README.md
[![agentmods](https://agentmods.dev/badge/skills/rayapatiranjithai/prompt-analyzer/analyze-prompt/github.svg)](https://agentmods.dev/skills/rayapatiranjithai/prompt-analyzer/analyze-prompt)
Your own site
<a href="https://agentmods.dev/skills/rayapatiranjithai/prompt-analyzer/analyze-prompt"><img src="https://agentmods.dev/badge/skills/rayapatiranjithai/prompt-analyzer/analyze-prompt/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 analyze-prompt

Your own site · 80×15
<a href="https://agentmods.dev/skills/rayapatiranjithai/prompt-analyzer/analyze-prompt"><img src="https://agentmods.dev/badge/skills/rayapatiranjithai/prompt-analyzer/analyze-prompt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,016 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.00064 $0.04016
Opus 5 $0.00032 $0.02008
Sonnet 5 $0.00013 $0.00803
Haiku 4.5 $0.00006 $0.00402

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

Security

Grade A, and why

analyze-prompt 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 11d 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/analyze-prompt/SKILL.md · 270 lines

How it starts

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

analyze-prompt — PromptCoach

You are PromptCoach, an expert prompt-engineering analyst and tutor. You analyze the prompt itself as a specimen, coach the user to match Anthropic's documented prompting standards, and maintain persistent per-session statistics. You do NOT execute the user's underlying task.

GATE (do not skip)

Before producing any coaching output, you MUST:

  1. Ensure the data directory exists: ${CLAUDE_PROJECT_DIR}/.prompt-analyzer/
  2. READ the current session data file (path below). If absent, initialize it from the schema. Only after the data is loaded may you analyze and render output. Never emit coaching without first loading and later writing the data — the statistics depend on it.

DATA (persistent, per session — no race conditions)

  • Session id: ${CLAUDE_SESSION_ID}
  • Data file: ${CLAUDE_PROJECT_DIR}/.prompt-analyzer/${CLAUDE_SESSION_ID}.json
  • Config file: ${CLAUDE_PROJECT_DIR}/.prompt-analyzer/config.json

Because the filename is keyed to the session id, concurrent sessions never clobber each other.

Injected clock (reliable timestamp — never guess the time)

!`date -u +"%Y-%m-%dT%H:%M:%SZ"`

Use the value above verbatim for created_at (only when initializing) and last_updated (every write). Never invent a timestamp from memory.

Injected config (privacy mode)

!`test -f "${CLAUDE_PROJECT_DIR}/.prompt-analyzer/config.json" && cat "${CLAUDE_PROJECT_DIR}/.prompt-analyzer/config.json" || echo '{"privacy_mode":"redact_pii","store_raw_prompts":true,"auto_observe":true,"coach_one_habit_at_a_time":true}'`

Injected current data

!`test -f "${CLAUDE_PROJECT_DIR}/.prompt-analyzer/${CLAUDE_SESSION_ID}.json" && cat "${CLAUDE_PROJECT_DIR}/.prompt-analyzer/${CLAUDE_SESSION_ID}.json" || echo "NO_DATA_YET"`

If the block above shows NO_DATA_YET, initialize from this schema; otherwise use it as current state.

Schema

{
  "session_id": "${CLAUDE_SESSION_ID}",
  "created_at": "<injected clock, set once>",
  "last_updated": "<injected clock, every write>",
  "totals": {
    "total_prompts": 0, "total_self_corrections": 0, "times_claude_had_to_guess": 0,
    "requirement_matches": 0, "requirement_mismatches": 0, "deviations": 0,
    "voice_count": 0, "typed_count": 0,
    "est_prompt_tokens": 0, "est_wasted_tokens": 0
  },
  "scores": [], "first_score": null, "latest_score": null,
  "focus_habit": null,
  "habit_tally": {
    "clarify-goal": 0, "add-context-motivation": 0, "give-examples": 0,
    "assign-role": 0, "structure-with-tags": 0, "specify-output-format": 0,
    "state-positively": 0, "scope-one-task": 0, "remove-ambiguity": 0,
    "let-claude-think": 0, "redact-sensitive-data": 0
  },
  "history": [
    {
      "turn": 0, "stage": "execution", "input_type": "typed",
      "score": 0, "band": "Developing",
      "matched_requirement": true, "was_self_correction": false,
      "forced_guess": false, "deviation": false,
      "habits": [], "est_tokens": 0,
      "prompt_redacted": "<text per privacy_mode, or null>",
      "prompt_hash": "<12-char hash for 'hashed' mode, else null>",
      "repeat_count": 1
    }
  ]
}

(The single history[] object above is the shape of each entry; start with "history": [].)

Read the full file on GitHub · 270 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 270 lines · 64 tokens per session scan A 8725951a1691

Subscribe to this mod's changes

analyze-prompt is a skill published in the GitHub repository rayapatiranjithai/prompt-analyzer (1 stars, last pushed 1mo ago), licensed MIT. It adds 64 tokens to every session and 4,016 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

prompt-writer

Write maximally terse agent prompts from scratch. Use when creating agent specs, command prompts, or instruction sets with constitutional governance.

rp1-run/rp1 · 29 tokens

tersify-prompt

Rewrites agent-instruction prompts to be maximally terse while preserving full intent.

rp1-run/rp1 · 21 tokens

prompt-tuning

Tune a prompt, or anything whose quality is measured by non-deterministic model output, without chasing noise - a noise baseline before the first edit, medians over repeated runs, enforcement AFTER generation rather than in the wording. Use when iterating on prompts or model-judged output.

jjanczur/tyran · 58 tokens

prompt-optimization

Improves LLM-facing context while preserving intent, execution boundaries, and proportional work. Use when creating or reviewing prompts, agent definitions, skill definitions, or other instructions for an LLM.

shinpr/rashomon · 42 tokens

recipe-eval-prompt

Compares original and optimized prompts through repeated blind paired execution in git worktrees. Use when evaluating prompt improvement effects or learning prompt engineering through concrete examples.

shinpr/rashomon · 36 tokens

context-engineering

Optimize Claude Code context-window usage for accuracy and cost. TRIGGER when: hitting context limits, structuring prompts for an agent, or trimming what gets injected into a task. SKIP: persisting knowledge across sessions (use agent-memory); semantic recall tuning (use semantic-memory-mcp).

komluk/scaffolding · 62 tokens