尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Stop paying for context you no longer need. A Claude Code plugin that frees context on task switches (−70% measured).
翻译准备中
正在加载完整 README。
查看完整 README ↗Claude Code only compacts when the context is nearly full. So when you finish one task and start another, every new message still carries the whole old conversation, and you pay for it again on every turn.
ghosted_ notices the switch. A small Haiku judge decides whether your prompt starts a new task. If it does, ghosted_ archives the old conversation, clears the context, puts your prompt back and starts it. You keep typing as usual.
| Measured on Opus 5.5 | Without | With ghosted_ |
|---|---|---|
| Open chat: a big read, then 12 turns of new work (2 runs each) | $4.82 | $3.87 (−20%) |
| Coming back to a big chat after its cache expired (36 runs, 6 scenarios) | $15.88 | $4.78 (−70%) |
| Open chat: a few short jobs after the switch | about the same (−0 to −4%) |
Inside a chat you keep using, old context is cheap: Opus 5.5 reads cached tokens at 5% of the input price, so the saving grows with how much work follows the switch. When you return to a big chat after its cache expired (an hour on a subscription), every old token has to be cached again at twice the input price, and that is where clearing saves the most. Tests passed in every run.
Already using caveman? ghosted_ still cut a caveman setup's cost from $3.32 to $0.92 (−72%), because caveman shortens replies and ghosted_ drops the old conversation. Full numbers, including where it doesn't help, are in BENCHMARKS.md.
First check Node.js: node -v. If it says "command not found", install Node from nodejs.org; Claude Code's own installer doesn't include it.
claude plugin marketplace add giovanbelle/ghosted
claude plugin install ghosted@ghosted
Restart Claude Code and press Enter on the one setup question to keep the default. Then work as usual: the first time you start a new task you'll see a line from ghosted_, and your task starts by itself. Wrong call? /resume brings the old chat back.
Task switch: when there's more than about 20k tokens of context, a Haiku judge sorts each prompt that isn't an obvious follow-up into one of three:
/clear and starts the task with those notes. Measured on Opus 5.5, a switch this way costs about $0.18 (the notes about $0.002, the rest is rebuilding the cache) and 10 seconds, against about $0.45 and 35 seconds for a /compact, which sends the old chat to the main model again./clear, then starts it with up to 5 facts from the old work.The old chat is archived first, and /resume brings it back if the call was wrong.
Terse answers (on by default): answers without filler. The default, lite, keeps full sentences. full turns them into compressed notes like caveman (20% less text and 19% lower cost in tests). Code and files Claude writes stay normal.
Cache warming (on, 1 hour): Claude's prompt cache expires after 5 minutes, or 1 hour on most subscriptions. After a longer break, your next message writes the whole context to the cache again, at 1.25× or 2× the input price. While you're away, ghosted_ re-sends the session just before the cache expires, through a hidden copy of the session that is deleted right after. A cache read costs 0.1× the input price. It stops once you're back, when Claude Code closes, and before the pings cost half of the rewrite they prevent. Measured: one ping read 191,089 tokens from the cache and wrote 372.
Dashboard: /ghosted-stats opens a local page (127.0.0.1, only you can open it) with task switches, tokens dropped, an estimated saving at your own price, warm pings, judge spend and archive search. It stops itself after 30 idle minutes.
Recall: every cleared or summarised conversation is archived and indexed for 30 days. /ghosted-recall <words> returns a short digest of the matching work.
Anything that goes wrong fails open: your prompt goes through as if ghosted_ weren't there.
| Setting | Default | |
|---|---|---|
| Keep the cache warm for | 1h | after your last turn; off to disable, e.g. 90m. Asked at install, or /ghosted warm |
| Terse answers | auto | auto = lite, or off when caveman is already active; also full, off. /ghosted terse |
| Check for a new task above | about 20k tokens | GHOSTED_MIN_TOKENS |
| Keep archives for | 30 days | GHOSTED_ARCHIVE_DAYS (0 = forever) |
Environment overrides: GHOSTED_KEEP_WARM, GHOSTED_TERSE, GHOSTED_MIN_TOKENS, GHOSTED_ARCHIVE_DAYS, GHOSTED_RELATED=compact (use /compact for related tasks), GHOSTED_MODE=compact (compact unrelated tasks too) and GHOSTED_OFF=1.
/ghosted | status and the list below |
/ghosted-stats | opens the local dashboard: switches, tokens dropped, estimated savings, warm pings, judge spend, archive search |
/ghosted-off · /ghosted on | pause or resume everything |
/ghosted-recall <words> | find archived work |
/resume | Claude Code's own command: go back to the chat from before a switch |
new: · same: before a prompt | force or block a task switch |
/ghosted terse · full · lite · off | shorter answers |
/ghosted warm · 90m · off | keep the prompt cache warm for 1h (or the time you give) after your last turn |
/ghosted setup · off | auto-typing in any terminal (VS Code, Ghostty, Alacritty) |
The slash menu shows plugin commands with a prefix (/ghosted:ghosted); typing /ghosted works too. Settings stick across sessions; environment variables still win over them.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