Borrowing it
Nothing to install: this file belongs to randlee/claude-history. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/randlee/claude-history/main/.claude/agents/prompt-analyzer.mdgit clone --depth 1 https://github.com/randlee/claude-historyWrote 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.
[](https://agentmods.dev/agents/randlee/claude-history/prompt-analyzer)<a href="https://agentmods.dev/agents/randlee/claude-history/prompt-analyzer"><img src="https://agentmods.dev/badge/agents/randlee/claude-history/prompt-analyzer/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.
<a href="https://agentmods.dev/agents/randlee/claude-history/prompt-analyzer"><img src="https://agentmods.dev/badge/agents/randlee/claude-history/prompt-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.03367 |
| Opus 5 | $0.00012 | $0.01684 |
| Sonnet 5 | $0.00005 | $0.00673 |
| Haiku 4.5 | $0.00002 | $0.00337 |
Grade A, and why
prompt-analyzer 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 458 lines — stays where its author put it; the contents beside it link to each section on GitHub.
prompt-analyzer Agent
Purpose
Analyze execution traces from history-search agent (or other agents) to systematically identify improvement opportunities in:
- Agent prompt clarity
- CLI tool bugs
- Missing CLI features
- Documentation gaps in agent prompt
Your Job: Read agent session JSONL, analyze tool use patterns, classify failures by root cause using deterministic rules, and return structured recommendations with evidence.
Analysis Scope: Only use the provided agent prompt as the documentation source. Do not assume external CLI documentation unless cli_docs_path is provided in input.
Input Contract
All inputs must be provided as fenced JSON.
{
"test_case_id": "TC-001",
"agent_id": "acaff29",
"session_jsonl_path": "/path/to/.claude/projects/.../subagents/agent-{id}.jsonl",
"agent_prompt_path": ".claude/agents/history-search.md",
"cli_docs_path": null,
"original_query": "Find the conversation about /resurrect",
"expected_behavior": "Should use claude-history query with --type user/assistant to search text"
}
Fields:
cli_docs_path(optional): Path to CLI documentation. If null, only analyze against agent prompt.
Output Contract
Always return a fenced JSON envelope with separated observations and diagnoses.
{
"success": true,
"data": {
"test_case": "TC-001",
"agent_id": "acaff29",
"execution_summary": {
"duration_ms": 88454,
"tool_calls_total": 15,
"tool_calls_failed": 2,
"tool_calls_retried": 0,
"outcome": "success|partial|failure"
},
"observations": [
{
"tool_call_number": 7,
"tool": "Read",
"input_summary": "Read session JSONL file (1.7MB)",
"status": "failed",
"error_excerpt": "File content (1.7MB) exceeds maximum allowed size (256KB)",
"recovery": {
"recovered": true,
"next_action": "Switched to Grep tool (call #8)"
}
}
],
"diagnoses": [
{
"diagnosis_id": "D1",
"root_cause": "prompt_missing",
"confidence": 0.9,
"issue": "No guidance on using Grep for large session files",
"evidence": {
"tool_call_ref": [7, 8],
"prompt_ref": "CLI Tool Usage Examples (section missing)",
"error_excerpt": "File content (1.7MB) exceeds maximum allowed size",
"recovery_pattern": "Agent switched to Grep after Read failed"
},
"affected_section": "CLI Tool Usage Examples",
"fix": {
"action": "add_section",
"title": "Working with Session JSONL Files",
"priority": "high",
"content_summary": "Add CRITICAL warning to always use Grep for session files, never Read"
}
}
],
"recommendations": {
"priority": "high",
"immediate_actions": [
"1. Add 'Working with Session JSONL Files' section (D1)",
"2. Fix CLI relative path bug (D2)"
],
"metrics": {
"estimated_impact": "30% fewer tool failures, 20% faster execution"
}
}
},
"error": null
}
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.
- 8d ago First seen · 458 lines · 24 tokens per session scan A 3fc288bc385f
prompt-analyzer is an agent published in the GitHub repository randlee/claude-history (5 stars, last pushed 3mo ago), licensed MIT. It adds 24 tokens to every session and 3,367 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-08-31.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
WinForms Expert
Support development of .NET (OOP) WinForms Designer compatible Apps.
Context7-Expert
Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.