← 返回 Skills 市场
116
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install apollo-renal
功能描述
像肾脏一样过滤垃圾信息,保留有用的内容。
使用说明 (SKILL.md)
Apollo Renal — 上下文实时过滤系统
核心准则
AI的上下文管理应该像肾脏维护血液:持续过滤废物,保留有用物质,维持体内平衡。
肾脏的核心功能:
- 过滤:把血液中的废物分离出来
- 选择性重吸收:有用的东西(葡萄糖、氨基酸)全部回收
- 浓缩:把废物集中在尿液中排出
- 维持酸碱平衡:保持血液pH稳定
对应的AI映射:
- 过滤:识别上下文中的噪音(重复、废话、中间过程)
- 选择性重吸收:确保关键决策、用户偏好、进行中任务不被删除
- 浓缩:把多轮相同表达压缩为一句
- 酸碱平衡:监控对话情绪,发现失衡及时介入
与apollo-dream的关系
apollo-dream = 睡眠时的记忆巩固(长期投资)
apollo-renal = 清醒时的实时过滤(短期维护)
协作模式:
renal(过滤)→ dream(巩固)→ renal(再过滤)
↑_________________________|(循环)
apollo-renal是"预防",apollo-dream是"治疗"。
触发条件
自动触发
- Token使用率 > 50%
- 每次心跳时检测(apollo-circadian的午后低谷期优先触发)
手动触发
- 用户主动说:整理上下文、清理噪音、太长了
四步过滤流程
Step 1: 上下文透析(只读,不删除)
→ 扫描对话历史
→ 识别关键信息(必须保留):
- 决策(decisions)
- 用户偏好(preferences)
- 进行中任务(active tasks)
- 未解决问题(open questions)
→ 识别废物(可以清除):
- 重复确认("好的"/"收到"/"OK"等礼仪性回复)
- 中间过程(探索性讨论的中间步骤)
- 冗余表达(同一意思多轮重复)
- 过时信息(已解决但仍留在上下文中)
Step 2: 选择性重吸收
→ 检查"废物"中是否有误判(漏网的重要信息)
→ 对被误标的重要信息进行抢救性保留
Step 3: 尿液浓缩
→ 多轮相同意思 → 一句话概括
→ 重复表达 → 保留一个
→ 长解释 → 提炼核心观点
Step 4: 酸碱平衡检查
→ 对话情绪是否失衡:
- 连续质疑(多轮追问同一问题)
- 连续负面(语气持续负面)
- 连续偏离(话题持续漂移)
→ 如果失衡 → 建议apollo-dream介入深度整理
五类上下文元素分类
| 类型 | 说明 | 处理方式 |
|---|---|---|
| 决策 | 明确结论/决定 | ✅ 必须保留 |
| 偏好 | 用户喜好/习惯 | ✅ 必须保留 |
| 进行中任务 | 未完成的任务 | ✅ 必须保留 |
| 中间过程 | 探索/讨论/推理 | ⚠️ 可压缩或删除 |
| 噪音 | 重复/礼仪/废话 | ❌ 删除 |
输出格式
🫘 [apollo-renal] 上下文净化报告
过滤前状态:
- 总token估计:X
- 有效信息密度:Y%
过滤操作:
✅ 保留:决策X项 / 偏好X项 / 进行中任务X项
❌ 删除:重复确认X个 / 中间过程X项 / 噪音X项
过滤后状态:
- 总token估计:X'
- 有效信息密度:Y'%(提升Z%)
节省率:X% token
平衡状态:
🟢 对话正常
🟡 连续质疑/负面/偏离,需注意
🔴 失衡严重,建议apollo-dream深度介入
下一步建议:[继续当前任务 / 触发apollo-dream / 等待用户确认]
重要约束
❌ 不删除:
- 任何决策记录
- 用户明确表达的偏好
- 进行中任务的当前状态
- 未解决问题的当前状态
✅ 可以删除:
- 重复确认(礼貌性回复)
- 中间探索过程
- 已过时的临时信息
- 多轮重复表达
⚠️ 需要确认才删除:
- 不确定重要与否的内容
- 跨会话关联(可能有用但不确定)
实施文件
| 文件 | 作用 |
|---|---|
| scripts/renal/renal-check.sh | 上下文过滤检测脚本 |
| scripts/heartbeat-logger.sh | 已集成renal检测 |
| .renal/filter-state.json | 当前过滤状态 |
| .dream/task-state.json | 参考:进行中任务数 |
| .dream/topic-state.json | 参考:活跃话题数 |
| skills/apollo-renal/SKILL.md | 本文档 |
v1 实施规格
过滤检测脚本
# 手动运行
bash scripts/renal/renal-check.sh
# 输出示例
🫘 [apollo-renal] 上下文净化报告
当前状态:
- Token估算:153
- 有效信息密度:100%
- 重复确认:0次
- 进行中任务:0个
- 活跃话题:1个
🟢 上下文状态正常
阈值定义
| 指标 | 警告阈值 | 说明 |
|---|---|---|
| Token估算 | > 50000 | 警告 |
| 有效信息密度 | \x3C 50% | 警告 |
| 重复确认次数 | > 5次 | 警告 |
触发过滤条件:≥2项超标
集成到心跳
每次心跳自动运行,结果写入 .renal/filter-state.json。
日志中附带renal状态:
🫘 上下文正常 / 🫘 上下文需过滤(节省X%)
主AI调用方式
当 heartbeat-realtime.json 显示需要过滤时,主AI执行六步过滤流程:
- 扫描上下文,识别有用/废物
- 选择性保留重要内容
- 执行过滤
- 写入快照(只对重要内容)
- 压缩上下文
- 报告节省率
与apollo-dream的协作
| 场景 | 顺序 | 说明 |
|---|---|---|
| 上下文略长 | renal先跑 | 快速过滤 |
| 上下文很长需深度整理 | renal先跑,dream后跑 | 先过滤再巩固 |
| 由谁决定 | AI根据上下文判断 | Q6确认 |
v1 验收标准
- 每次心跳时正确报告上下文状态
- 集成到心跳日志
- Token/密度/确认三项阈值已定义
- 过滤后决策记录完整保留(待实施过滤流程)
- Token节省率可量化(待实施过滤流程)
- 重要内容快照机制(待实施过滤流程)
待决策事项(已全部确认 ✅)
✅ 2026-04-06 袁文同确认
- Q5 有效信息密度标准:AI判断 + 用户共同定义(AI先判断,用户有最终确认权)
- Q6 与dream的执行顺序:听AI的,根据上下文决定谁先跑
- Q7 误删恢复:只对重要内容(决策/偏好/任务状态)做快照,普通内容不写快照
安全使用建议
What to consider before installing:
- This skill is coherent with its stated purpose: it analyzes local conversation memory and computes metrics to decide whether filtering is needed. It does not request external credentials or perform network installs.
- The included script uses a hard-coded absolute path (/root/.openclaw/workspace). Confirm that this matches your deployment's workspace and that you are comfortable the script may read memory/*.md and .dream/*.json files from that location.
- The script only performs detection/metrics and writes .renal/filter-state.json; the SKILL.md describes further filtering/compression and snapshotting which are marked '待实施' (not implemented). Expect that the skill in its current form will only report when filtering is recommended, not perform deletions or heavy rewriting.
- If you need guarantees about data boundaries, ask the author to: (1) avoid hard-coded /root paths or make workspace path configurable, (2) explicitly declare required config paths, and (3) show the code that would perform any deletion/compression (so you can review it).
- Recommended precautions: run in a sandboxed agent environment, back up any important decision records before enabling automated filtering, and require explicit user confirmation before any automatic deletion or cross-session compression is implemented.
Confidence rationale: The files and instructions align with a context-management tool (benign), but missing implementation details and the hard-coded workspace path reduce confidence, so medium confidence is appropriate. If the skill later attempts network calls, reads/writes outside the workspace, or includes code that deletes content without confirmation, reassess as suspicious.
功能分析
Type: OpenClaw Skill
Name: apollo-renal
Version: 2.0.0
The apollo-renal skill is a context-management utility designed to optimize AI token usage by filtering redundant information and summarizing dialogue history. The provided bash script (scripts/renal/renal-check.sh) performs local analysis of workspace memory files to estimate token density and identify 'noise' (e.g., repetitive confirmations), while the SKILL.md provides logical instructions for the agent to follow during cleanup. No evidence of data exfiltration, malicious execution, or unauthorized access was found; the skill operates entirely within the expected OpenClaw workspace environment.
能力评估
Purpose & Capability
Name/description (real-time context filtering) matches the script and SKILL.md: the script estimates tokens, density, confirmations and writes a local filter-state. However the script assumes local workspace files (e.g., /root/.openclaw/workspace/memory/*.md and .dream/*.json) which are not declared as required config paths in metadata — this is plausible for a context filter but should be explicit.
Instruction Scope
SKILL.md describes a 6-step filtering workflow and integration into heartbeats. The included script only performs detection/metrics and writes .renal/filter-state.json (no deletion/compression is implemented). SKILL.md contains '待实施' items (filters and snapshotting not implemented). The instructions and script operate on local workspace files (reading memory and dream state) — consistent with purpose but the skill promises behaviors not yet implemented.
Install Mechanism
No install spec and no external downloads; only an included Bash script and SKILL.md. Lowest-risk install model for a skill of this type.
Credentials
The skill requests no env vars or credentials. It does, however, read and write files under a hard-coded absolute workspace path (/root/.openclaw/workspace). This is proportionate for a context-management tool, but hard-coding /root and not declaring required config paths reduces transparency and could cause the script to access unexpected data in some deployments.
Persistence & Privilege
always is false and the skill does not request elevated privileges. It writes a local state file (.renal/filter-state.json) within the workspace — expected for this functionality and not privileged.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install apollo-renal - 安装完成后,直接呼叫该 Skill 的名称或使用
/apollo-renal触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
v2.0.0: renal-check.sh脚本实现,完整上下文过滤检测
v1.0.0
新skill:上下文实时过滤,保留有用信息清除噪音
元数据
常见问题
Apollo Renal 是什么?
像肾脏一样过滤垃圾信息,保留有用的内容。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 116 次。
如何安装 Apollo Renal?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install apollo-renal」即可一键安装,无需额外配置。
Apollo Renal 是免费的吗?
是的,Apollo Renal 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Apollo Renal 支持哪些平台?
Apollo Renal 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Apollo Renal?
由 nic-yuan(@nic-yuan)开发并维护,当前版本 v2.0.0。
推荐 Skills