All work
Developer ToolsAI-native

Prompt Optimizer

A macOS menu-bar app that rewrites any selected text into an optimized prompt from a global hotkey, learning from what you accept.

Year 2026Status BuiltType Artifact
7
rewrite techniques
2
rewrites per keystroke
3
models cross-judged
60
graded eval prompts

Overview

Prompt Optimizer is a native macOS utility that turns rough text into a well-engineered prompt without leaving the app you're in. Select text anywhere, press ⌥Space, and a floating panel returns two rewrites generated against a chosen profile: Concise, Creative, Technical, or custom. Accepted rewrites feed an on-device learning engine that replays them as few-shot examples on the next call, so suggestions track your style over time. A Hub window manages a local library of saved prompts, parameterized templates, and settings. Everything runs locally: the only network traffic is one encrypted call to the configured model provider, with the API key held in the Keychain and no telemetry.

Highlights

  • Global-hotkey capture with a dual clipboard + Accessibility-API path for reliable text grabs across any app
  • On-device learning engine records accepted rewrites and replays them as few-shot examples, so it personalizes without anything leaving the machine
  • Profile system encodes seven rewriting techniques (chain-of-thought, analogical, and others) as swappable system prompts
  • Promptfoo eval harness scores 60 core prompts × 7 profiles on an LLM-judge rubric, cross-validated across OpenAI, Anthropic, and Google
  • Quantified same-family judge bias (99% self-pass vs 60-81% cross-model), a concrete prompt-engineering finding, not a wrapper

Stack & tools

  • Swift
  • SwiftUI
  • Core Data
  • Keychain
  • Accessibility API
  • OpenAI API
  • Promptfoo
  • XCTest
Prompt Optimizer · demo

Architecture

A capture → rewrite → learn loop runs entirely on the user's machine, with a single encrypted call to the model provider per rewrite. Selected text is grabbed through a dual clipboard and Accessibility path, a prompt builder assembles the system prompt from the active profile plus learned examples, and accepted rewrites feed back as few-shot context for the next call.

Capture
Global hotkey⌥Space
Hybrid text grabclipboard + Accessibility API
Rewrite
Prompt builderprofile + learned examples
Missing-context checkasks before guessing
Model call → 2 rewritesOpenAI
Apply & learn
Accept / save / templatize
Learning enginestores few-shot feedback
InputAgentEngineGateOutput