Logo van reprompt

reprompt

Organisatie
ctxray

See how you really use AI — X-ray your AI coding sessions locally

Uitgeverctxray
Repositoryctxray
TaalPython
Forks
6
Sterren
47
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    reprompt biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    47 sterren en 6 forks in de gekoppelde repository.

ctxray

See how you really use AI.

X-ray your AI coding sessions across Claude Code, Cursor, ChatGPT, and 6 more tools. Discover your patterns, find wasted tokens, catch leaked secrets — all locally, nothing leaves your machine.

PyPI version Python 3.10+ License: MIT Tests Coverage

Quick start

bash
pip install ctxray

ctxray scan                    # discover prompts from your AI tools
ctxray wrapped                 # your AI coding persona + shareable card
ctxray insights                # your patterns vs research-optimal
ctxray privacy                 # what sensitive data you've exposed

ctxray demo

Works in your pipeline

Drop ctxray into your CI as a prompt quality gate. No LLM, no API key, no network — <50ms per prompt.

yaml
# .github/workflows/prompt-quality.yml
- uses: ctxray/ctxray@main
  with:
    score-threshold: 43    # experimentally validated quality threshold
    model: claude          # model-specific rules (claude/gpt/gemini)
    comment-on-pr: true
yaml
# .pre-commit-config.yaml
repos:
  - repo: https://github.com/ctxray/ctxray
    rev: v3.0.0
    hooks:
      - id: ctxray-lint-score   # fail below quality threshold
      # or: id: ctxray-lint-claude  # Claude-specific rules + threshold
  • Deterministic — same prompt, same score, every run. No flaky LLM-based checks.
  • Air-gapped — runs in offline and private networks. All analysis stays on your infrastructure.
  • Configurable — .ctxray.toml or [tool.ctxray.lint] in pyproject.toml. Per-project rules.

Full setup: GitHub Action · pre-commit · .ctxray.toml

What you'll discover

Your AI coding persona

ctxray wrapped generates a Spotify Wrapped-style report of your AI interactions — your persona (Debugger? Architect? Explorer?), top patterns, and a shareable card.

Your prompt patterns

ctxray insights compares your actual prompting habits against research-backed benchmarks. Are your prompts specific enough? Do you front-load instructions? How much context do you provide?

Your privacy exposure

ctxray privacy --deep scans every prompt you've sent for API keys, tokens, passwords, and PII. See exactly what you've shared with which AI tool.

Full prompt diagnostic

ctxray check "your prompt" scores, lints, and rewrites in one command — no LLM, <50ms.

Experimentally validated on 3000+ LLM calls across 8 models (1.5B → 27B): prompts at or above score 43 hit ~93% pass rate on executable code tests. Below 43 they average 72% or lower. ctxray tells you which side you're on and what to fix — see experiments/RESULTS.md for the full cross-model data.

bash
ctxray check "fix the auth bug in login.ts"        # threshold pass/fail + diagnostics
ctxray check "fix bug" --model claude               # model-specific scoring for Claude
ctxray check "refactor middleware" --threshold 50    # custom threshold for stricter teams

ctxray rewrite — rule-based prompt improvement

ctxray build — assemble prompts from components

What a bad prompt looks like

All commands

Discover your patterns

CommandDescription
ctxray wrappedAI coding persona + shareable card
ctxray insightsPersonal patterns vs research-optimal benchmarks
ctxray toolsCross-tool comparison — how your Claude Code / Cursor / ChatGPT habits differ
ctxray sessionsSession quality scores with frustration signal detection
ctxray agentAgent workflow analysis — error loops, tool patterns, efficiency
ctxray repetitionCross-session repetition detection — spot recurring prompts
ctxray patternsPersonal prompt weaknesses — recurring gaps by task type
ctxray distillExtract important turns from conversations with 6-signal scoring
ctxray projectsPer-project quality breakdown
ctxray stylePrompting fingerprint with --trends for evolution tracking
ctxray privacySee what data you sent where — file paths, errors, PII exposure

Optimize your prompts

