Skip to content
BortechinPublic

About

Open-source prompt analyzer and optimizer for better AI interactions.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Prismpt

Analyze. Refine. Prompt better.

License: MIT TypeScript Next.js Tests

Prismpt is a modern, open-source developer tool that dissects, evaluates, and optimizes artificial intelligence prompts like a prism splitting white light into its core spectrum.

Rather than relying on vague trial-and-error, Prismpt analyzes your prompt across six fundamental dimensions, detects structural deficiencies, extracts key architectural segments (Role, Task, Context, Constraints, Format), and generates structured, production-ready blueprintsβ€”100% client-side with zero telemetry and zero external API dependencies.


Features

  • πŸ”¬ Local Heuristic Engine: Fast, deterministic, and explainable evaluation across 6 dimensions. Zero external AI API required.
  • 🎯 Multi-Dimensional Scoring (0–100): Evaluates Clarity, Context, Specificity, Structure, Constraints, and Intent.
  • πŸ… Tiered Grading (S, A, B, C, D, F): Instant visual grading reflecting structural completeness.
  • πŸ’‘ Actionable Feedback: Concrete Strengths (βœ“) and Improvements (!) with clear explanations.
  • 🏷️ Prompt Structure Highlights: Automatically extracts explicit segments: ROLE, TASK, CONTEXT, CONSTRAINT, and FORMAT.
  • ⚑ Prompt Optimizer: Heuristically transforms unstructured text into an optimal blueprint (Role, Objective, Context, Requirements, Output Format, Constraints).
  • βš–οΈ Before / After Comparison: Side-by-side (desktop) and stacked (mobile) comparison showing prompt improvements and score deltas.
  • πŸ‡ΉπŸ‡· / πŸ‡¬πŸ‡§ Complete Bilingual Localization: Full Turkish and English interface with auto-detection and language-matching analysis.
  • πŸ”’ 100% Privacy-First: Prompts never leave your browser. No remote servers, no analytics, no tracking.
  • πŸ“œ Local History: Stores the last 25 prompt analyses in localStorage with reload, delete, and clear-all capabilities.
  • πŸ“€ Export & Share: Quick-copy formatted text summaries, or export comprehensive reports as Markdown (.md) or clean JSON (.json).
  • 🎨 Developer-First Aesthetic: Inspired by Linear, Vercel, and Raycast with Dark & Light theme support.
  • ⌨️ Productivity Shortcuts: Press Cmd/Ctrl + Enter to analyze instantly.

Screenshots

Dark Mode (Default) Light Mode
Prismpt Dark Mode Prismpt Light Mode

(To add your own screenshots, place them in the public/ directory).


How It Works

Prismpt treats prompt engineering as a disciplined software architecture problem. When you submit a prompt, the engine passes the input through specialized heuristic analyzers:

                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚              Raw Prompt                β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β–Ό                                             β–Ό
     [Language Detector]                           [Highlights Extractor]
     (Turkish / English)                       (Role, Task, Context, Format)
               β”‚                                             β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β–Ό
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚         6-Dimensional Analysis Core         β”‚
               β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
               β”‚ 1. Clarity (18%)     β”‚ 4. Structure (15%)   β”‚
               β”‚ 2. Context (17%)     β”‚ 5. Constraints (16%) β”‚
               β”‚ 3. Specificity (18%) β”‚ 6. Intent (16%)      β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β–Ό
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚    Deterministic Aggregate Score (0-100)    β”‚
               β”‚          Tier Grade (S / A / B / C / D / F) β”‚
               β”‚          Strengths & Improvement Items      β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β–Ό
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚        Prompt Optimizer (Blueprint)         β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Every check is explainable and deterministic: identical prompts always produce identical scores.


Prompt Scoring

Prompts receive an aggregate score from 0 to 100 and a corresponding letter grade:

Grade Score Range Status Description
S 90 – 100 Excellent Flawless prompt with expert role, clear task, explicit constraints, and formatting.
A 80 – 89 Great Highly effective; minor contextual or formatting enhancements possible.
B 70 – 79 Good Clear directive and baseline structure; would benefit from negative constraints or examples.
C 60 – 69 Needs Work Understandable but prone to ambiguous hallucinations; missing guidelines.
D 40 – 59 Poor Weak structure, lacks context, missing output specifications.
F 0 – 39 Inadequate Very brief, ambiguous, or empty input.

The 6 Evaluation Dimensions

  1. Clarity (18%): Readability, imperative directives, absence of rambling filler and ambiguous phrases ("make it cool", "falan filan").
  2. Context (17%): Background domain, tech stack, scenario, and input data presence (code blocks, JSON, tables).
  3. Specificity (18%): Quantitative metrics, numerical bounds, concrete examples (few-shot), and defined target audience.
  4. Structure (15%): Delimiters, markdown headings, bulleted lists, XML tags, and paragraph division.
  5. Constraints (16%): Negative boundaries (what not to do), output format specifications (JSON, Markdown table), and tone/length caps.
  6. Intent (16%): Expert persona/role assignment, explicit goal formulation, and clear definition of success.

Note

Prismpt's local analyzer uses heuristic rules rather than calling an external LLM. Scores should be regarded as an actionable guidance and structural benchmark rather than an absolute measure of prompt quality.


Tech Stack


Getting Started

Prerequisites

  • Node.js 18.x or later
  • npm

Installation

  1. Clone the repository:

    git clone https://github.com/bortechin/prismpt.git
    cd prismpt
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Open http://localhost:3000 in your browser.

Verification Scripts

# Run unit tests
npm run test

# Run linter
npm run lint

# Build for production
npm run build

Project Structure

