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

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

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.5.0.tar.gz (746.8 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.5.0-py3-none-any.whl (240.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reprompt_cli-1.5.0.tar.gz
  • Upload date:
  • Size: 746.8 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.5.0.tar.gz
Algorithm Hash digest
SHA256 c1e035f5295b77905bb775f73ed1dde979e12aa72bae427344f83c37f9454ade
MD5 9a9144f58219c94d3a558efed32f2668
BLAKE2b-256 5ac04de6e63bcf85e50fa13e97e1a86f7b2b3072e9f808995495b37a91c3af76

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprompt_cli-1.5.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.5.0-py3-none-any.whl.

File metadata

  • Download URL: reprompt_cli-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 240.0 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f43ba2844c29792ca1f4b8f27612007c88efaf9d7af09eb2da7e6dd60da7bd6
MD5 2012a2fbc636f60987b66a224be9b6ee
BLAKE2b-256 f2d2a6d847167d73efd141881467c18159a34019b04d7f9d0f30a13ef3b78af4

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprompt_cli-1.5.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