Skip to main content

Discover, analyze, and optimize your prompts from AI coding sessions

Project description

re:prompt

Prompt Intelligence for AI power users -- understand, optimize, and manage your AI conversations.

PyPI version Python 3.10+ License: MIT Tests Coverage


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: 74/100
  Structure: 18/25 | Context: 22/25 | Position: 15/20 | Repetition: 9/15 | Clarity: 10/15
  Tip: Add the error message for +15% accuracy

$ 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 "请帮我看一下这个代码,就是那个 login 的那个文件,好像有点问题"
  Before: 31 tokens  After: 15 tokens (52% saved)
  "看一下 login 文件的问题"

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 (50%+ 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:

  1. Install the extension from Chrome Web Store
  2. Connect to the CLI: reprompt install-extension
  3. Verify: reprompt extension-status

Captured prompts sync locally via Native Messaging -- nothing leaves your machine.

Privacy

  • All analysis runs locally. No prompts leave your machine.
  • reprompt privacy shows 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.

Privacy policy

Links

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reprompt_cli-1.6.0.tar.gz (773.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reprompt_cli-1.6.0-py3-none-any.whl (251.5 kB view details)

Uploaded Python 3

File details

Details for the file reprompt_cli-1.6.0.tar.gz.

File metadata

  • Download URL: reprompt_cli-1.6.0.tar.gz
  • Upload date:
  • Size: 773.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reprompt_cli-1.6.0.tar.gz
Algorithm Hash digest
SHA256 121fcb9c1915d7950e5d7c41591e2533c329a673c4b76dc16001d49e494cb33e
MD5 36047567022f30017bf79dfe99ad6b48
BLAKE2b-256 22e2c5a87d53c87c9b05fefa5f15a8d0dd6e7d2e3e40c821e70fa5f1d0a9202b

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprompt_cli-1.6.0.tar.gz:

Publisher: publish.yml on reprompt-dev/reprompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reprompt_cli-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: reprompt_cli-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 251.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reprompt_cli-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af3622b1072defd1112beba65baff003b698546dc852d49c298a7ec18deba052
MD5 1f22b7a0acdb43bae6dd473b6e66940c
BLAKE2b-256 d7d7c60d651aa711719e403dc1828102b84bf35acf0a7ba78e5cbfedcf648a53

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprompt_cli-1.6.0-py3-none-any.whl:

Publisher: publish.yml on reprompt-dev/reprompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page