ZiChuanLan/agent-purge
One persona, many coding agents. Replace or inject system prompts across codex, claude, opencode, grok, omp, hermes, pi, zcode - with a local web console.
From the publisher
README & documentation
Source previewRead the project’s overview, installation instructions and usage examples. The original README is the source of truth.
[](https://www.npmjs.com/package/agent-purge) [](https://github.com/ZiChuanLan/agent-purge/stargazers) [](LICENSE) 一份系统提示词,喂给多个 coding agent。支持替换(replace)、只发人设(strict)、追加(append)、清空(off)四种模式,可热切换,全程可逆。 每家 coding agent 读系统提示词的位置都不一样:有的认启动参数,有的认配置文件,有的只能靠插件改运行时对象。agent-purge 把这些入口统一成三件事: 三层都写的是同一份 personas/.md 的正文。--mode off 或 Web 总开关关掉时,全部撤回到原样——不留残渣。 要求 Node ≥ 20,零依赖。 数据独立存放,升级不会被覆盖:默认 /.agent-purge/(Windows C:\Users\\.agent-purge\),里面是 state.json 和 personas/。想换位置就设环境变量: 旧版本(0.1.x)把数据放在包目录里,首次运行会自动搬到新家,原文件不动。 personas/.md = frontmatter + 正文。正文就是会被写进系统提示词的那一段。 frontmatter 用 description 写「说明」(Web 列表和 agent-purge ls 显示的就是它);旧的 desc 仍然认,不会报错。可选 order(排序)、harness / model(匹配用)。Web 里只改名字和说明时会保留 frontmatter 的其它键,不整段重写。 首次运行会在 personas/ 下生成 neutral.md 起步模板。 每个数字都是实测值:本地假 provider 抓真实请求体,不是估算。 opencode 和 opencode2 是两个不同的 npm 包(opencode-ai 1.x 与 @opencode/cli 2.x),插件接口完全不同,各自独立支持。 agent-purge ls 和 Web 控制台显示的是运行期真值:每个 harness 有没有装、版本、注入层(SYS / USER)、三个通道各自可用性。matrix.json 里是静态能力表,两者冲突时以运行期为准。 闭源桌面端(提示词在服务端或二进制里)只做原样启动,不做任何注入——agent-purge 会明确打印原因,不会假装生效。 desktop / web / headless 三个形态共用一套插件:往每个 profile 的 nodemodules/agent-purge/ 放一个 cordis 插件,在 cordis.patch.yml 里用 - insert 挂上。不改 app.asar,不碰安装目录,不依赖任何第三方插件。 装完要重启一次 dsh(patch 层只在启动时读);之后换 persona、切模式、开关全是热生效,不用再重启。 只想临时试一下、不碰常驻 profile:agent-purge dsh --ask "…"(一次性会话,进程退出即清理)。 magpie 把各家 agent 的请求收进本地网关。挂上这个插件后,凡是经过网关的请求(Claude Code、Codex、OpenCode、pi…)的 system 段都按 agent-purge 的当前人设改写——不用逐个 harness…
Read the full README ↗ · Preview checked 2026-10-27T14:13:23.479Z
Inside the original README — Document outline
Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.
Links from the README
References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.
Documentation belongs to its respective authors. Reported project/model license: MIT. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.
What this repository does
One persona, many coding agents. Replace or inject system prompts across codex, claude, opencode, grok, omp, hermes, pi, zcode - with a local web console.
Repository facts
- Owner
- ZiChuanLan
- Primary language
- JavaScript
- Stars
- 930
- Forks
- 672
- Open issues + pull requests
- 0
- License
- MIT
- Archived
- No
- Default branch
- main
- Created
- 2026-10-25T06:06:02.000Z
- Last push
- 2026-10-30T12:06:34.000Z
Topics and intended use
Owner-supplied topics: claude-code, codex, coding-agent, deepseek-harness, harness, omp, opencode, pi, system-prompt
Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.
Evaluate before installing
Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.
Source and freshness
Source: GitHub. Metadata observed 2026-10-31T12:17:23.005Z. Daily imports are snapshots, not real-time monitoring.
Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.