Claude writes it. Solar polishes it.
An Agent Skill that keeps drafting and structuring with Claude (or Codex) and hands only
the final sentence-level pass to Upstage Solar (solar-pro4). This is a polish step, not
a rewrite: send a finished draft plus explicit constraints, get the same document back with
better-sounding sentences.
Works with any language the model handles; it is especially strong on Korean drafts.
flowchart LR
U(["User<br/><i>“Have Solar proofread this”</i>"])
subgraph AGENT["🤖 Agent — Claude Code · Cowork · Codex"]
direction LR
D["<b>1 · Draft</b><br/>research · structure · write"]
B["<b>2 · Polish brief</b><br/>protected lines · length cap<br/>no fact changes · output format"]
V{"<b>4 · Verify</b><br/>numbers · protected lines · length"}
M["<b>5 · Merge</b><br/>only what passed"]
end
S["<b>3 · upstage/solar-pro4</b><br/>OpenRouter<br/>sentences only · structure and facts untouched"]
OUT(["Final draft<br/><i>delivered with a note on what changed</i>"])
U --> D --> B
B -- "prompt file" --> S
S -- "polished text" --> V
V -- "passes" --> M --> OUT
V -. "violation — tighten and re-call" .-> B
classDef agent fill:#EEF2FF,stroke:#6366F1,color:#1E1B4B
classDef solar fill:#F3E8FF,stroke:#7B5CFF,stroke-width:2px,color:#2E1065
classDef io fill:#F8FAFC,stroke:#94A3B8,color:#0F172A
class D,B,V,M agent
class S solar
class U,OUT io
style AGENT fill:#FBFBFE,stroke:#C7D2FE,color:#3730A3
Step 4 is the one that matters. The failure mode of a polish model is quietly changing a fact, so always diff numbers, proper nouns, and protected sentences before merging. On a violation, don't merge — tighten the constraint and call again.
Get an OpenRouter key first (step 1 below), then paste this into Claude Code, the Claude app, or Codex:
Install this skill for me: https://github.com/SolarLLM/solar-proofread
The agent follows INSTALL.md — it picks the right directory for your host and OS, clones, verifies that Python can run the script, and prints the one command you run yourself to save the key. It will not ask you to paste your API key into the chat.
If your agent can't browse, hand it the file directly: https://raw.githubusercontent.com/SolarLLM/solar-proofread/main/INSTALL.md
Rather do it by hand? Steps 1 and 2 below.
- Sign up at https://openrouter.ai (Google or GitHub works)
- https://openrouter.ai/keys → Create Key → name it and create
- Copy the
sk-or-v1-...key (shown only once) - Add credits at https://openrouter.ai/credits
upstage/solar-pro4is a 524K-context model. Check current pricing at https://openrouter.ai/upstage/solar-pro4. Polishing one article is usually a few thousand tokens.
Save the key to ~/.env:
macOS / Linux
cat >> ~/.env << 'EOF'
OPENROUTER_API_KEY=sk-or-v1-PASTE_YOUR_KEY_HERE
SOLAR_MODEL=upstage/solar-pro4
EOF
chmod 600 ~/.envWindows (PowerShell) — home is C:\Users\<name>
Add-Content -Path "$env:USERPROFILE\.env" -Encoding ascii -Value @(
"OPENROUTER_API_KEY=sk-or-v1-PASTE_YOUR_KEY_HERE",
"SOLAR_MODEL=upstage/solar-pro4"
)Lock it down — the chmod 600 equivalent:
icacls "$env:USERPROFILE\.env" /inheritance:r /grant:r "$($env:USERNAME):(R,W)"Keep -Encoding ascii. Windows PowerShell 5.1 writes a BOM with Out-File -Encoding utf8,
and a BOM in front of the first key turns its name into \ufeffOPENROUTER_API_KEY for
anything that reads the file plainly. (This script strips it — it reads utf-8-sig — but
other tools sharing ~/.env may not.) On PowerShell 7, -Encoding utf8NoBOM is fine too.
~ in this README means $env:USERPROFILE on Windows. %USERPROFILE%\.env in cmd.exe.
The script fills in missing values from ~/.env, then ./.env — variables already set in
the process environment always win, so $env:OPENROUTER_API_KEY = "sk-or-v1-..." (or
export ...) overrides the file for one session. .env is in .gitignore, so it will not
be committed.
Claude Code
git clone https://github.com/SolarLLM/solar-proofread.git ~/.claude/skills/solar-proofreadFor one project only, use .claude/skills inside the repo instead of ~/.claude/skills.
It is picked up on the next session.
Codex CLI
git clone https://github.com/SolarLLM/solar-proofread.git ~/.codex/skills/solar-proofreadTo commit it and share with your team, put it in .agents/skills/solar-proofread.
Codex scans skill directories automatically; restart Codex if it doesn't show up.
Script paths in SKILL.md are written for Claude Code (~/.claude/skills/...), so read
them as ~/.codex/skills/solar-proofread/scripts/solar_proofread.py when installed here.
Claude app (Cowork)
Zip this repository, rename it to .skill, attach it in the chat window, and save.
git clone https://github.com/SolarLLM/solar-proofread.git
cd solar-proofread && rm -rf .git
cd .. && zip -Xr solar-proofread.skill solar-proofreadCowork sessions run in the cloud, not on your machine, so the key has to be in that
environment's ~/.env as well.
Windows (PowerShell)
Same steps, different paths. Read ~ as $env:USERPROFILE.
# Claude Code
git clone https://github.com/SolarLLM/solar-proofread.git "$env:USERPROFILE\.claude\skills\solar-proofread"
# Codex CLI
git clone https://github.com/SolarLLM/solar-proofread.git "$env:USERPROFILE\.codex\skills\solar-proofread"For one project only, clone into .claude\skills\solar-proofread inside the repo.
Packaging a .skill for the Claude app:
git clone https://github.com/SolarLLM/solar-proofread.git
Remove-Item -Recurse -Force solar-proofread\.git
Compress-Archive -Path solar-proofread -DestinationPath solar-proofread.zip
Rename-Item solar-proofread.zip solar-proofread.skillCalling the script directly uses py instead of python3:
py -3 scripts\solar_proofread.py --file prompt.txt --out polished.mdNo Python or Git yet? Both are one line each:
winget install Python.Python.3.12
winget install Git.GitThen open a new terminal so PATH picks them up. If python opens the Microsoft Store,
that's the App Execution Alias stub — install the real Python as above, or turn the stub
off in Settings → Apps → Advanced app settings → App execution aliases.
Using WSL? Every bash command in this README works as-is. Just remember that the WSL
home (/home/<name>) and the Windows home (C:\Users\<name>) are different places: put
the key in the .env of whichever home runs the agent, and install the skill there too.
Script only, no skill
git clone https://github.com/SolarLLM/solar-proofread.git
python3 solar-proofread/scripts/solar_proofread.py --file prompt.txt --out polished.mdBuild prompt.txt from the prompt template in SKILL.md. Python 3.8+, standard library
only — no dependencies to install.
Finish the draft first, then just say:
Have Solar proofread this
The agent writes the polish brief, calls Solar, verifies the diff, and reports what changed.
Korean triggers work too — Solar에게 교정 맡겨줘, Solar로 다듬어줘.
python3 scripts/solar_proofread.py --file prompt.txt --out polished.mdOn Windows: py -3 scripts\solar_proofread.py --file prompt.txt --out polished.md
| Flag | Description |
|---|---|
--file |
File holding the full prompt (required) |
--out |
Also write the result to a file |
--model |
Model override (default upstage/solar-pro4) |
--max-tokens |
Default 16000 |
The model id and token usage go to stderr; the polished text goes to stdout.
OPENROUTER_API_KEY not found in env or ~/.env — check the file the script actually
reads: cat ~/.env, or Get-Content "$env:USERPROFILE\.env" on Windows. The usual causes
are a key saved in the WSL home while the agent runs on Windows (or the reverse), a BOM in
front of the first key, or a stray space around the =. To test without touching the file,
set it for the current shell only:
$env:OPENROUTER_API_KEY = "sk-or-v1-..."HTTP Error 401 — the key is wrong or was revoked. HTTP Error 402 — the
OpenRouter account is out of credits. HTTP Error 404 — check the model id; it must be
exactly upstage/solar-pro4.
Garbled non-ASCII output on Windows — the script forces UTF-8 on stdout, so both --out
and > redirection are safe. If the console still shows question marks, that's the font
or code page: use Windows Terminal, or run chcp 65001.
py is not recognized — install Python as above, or use python. Inside WSL it's
python3.
The full template is in SKILL.md. Four things actually decide the outcome.
A list of protected sentences. Every line the piece cannot survive losing — the thesis, the closing line, a quoted mission statement. Solar respects an explicit list.
A length ceiling. Without one, a polish pass grows the text. State the current character count and cap the drift at ±5%.
No new facts. Say plainly that numbers, names, and examples must not change or be added. This is the failure mode to guard against.
Output only. Without "return the polished body text only", you get a preamble to strip.
Write the brief in the language of the draft. Korean draft, Korean instructions.
On a 10-minute keynote script (~3,400 characters), Solar changed one passage. On 47 slide lines, it proposed 5 edits, of which 2 were kept.
Moving conservatively on an already-tight draft is not a failure — it means the constraints held. The reverse is the signal to watch: if a lot comes back changed, the draft may not have been finished.
MIT