Apollo Renal

v2.0.0

像肾脏一样过滤垃圾信息,保留有用的内容。

0· 109·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for nic-yuan/apollo-renal.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Apollo Renal" (nic-yuan/apollo-renal) from ClawHub.
Skill page: https://clawhub.ai/nic-yuan/apollo-renal
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install apollo-renal

ClawHub CLI

Package manager switcher

npx clawhub@latest install apollo-renal
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🫘 Clawdis
latestvk977mrwjnrrgxgtbvp1r9es2dd84c52k
109downloads
0stars
2versions
Updated 2w ago
v2.0.0
MIT-0

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警告
有效信息密度< 50%警告
重复确认次数> 5次警告

触发过滤条件:≥2项超标

集成到心跳

每次心跳自动运行,结果写入 .renal/filter-state.json。 日志中附带renal状态:

🫘 上下文正常  /  🫘 上下文需过滤(节省X%)

主AI调用方式

当 heartbeat-realtime.json 显示需要过滤时,主AI执行六步过滤流程:

  1. 扫描上下文,识别有用/废物
  2. 选择性保留重要内容
  3. 执行过滤
  4. 写入快照(只对重要内容)
  5. 压缩上下文
  6. 报告节省率

与apollo-dream的协作

场景顺序说明
上下文略长renal先跑快速过滤
上下文很长需深度整理renal先跑,dream后跑先过滤再巩固
由谁决定AI根据上下文判断Q6确认

v1 验收标准

  • 每次心跳时正确报告上下文状态
  • 集成到心跳日志
  • Token/密度/确认三项阈值已定义
  • 过滤后决策记录完整保留(待实施过滤流程)
  • Token节省率可量化(待实施过滤流程)
  • 重要内容快照机制(待实施过滤流程)

待决策事项(已全部确认 ✅)

✅ 2026-04-06 袁文同确认

  • Q5 有效信息密度标准:AI判断 + 用户共同定义(AI先判断,用户有最终确认权)
  • Q6 与dream的执行顺序:听AI的,根据上下文决定谁先跑
  • Q7 误删恢复:只对重要内容(决策/偏好/任务状态)做快照,普通内容不写快照

Comments

Loading comments...