prismpt/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ globals.css             # Tailwind configuration & CSS variables
β”‚   β”œβ”€β”€ layout.tsx              # Root layout, metadata & providers
β”‚   └── page.tsx                # Main single-page application orchestrator
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ analyzer/
β”‚   β”‚   β”œβ”€β”€ ExamplePrompts.tsx  # Preset categorized examples
β”‚   β”‚   └── PromptEditor.tsx    # Textarea, counters, shortcuts & toolbar
β”‚   β”œβ”€β”€ results/
β”‚   β”‚   β”œβ”€β”€ CategoryBreakdown.tsx # 6 dimension progress cards
β”‚   β”‚   β”œβ”€β”€ ExportShareModal.tsx  # Text, Markdown, and JSON exporter
β”‚   β”‚   β”œβ”€β”€ PromptHighlights.tsx  # Detected architectural tags
β”‚   β”‚   β”œβ”€β”€ ScoreGauge.tsx        # Circular SVG instrument dial
β”‚   β”‚   └── StrengthsIssues.tsx   # Two-column strengths & improvements
β”‚   β”œβ”€β”€ optimizer/
β”‚   β”‚   └── BeforeAfterView.tsx   # Side-by-side comparison & score delta
β”‚   β”œβ”€β”€ history/
β”‚   β”‚   └── HistoryModal.tsx      # Local history browser (max 25)
β”‚   β”œβ”€β”€ about/
β”‚   β”‚   └── AboutModal.tsx        # Methodology & privacy documentation
β”‚   β”œβ”€β”€ layout/
β”‚   β”‚   β”œβ”€β”€ Footer.tsx            # Clean developer footer
β”‚   β”‚   └── Header.tsx            # Responsive navigation & switches
β”‚   └── ui/
β”‚       β”œβ”€β”€ Badge.tsx             # Grade and tag badges
β”‚       β”œβ”€β”€ Button.tsx            # Button variants with loading states
β”‚       β”œβ”€β”€ Modal.tsx             # Accessible dialog container
β”‚       └── Toast.tsx             # Toast notification provider
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ analyzer/
β”‚   β”‚   β”œβ”€β”€ analyzer.ts           # Main scoring orchestrator
β”‚   β”‚   β”œβ”€β”€ clarity.ts            # Clarity heuristic checks
β”‚   β”‚   β”œβ”€β”€ constraints.ts        # Constraints heuristic checks
β”‚   β”‚   β”œβ”€β”€ context.ts            # Context heuristic checks
β”‚   β”‚   β”œβ”€β”€ highlights.ts         # Structural segment extractor
β”‚   β”‚   β”œβ”€β”€ intent.ts             # Intent & role heuristic checks
β”‚   β”‚   β”œβ”€β”€ language.ts           # TR/EN prompt language detector
β”‚   β”‚   β”œβ”€β”€ specificity.ts       # Specificity & metrics checks
β”‚   β”‚   β”œβ”€β”€ structure.ts          # Formatting & list checks
β”‚   β”‚   └── types.ts              # Core TypeScript interfaces
β”‚   β”œβ”€β”€ optimizer/
β”‚   β”‚   └── optimizer.ts          # Structured prompt generator
β”‚   β”œβ”€β”€ storage/
β”‚   β”‚   └── history.ts            # Client-side localStorage manager
β”‚   β”œβ”€β”€ i18n/
β”‚   β”‚   └── context.tsx           # Bilingual translation context
β”‚   └── theme/
β”‚       └── ThemeProvider.tsx     # Dark/Light/System theme engine
β”œβ”€β”€ locales/
β”‚   β”œβ”€β”€ en.ts                     # English translations
β”‚   β”œβ”€β”€ tr.ts                     # Turkish translations
β”‚   └── types.ts                  # Translation schema
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ logo.svg                  # Brand vector logo
β”‚   └── logo-mark.svg             # Favicon & icon mark
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ analyzer.test.ts          # Comprehensive analyzer unit tests
β”‚   └── optimizer.test.ts         # Optimizer unit tests
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/           # Bug report & feature request templates
β”‚   └── PULL_REQUEST_TEMPLATE.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE                       # MIT License
└── package.json

Roadmap

The following enhancements are planned for future releases:

  • Optional AI-Powered Deep Analysis: Opt-in provider (OpenAI, Anthropic, Gemini, Ollama) for semantic verification.
  • Custom Scoring Profiles: Domain-specific heuristics (e.g., Code Generation, System Prompts, Creative Writing).
  • Expanded Language Support: German, Spanish, French, and Japanese localization.
  • Browser Extension: Evaluate prompts in ChatGPT, Claude, and Gemini web interfaces.
  • Prompt Collections & Tagging: Organize, tag, and search saved prompt templates.
  • Shareable Analysis Reports: Exportable standalone HTML reports.
  • Prismpt CLI: Run prompt evaluation in CI/CD pipelines to prevent prompt regression.
  • VS Code Extension: In-editor prompt analysis for AI engineers.

Contributing

Contributions are warmly welcomed! Please read CONTRIBUTING.md for guidelines on branch management, commit styles, and testing requirements.

  1. Fork the repo.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Verify tests pass (npm run test).
  4. Commit your changes (git commit -m 'feat: add support for markdown checklists').
  5. Push to the branch (git push origin feature/amazing-feature).
  6. Open a Pull Request.

Privacy

Prismpt is strictly client-side:

  • Your prompts are never transmitted to external servers.
  • There are no tracking scripts, cookies, or analytics.
  • History is stored exclusively in your browser's localStorage.

License

Distributed under the MIT License. See LICENSE for more information.

About

Open-source prompt analyzer and optimizer for better AI interactions.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages