cd /news/ai-tools/hone-a-native-macos-app-that-rewrite… · home › topics › ai-tools › article
[ARTICLE · art-175281] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Hone: a native macOS app that rewrites your prompts using the Claude/ChatGPT subscription you already pay for

A developer built Hone, an open-source (MIT) native macOS app in SwiftUI that rewrites and edits selected text using an existing Claude or ChatGPT subscription rather than a separate API key. To isolate requests, it runs each vendor's official CLI in headless mode with tools, hooks, MCP servers, project memory and session persistence disabled, inside an empty temp folder, and defends against prompt injection by wrapping selected text and context in escaped delimiters. The app has no third-party dependencies, backend or telemetry, and stores API keys in the macOS Keychain when users opt for key-based providers.

recommendation

When calling an agent CLI for a single text task, disable tools, hooks, MCP config and session persistence and run it in an empty temp folder to contain prompt injection.

more in playbook: Securing agents and AI tools
by read4 min views2 publishedNov 24, 2026

I already pay for an AI subscription. Most "AI writing" utilities for the Mac want an API key on top of it, so I'd be paying twice for the same model.

So I built Hone: a native macOS app that turns rough prompts into good ones and runs AI text actions on any text you select, using the subscription you already have. It's open source (MIT), written in SwiftUI, and has zero third-party dependencies.

Select text in any app, press ⌃⌥Space, pick an action (Improve Prompt, Rewrite, Proofread, Summarize, Translate and more), then replace the selection in place or copy the result.

Repo: github.com/dvd90/prompt-forge (it shipped as Prompt Forge in 1.0, hence the repo name). There's a 34-second demo at the top of the README.

This post covers the four parts I found most interesting to build.

Hone never copies or stores a login token. In subscription mode it runs the vendor's official CLI in headless mode, so requests use your existing login and count against your plan.

The hard part is isolation. A CLI like Claude Code is an agent: it has tools, hooks, MCP servers and project memory. None of that should leak into a "proofread this sentence" request. So the Claude Code call looks like this:

claude -p --system-prompt "..." \
  --tools "" \
  --setting-sources "" \
  --strict-mcp-config \
  --disable-slash-commands \
  --no-session-persistence

That means no tools, no hooks, no MCP servers, no CLAUDE.md and no session files. The other two providers get the same treatment:

codex exec --ephemeral -s read-only --skip-git-repo-check
gemini -p --approval-mode plan

Every CLI runs in an empty temp folder, so a model can't touch your files even if it tried.

One gotcha: GUI apps on macOS don't inherit your shell PATH, so the app can't find claude the way your terminal does. Hone reads PATH once from a login shell and shows in Settings where each CLI was found.

If you'd rather use a key, there's an Anthropic provider and an OpenAI-compatible one with presets for OpenAI, OpenRouter, Ollama and LM Studio. Keys live in the macOS Keychain.

Improve Prompt doesn't just hand back a rewrite. It scores your draft from 0 to 100, says what was wrong, shows the improved prompt, lists what changed and the assumptions it made, then scores the result.

I wanted that to render live while the model streams, across providers that don't all support structured output. So the meta-prompt asks for a fixed tagged format, and the app parses it as it arrives:

<score_before> -> <diagnosis> -> <improved_prompt> -> <changes> -> <assumptions> -> <score_after>

The meta-prompt itself is based on Anthropic's and OpenAI's published prompting guidance: be explicit about the task and what "done" means, give the why behind instructions, separate instructions from data, and set the output format.

The rule I like most is "never leave blanks". When something is missing, the model makes a reasonable assumption, writes it into the prompt and lists it. You correct any of them and click Re-run with corrections, instead of filling in {{PLACEHOLDERS}} by hand.

A tool that sends whatever you highlight to an LLM is a prompt-injection target by design. You will eventually select an email or a web page that says "ignore previous instructions".

All text actions share one guarded system prompt. The selection is wrapped in delimiters (<text> or <draft_prompt>) and labelled as content, so that sentence gets proofread, not obeyed.

Context gets the same treatment. Profiles, notes, attached files and the window title you came from are each delimited, and their closing tags are escaped so a file can't break out of its block.

Combined with section 1 (no tools, read-only or plan mode, empty working folder), the worst an injected instruction can do is produce a bad rewrite.

Hone has no third-party packages, no backend and no telemetry. The app talks only to the provider you pick.

Keeping it dependency-free forced small seams. A provider is one protocol:

protocol LLMProvider {
    func stream(system: String, messages: [ChatMessage], maxTokens: Int)
        -> AsyncThrowingStream<String, Error>
}

And a new built-in action is one line:

builtIn("bulletize", "Bullet Points", "list.dash",
        "Convert this text into a clean bulleted list."),

CI builds the app and runs the unit tests on every pull request, and logic code must keep at least 95% line coverage. SwiftUI views and OS glue are excluded by name. Live tests that make real calls through my own CLI logins never run in CI.

You need macOS 14 or later, on Apple silicon or Intel.

git clone https://github.com/dvd90/prompt-forge.git
cd prompt-forge
./install.sh   # builds, installs to /Applications, launches

If claude is installed and logged in, there is nothing else to configure.

Replace works by capturing your selection with ⌘C and pasting back with ⌘V, and that depends on the target app. Which app breaks it for you? Browsers, Electron apps, terminals and editors are the likely suspects. Tell me in the comments, with steps if you can, or open an issue.

The Gemini CLI provider also hasn't been tested end to end, so reports from Google-login users are welcome.

Next in this series: how to call Claude Code headless from a native app, flag by flag. Follow if you want it.

── more in #ai-tools 4 stories · sorted by recency
── more on @hone 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/hone-a-native-macos-…] indexed:0 read:4min 2026-11-24 · —