← all repositories
ZiChuanLan/agent-purge

One persona to rule every coding agent on your machine

agent-purge gives Codex, Claude Code, OpenCode, pi and friends a single, local control point for system prompts — with receipts and an undo button.

★1.5k stars JavaScript Coding AssistantsLLMOps · Eval
agent-purge
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

agent-purge is a local prompt-configuration tool that manages personas across a small zoo of coding agents — Codex, Claude Code, OpenCode, pi, omp, Grok, DSH, Kilo Code and others. You write one persona (a Markdown file with frontmatter), pick a mode, and it handles injecting or replacing the host agent’s system prompt through several channels: managed config writes, PATH shims, in-session /purge slash extensions, or project rule files. A web console on 127.0.0.1:7788 and a CLI share the same state.

The interesting bit

It’s unusually honest about what prompt rewriting can and cannot do. The README distinguishes four modes (replace, strict, append, off), explicitly warns that strict doesn’t mean the model only sees your persona, and separates “config written” from “actually live in this session” — a distinction most tools in this space quietly blur. Every managed write is logged with restore evidence, and external edits to host files are preserved rather than clobbered.

Key highlights

  • Per-executor overrides: one persona globally, a different one just for Codex, or follow to rejoin the global setting
  • Hot-switching verified for pi, omp, OpenCode, DSH and a few others; static channels need a fresh session
  • Clean teardown story: pause, uninstall, disarm, clean — all preserve your personas, and restore conflicts fail loudly instead of silently overwriting
  • Local-first with zero production dependencies; data lives in ~/.agent-purge/ and survives upgrades
  • Ships a compatibility table with actually-tested host versions, including packet captures for Kilo Code’s four modes

Caveats

  • Persona text still goes out with the host’s model requests — local management is not offline operation, and update checks phone GitHub
  • Hot-switching is unverified for Codex, Claude Code, Grok and several others; macOS hasn’t been tested on real hardware
  • Same persona delivered through multiple channels can duplicate content; the README advises enabling only what you need

Verdict

Worth a look if you juggle multiple coding agents and want consistent behavior (or just consistent language) without editing each tool’s config by hand. If you use exactly one agent and never touch its system prompt, this is a solution to a problem you don’t have.

Frequently asked

What is ZiChuanLan/agent-purge?
agent-purge gives Codex, Claude Code, OpenCode, pi and friends a single, local control point for system prompts — with receipts and an undo button.
Is agent-purge open source?
Yes — ZiChuanLan/agent-purge is open source, released under the MIT license.
What language is agent-purge written in?
ZiChuanLan/agent-purge is primarily written in JavaScript.
How popular is agent-purge?
ZiChuanLan/agent-purge has 1.5k stars on GitHub.
Where can I find agent-purge?
ZiChuanLan/agent-purge is on GitHub at https://github.com/ZiChuanLan/agent-purge.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.