explaingit

linshenkx/prompt-optimizer

📈 Trending28,233TypeScriptAudience · vibe coderComplexity · 2/5ActiveLicenseSetup · easy

TLDR

A tool that rewrites your AI prompts to be clearer and more effective, then lets you test and compare results across different AI models.

Mindmap

mindmap
  root((repo))
    What it does
      Rewrites prompts
      Tests results
      Compares versions
      Handles images
    How to use
      Type or import
      Click optimize
      Test output
      Compare side-by-side
    Supported models
      OpenAI
      Gemini
      DeepSeek
      Others
    Key features
      Client-side only
      Multiple formats
      System prompts
      User prompts
    Deployment options
      Web app
      Desktop app
      Chrome extension
      Docker

Things people build with this

USE CASE 1

Rewrite a vague prompt into a detailed, specific one that gets better AI responses.

USE CASE 2

Compare how different prompt versions perform against the same AI model to find what works best.

USE CASE 3

Optimize image generation prompts by expanding one-line ideas into rich, detailed descriptions.

USE CASE 4

Test system prompts to fine-tune how an AI behaves before deploying it in production.

Tech stack

TypeScriptReactNode.js

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, but you must share modifications under the same AGPL-3.0 license and make source code available.

In plain English

Prompt Optimizer is a tool for rewriting the instructions you send to AI models so they produce better answers. When you type a request to an AI model, that request is called a prompt; the phrasing of it has a big effect on what comes back. This project gives you a workspace where you can paste a rough prompt, have the tool rewrite it into a clearer version, then test the rewritten version side by side against the original so you can judge whether it actually improved. It supports two kinds of prompt: the system prompt that sets the AI's overall role, and the user prompt that asks a specific question. The README says you can run optimization in one click and iterate over multiple rounds, then compare results to confirm a prompt has truly improved. The tool also handles image generation prompts, including text-to-image, image-to-image, and multi-image setups. You can store useful prompts as reusable favorites with version history, bring in starting prompts from templates or from an external Prompt Garden, and run tests that include reusable variables, multi-turn conversations, and Function Calling. It connects to a list of model providers including OpenAI, Gemini, DeepSeek, Zhipu AI, SiliconFlow, and MiniMax, and ships in four forms: a web app, a desktop app, a Chrome extension, and a Docker image. This is useful for anyone who writes a lot of AI prompts, whether for chat answers or for image generation, and wants a structured place to refine and reuse them. The codebase is written in TypeScript, and the README notes the architecture is client-side so your data goes directly to the AI provider. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
I have a prompt that's not getting good results from ChatGPT. Use this tool to optimize it and show me the improved version.
Prompt 2
Help me write a detailed image generation prompt for Midjourney using this optimizer's templates.
Prompt 3
Compare two different versions of my system prompt side-by-side to see which one produces better outputs.
Prompt 4
Show me how to set up this prompt optimizer as a Chrome extension so I can improve prompts while browsing.
Prompt 5
Use this tool to batch-optimize a set of prompts I use regularly for different AI models.
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.