CommandDescription
ctxray check "prompt"Full diagnostic — score + lint + rewrite + threshold pass/fail
ctxray score "prompt"Research-backed 0-100 scoring with 30+ features
ctxray score "prompt" --model claudeModel-specific scoring — Claude, GPT, or Gemini adjustments
ctxray rewrite "prompt"Rule-based improvement — filler removal, restructuring, hedging cleanup
ctxray build "task"Build prompts from components — task, context, files, errors, constraints
ctxray compress "prompt"4-layer prompt compression (40-60% token savings typical)
ctxray compare "a" "b"Side-by-side prompt analysis (or --best-worst for auto-selection)
ctxray lintConfigurable linter with CI/GitHub Action support

Manage

CommandDescription
ctxrayInstant dashboard — prompts, sessions, avg score, top categories
ctxray scanAuto-discover prompts from 9 AI tools
ctxray reportFull analytics: hot phrases, clusters, patterns (--html for dashboard)
ctxray digestWeekly summary comparing current vs previous period
ctxray template save|list|useSave and reuse your best prompts
ctxray distill --exportRecover context when a session runs out — paste into new session
ctxray initGenerate .ctxray.toml config for your project

Supported AI tools

ToolFormatAuto-discovered by scan
Claude CodeJSONLYes
Codex CLIJSONLYes
Cursor.vscdbYes
AiderMarkdownYes
Gemini CLIJSONYes
Cline (VS Code)JSONYes
OpenClaw / OpenCodeJSONYes
ChatGPTJSONVia ctxray import
Claude.aiJSON/ZIPVia ctxray import

Installation

bash
pip install ctxray              # core (all features, zero config)
pip install ctxray[chinese]     # + Chinese prompt analysis (jieba)
pip install ctxray[mcp]         # + MCP server for Claude Code / Continue.dev / Zed

Auto-scan after every session

bash
ctxray install-hook             # adds post-session hook to Claude Code

Browser extension

Capture prompts from ChatGPT, Claude.ai, and Gemini directly in your browser. Live quality badge shows prompt tier as you type — click "Rewrite & Apply" to improve and replace the text directly in the input box.

  1. Install the extension from Chrome Web Store or Firefox Add-ons
  2. Connect to the CLI: ctxray install-extension
  3. Verify: ctxray extension-status

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

CI integration

GitHub Action

yaml
# .github/workflows/prompt-lint.yml
name: Prompt Quality
on: pull_request

jobs:
  lint:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: ctxray/ctxray@main
        with:
          score-threshold: 43     # experimentally validated (below = 83% failure rate)
          model: claude           # optional: model-specific rules
          strict: true
          comment-on-pr: true

pre-commit

yaml
# .pre-commit-config.yaml
repos:
  - repo: https://github.com/ctxray/ctxray
    rev: v3.0.0
    hooks:
      - id: ctxray-lint-score     # quality threshold gate (score >= 43)
      # - id: ctxray-lint-claude  # Claude-specific rules + threshold
      # - id: ctxray-lint-gpt    # GPT-specific rules + threshold

Direct CLI

bash
ctxray lint --score-threshold 43  # exit 1 below experimentally validated threshold
ctxray lint --score-threshold 50  # or set your own bar
ctxray lint --model claude        # model-specific lint rules
ctxray lint --strict              # exit 1 on warnings
ctxray lint --json                # machine-readable output

Project configuration

bash
ctxray init   # generates .ctxray.toml with all rules documented
toml
# .ctxray.toml (or [tool.ctxray.lint] in pyproject.toml)
[lint]
score-threshold = 43   # experimentally validated quality threshold
model = "claude"       # model-specific rules (claude/gpt/gemini)

[lint.rules]
min-length = 20
short-prompt = 40
vague-prompt = true
debug-needs-reference = true

Prompt Science

Scoring is calibrated against 10 peer-reviewed papers covering 30+ features across 5 dimensions:

