Repolode
ZiChuanLan

ZiChuanLan/agent-purge

一份人设系统提示词,统一注入或替换多个 coding agent 的系统提示词,附本地 Web 控制台。

Star
1,403
Fork
882
未关闭 Issue
0
最近提交
8小时前

这是什么?

agent-purge 让你用一份人设文件,统一写入多个 coding agent 的系统提示词,支持 codex、claude、opencode、pi、hermes 等。各家读取系统提示词的位置不同,工具因此提供三条通道:写入 harness 托管配置块的 install、通过 PATH 前置同名小壳启动的 shim,以及会话内可热切换的 /purge 命令。提供 replace、strict(只发人设)、append、off 四种模式。

本地 Web 控制台监听 127.0.0.1,可以查看人设列表、已安装的 harness 及其注入层,并开关人设。关闭或使用 off 模式后,所有改动都会撤回。人设是带 frontmatter 的 Markdown 文件,数据默认存放在用户主目录下,状态只保存在本机。项目基于 Node 20+,无运行时依赖。

可选的 magpie 网关插件会改写经过网关的请求中的 system 段,换人设无需逐个重启 harness。闭源桌面端只做原样启动,不做任何注入。

核心功能

  • 01通过托管配置块、PATH 小壳或会话命令,把同一份人设写入多个 coding agent。
  • 02提供 replace、strict、append、off 四种模式,可热切换。
  • 03本地 Web 控制台可管理人设、查看 harness 状态并开关注入。
  • 04所有改动均可撤回,关闭或卸载后不留残留。
  • 05可选的 magpie 网关插件可改写经网关请求的系统提示词。

适用场景

  • 在 Claude Code、Codex、OpenCode 等工具之间保持统一的人设和编码风格。
  • 对比不同系统提示词对 coding agent 行为的影响。
  • 通过本地网关接入多个 agent,并在一处统一切换人设。

快速上手

  1. 1

    通过 npm 全局安装 CLI

    npm i -g agent-purge
  2. 2

    启动本地控制台

    agent-purge web
  3. 3

    用当前人设启动 coding agent(例如 codex)

    agent-purge codex

使用前须知

  • 需要 Node.js 20 或更高版本。
  • 闭源桌面端只能原样启动,无法注入提示词。
  • 可选的 magpie 网关插件需从 git 克隆后按路径安装,人设增删后需重新生成清单。
  • strict 和 replace 模式可能删除工具说明,导致 harness 行为变差或改变。

收录于专题

标签

常见问题

agent-purge 是什么?
一份人设系统提示词,统一注入或替换多个 coding agent 的系统提示词,附本地 Web 控制台。 agent-purge 让你用一份人设文件,统一写入多个 coding agent 的系统提示词,支持 codex、claude、opencode、pi、hermes 等。各家读取系统提示词的位置不同,工具因此提供三条通道:写入 harness 托管配置块的 install、通过 PATH 前置同名小壳启动的 shim,以及会话内可热切换的 /purge 命令。提供 replace、strict(只发人设)、append、off 四种模式。
agent-purge 可以免费使用吗?用的什么许可证?
agent-purge 以 MIT 许可证开源。用于商业产品前,请先确认许可证条款。
agent-purge 还在维护吗?
活跃维护中。agent-purge 最近一次提交是在 2026年11月7日。
agent-purge 适合用来做什么?
在 Claude Code、Codex、OpenCode 等工具之间保持统一的人设和编码风格。 对比不同系统提示词对 coding agent 行为的影响。 通过本地网关接入多个 agent,并在一处统一切换人设。
agent-purge 怎么安装和运行?
通过 npm 全局安装 CLI: npm i -g agent-purge 启动本地控制台: agent-purge web 用当前人设启动 coding agent(例如 codex): agent-purge codex
在哪里获取 agent-purge?
源代码和安装说明在 GitHub 上:https://github.com/ZiChuanLan/agent-purge

概要由 AI 根据项目 README 生成;GitHub 数据每日更新。

相关项目