reprompt
Prompt analytics MCP server: score prompts, search history, detect leaked credentials, and scan AI coding sessions.
re:prompt
Analyze what you type into AI tools -- prompt scoring, agent error loops, leaked credential detection, conversation distillation.

See it in action
$ pip install reprompt-cli
$ reprompt
╭─ Prompt Dashboard ─────────────────────────────────────────╮
│ Prompts: 1,063 (295 unique) Sessions: 890 │
│ Avg Score: 68/100 Top: debug (31%), impl (24%)│
│ Sources: claude-code, cursor, chatgpt │
╰────────────────────────────────────────────────────────────╯
$ reprompt score "Fix the auth bug in src/login.ts where JWT expires"
Score: 40/100 (Fair)
Structure: 0/25 | Context: 8/25 | Position: 20/20 | Repetition: 0/15 | Clarity: 12/15
Tip: Include the error message -- debug prompts with errors are 3.7x more effective
$ reprompt distill --last 3 --summary
Session: feature-dev (42 turns, 18 important)
Key moments: initial spec → auth module → test failures → JWT fix → passing
Context: "Building auth system with JWT refresh tokens for Express API"
$ reprompt compress "I was wondering if you could please help me refactor this code. Basically what I need is to split this function into smaller helpers and add error handling."
Before: 28 tokens → After: 14 tokens (50% saved)
"Help me refactor this code. Split this function into smaller helpers and add error handling."
What it does
Analyze
| Command | Description |
|---|---|
reprompt | Instant dashboard -- prompts, sessions, avg score, top categories |
reprompt scan | Auto-discover prompts from 9 AI tools |
reprompt score "prompt" | Research-backed 0-100 scoring with 30+ features |
reprompt compare "a" "b" | Side-by-side prompt analysis (or --best-worst for auto-selection) |
reprompt insights | Personal patterns vs research-optimal benchmarks |
reprompt style | Prompting fingerprint with --trends for evolution tracking |
reprompt agent | Agent workflow analysis -- error loops, tool patterns, session efficiency |
Optimize
| Command | Description |
|---|---|
reprompt compress "prompt" | 4-layer prompt compression (40-60% token savings typical) |
reprompt distill | Extract important turns from conversations with 6-signal scoring |
reprompt distill --export | Recover context when a session runs out -- paste into new session |
reprompt lint | Prompt quality linter with GitHub Action support |
Manage
| Command | Description |
|---|---|
reprompt privacy | See what data you sent where -- file paths, errors, PII exposure |
reprompt privacy --deep | Scan for sensitive content: API keys, tokens, passwords, PII |
reprompt report | Full analytics: hot phrases, clusters, patterns (--html for dashboard) |
reprompt digest | Weekly summary comparing current vs previous period |
reprompt wrapped | Prompt DNA report -- persona, scores, shareable card |
reprompt template save|list|use | Save and reuse your best prompts |
Prompt Science
Scoring is calibrated against 4 research papers covering 30+ features across 5 dimensions:
| Dimension | What it measures | Paper |
|---|---|---|
| Structure | Markdown, code blocks, explicit constraints | Prompt Report 2406.06608 |
| Context | File paths, error messages, technical specificity | Google 2512.14982 |
| Position | Instruction placement relative to context | Stanford 2307.03172 |
| Repetition | Redundancy that degrades model attention | Google 2512.14982 |
| Clarity | Readability, sentence length, ambiguity | SPELL (EMNLP 2023) |
All analysis runs locally in <1ms per prompt. No LLM calls, no network requests.
Conversation Distillation
reprompt distill scores every turn in a conversation using 6 signals:
- Position -- first/last turns carry framing and conclusions
- Length -- substantial turns contain more information
- Tool trigger -- turns that cause tool calls are action-driving
- Error recovery -- turns that follow errors show problem-solving
- Semantic shift -- topic changes mark conversation boundaries
- Uniqueness -- novel phrasing vs repetitive follow-ups
Session type (debugging, feature-dev, exploration, refactoring) is auto-detected and signal weights adapt accordingly.
Supported AI tools
| Tool | Format | Auto-discovered by scan |
|---|---|---|
| Claude Code | JSONL | Yes |
| Codex CLI | JSONL | Yes |
| Cursor | .vscdb | Yes |
| Aider | Markdown | Yes |
| Gemini CLI | JSON | Yes |
| Cline (VS Code) | JSON | Yes |
| OpenClaw / OpenCode | JSON | Yes |
| ChatGPT | JSON | Via reprompt import |
| Claude.ai | JSON/ZIP | Via reprompt import |
Installation
pip install reprompt-cli # core (all features, zero config)
pip install reprompt-cli[chinese] # + Chinese prompt analysis (jieba)
pip install reprompt-cli[mcp] # + MCP server for Claude Code / Continue.dev / Zed
Quick start
reprompt scan # discover prompts from installed AI tools
reprompt # see your dashboard
reprompt score "your prompt here" # score any prompt instantly
reprompt distill --last 1 # distill your most recent conversation
Auto-scan after every session
reprompt install-hook # adds post-session hook to Claude Code
Browser extension
Capture prompts from ChatGPT, Claude.ai, and Gemini directly in your browser:
- Install the extension from Chrome Web Store
- Connect to the CLI:
reprompt install-extension - Verify:
reprompt extension-status
Captured prompts sync locally via Native Messaging -- nothing leaves your machine.
CI integration
GitHub Action
# .github/workflows/prompt-lint.yml
- uses: reprompt-dev/reprompt@main
with:
score-threshold: 50 # fail if avg prompt score < 50
strict: true # fail on warnings too
pre-commit
# .pre-commit-config.yaml
repos:
- repo: https://github.com/reprompt-dev/reprompt
rev: v1.6.1
hooks:
- id: reprompt-lint
Direct CLI
reprompt lint --score-threshold 50 # exit 1 if avg score < 50
reprompt lint --strict # exit 1 on warnings
reprompt lint --json # machine-readable output
Privacy
- All analysis runs locally. No prompts leave your machine.
reprompt privacyshows exactly what you've sent to which AI tool.- Optional telemetry sends only anonymous 26-dimension feature vectors -- never prompt text.
- Open source: audit exactly what's collected.
Links
- Website: getreprompt.dev
- Chrome Extension: Chrome Web Store
- PyPI: reprompt-cli
- Changelog: CHANGELOG.md
- Privacy: getreprompt.dev/privacy
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT
相关服务器
Scout Monitoring MCP
赞助Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
赞助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Enhanced QR Code MCP Server
Generates QR codes with metadata, batch processing, and file management tools.
MCP Bench Router
Claude Code sucks at design. Let it delegate it's tasks to better models. Claude will use the MCP to get leaderboard of best design models and query specific code changes using OpenRouter.
FileScopeMCP
Analyzes your codebase identifying important files based on dependency relationships. Generates diagrams and importance scores per file, helping AI assistants understand the codebase. Automatically parses popular programming languages, Python, Lua, C, C++, Rust, Zig.
Zaim API
A server template for interacting with APIs that require an API key, using the Zaim API as an example.
Authless Remote MCP Server
A template for deploying a remote, auth-less MCP server on Cloudflare Workers.
Greb-MCP
Semantic code search for AI agents without indexing your codebase or storing any data. Fast and accurate.
Remote MCP Server (Authless)
A remote MCP server deployable on Cloudflare Workers that operates without authentication.
Superpower MCP
Allows MCP execution of superpowers
Sentry
Retrieve and analyze issues, error reports, and debugging information from Sentry.io.
Hashnet MCP (Hashgraph Online Registry Broker)
MCP server for agent discovery, registration, and chat via the Hashgraph Online Registry Broker.