DimensionWhat it measuresKey papers
StructureMarkdown, code blocks, explicit constraintsPrompt Report (2406.06608)
ContextFile paths, error messages, I/O specs, edge casesZi+ (2508.03678), Google (2512.14982)
PositionInstruction placement relative to contextStanford (2307.03172), Veseli+ (2508.07479), Chowdhury (2603.10123)
RepetitionRedundancy that degrades model attentionGoogle (2512.14982)
ClarityReadability, sentence length, ambiguitySPELL (EMNLP 2023), PEEM (2603.10477)

Cross-validated findings that inform our engine:

  • Position bias is architectural — present at initialization, not learned. Front-loading instructions is effective for prompts under 50% of context window (3 papers agree)
  • Moderate compression improves output — rule-based filler removal doesn't just save tokens, it enhances LLM performance (2505.00019)
  • Prompt quality is independently measurable — prompt-only scoring predicts output quality without seeing the response (ACL 2025, 2503.10084)
  • Quality threshold at score ~43 — our own experiment (30 prompts, 5 tiers, 2 models) found a step function: below 43, 83% failure rate; above 43, 94% success (Pearson r=0.56, Spearman ρ=0.64)
  • Format preferences are model-dependent — XML benefits Claude, Markdown benefits GPT, but having any structure matters more than the specific format (PromptBridge 2512.01420)

Model-specific scoring (--model claude/gpt/gemini) applies research-backed adjustments for each model's known preferences and sensitivities.

All analysis runs locally in <1ms per prompt. No LLM calls, no network requests.

How it works

 Data sources:
 ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
 │Claude Code│ │  Cursor  │ │  Aider   │ │ ChatGPT  │ │ 5 more.. │
 └─────┬────┘ └─────┬────┘ └─────┬────┘ └─────┬────┘ └─────┬────┘
       └─────────────┴───────────┴─────────────┴─────────────┘
                                 │
                    scan -> dedup -> store -> analyze
                                 │
              ┌──────────────────┼──────────────────┐
              v                  v                  v
        ┌──────────┐     ┌──────────────┐    ┌──────────┐
        │ insights │     │  patterns    │    │ sessions │
        │ wrapped  │     │  repetition  │    │ projects │
        │ style    │     │  privacy     │    │ agent    │
        └──────────┘     └──────────────┘    └──────────┘

Key design decisions:

  • Pure rules, no LLM — scoring and rewriting use regex + TF-IDF + research heuristics. Deterministic, private, <1ms per prompt.
  • Adapter pattern — each AI tool gets a parser that normalizes to a common Prompt model. Adding a new tool = one file.
  • Two-layer dedup — SHA-256 for exact matches, TF-IDF cosine similarity for near-dupes.
  • Research-calibrated — 10 peer-reviewed papers inform the scoring weights.

Conversation Distillation

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

Why ctxray?

After Promptfoo joined OpenAI and Humanloop joined Anthropic, ctxray is the independent, open-source alternative for understanding your AI interactions.

  • 100% local — your prompts never leave your machine
  • No LLM required — pure rule-based analysis, <50ms per prompt
  • 9 AI tools — the only tool that works across Claude Code, Cursor, ChatGPT, and more
  • Research-backed — calibrated against 10 peer-reviewed papers, not vibes

Previously published as reprompt-cli. Same tool, new name, clean namespace.

Privacy

  • All analysis runs locally. No prompts leave your machine.
  • ctxray privacy shows exactly what you've sent to which AI tool.
  • Optional telemetry sends only anonymous feature vectors — never prompt text.
  • Open source: audit exactly what's collected.

Links

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

Gebruik reprompt MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra reprompt is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg reprompt toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van reprompt.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "ctxray": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van reprompt in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van reprompt in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je reprompt gebruiken om me hiermee te helpen?
reprompt
Zeker. Ik heb het gelezen.
Dit vond ik met reprompt.

Veelgestelde vragen

Waarvoor wordt de MCP-server reprompt gebruikt?

reprompt is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik reprompt MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je reprompt gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom reprompt MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als reprompt verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik reprompt MCP met TypingMind?

reprompt werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt reprompt MCP in TypingMind?

reprompt biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om reprompt MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als reprompt authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