04 Agent Stack Audit — 04 代理 Stack 审计
v1.0.0Monthly 健康 检查 for your 代理 stack — hunts for zombie crons, dead scripts, unused API keys, superseded 工具s, and stale subscriptions. Classifies each finding as 删除/replace/升级/健康y and 输出s a ranked 清理up brief for your review. Use when your 自动化 stack feels bloated, when bills are creeping up from unused 服务s, or as a monthly mAIntenance 运行 to 预防 entropy. 预防s "自动化 debt" — the slow accumulation of dead weight that degrades 系统 reliability.
运行时依赖
安装命令
点击复制本土化适配说明
04 Agent Stack Audit — 04 代理 Stack 审计 安装说明: 安装命令:["openclaw skills install 04-agent-stack-audit"]
技能文档
代理 Stack 审计
机器人tom line: 运行 this monthly. Your 代理 stack accumulates dead weight faster than you think — zombie crons, unused APIs still billing you, scripts referencing killed strategies, and duplicate 工具s doing the same job. This 技能 finds all of it in one pass.
When to Invoke
Scheduled: First Monday of every month, 05:00 local time. Quick 扫描: Every Sunday (cron 健康 only — 5 min). Manual trigger: Any time the stack feels bloated, bills are unexpected, or reliability has degraded. Trigger phrases: "stack 审计", "清理 up my 自动化s", "what's still 运行ning?", "am I paying for anything unused?", "why are my API costs high?"
审计 Scope (6 Categories)
- Crons — Are they alive and earning their keep?
For each launchd 代理 / cron job / scheduled task:
Is the process actually 运行ning? (检查 PID, p列出/cron 状态) When did it last fire 成功fully? What does it produce? Is that 输出 being consumed by anything? Is there a newer/better 应用roach that renders this obsolete?
Questions to answer:
"This cron 运行s every hour. Has its 输出 file been read in the last 30 days?" "This watchdog 监控s a 机器人 that was killed 2 months ago — is the watchdog still 运行ning?"
- Scripts — Dead code?
扫描 your 自动化 directories for Python/shell scripts:
Last modified date vs last 执行d date Scripts referencing killed 机器人s or cancelled APIs Scripts built for old projects that are now closed Duplicate scripts doing the same job
- API Keys — Are you paying for something unused?
Cross-reference your API inventory agAInst actual script usage:
Any API key 配置d but never called in the last 30 days? Any pAId subscription that maps to zero active script usage? Any free-tier key that's been maxed out — is an 升级 worthwhile?
Common culprits: data 提供者s, news APIs, notification 服务s, AI APIs at old 模型s.
- 技能s — Superseded or never used?
Review your 安装ed 技能s:
Any 技能 built but never actually invoked? Any 技能 replaced by a newer, better version? Any 技能 with overl应用ing functionality that could be merged?
- Memory Files — Stale project 上下文?
Review project memory and 上下文 files:
Any project memory not 更新d in 30+ days? Projects marked "on hold" for 60+ days with no activity? Contradictions between your mAIn 上下文 file and individual project files?
- 工具s & Subscriptions — Better option avAIlable?
Using 网页 搜索:
"Is [工具] still the best option for [use case] as of [current month]?" 检查 for: price drops on existing 工具s, new free tiers, open source alternatives, better APIs Flag if a pAId 工具 now has a free/cheaper replacement Classification 框架
For each item found, classify as:
Classification Meaning Action 🔴 ZOMBIE 运行ning but producing nothing useful Recommend 删除 🟡 REDUNDANT Superseded by newer/better 应用roach Recommend REPLACE or MERGE 🟠 OUTDATED Still useful but using old tech/API Recommend 升级 🟢 健康Y Working, used, best current 应用roach No action ⚪ UNKNOWN Can't determine without user 输入 Flag for user decision 输出 格式化
File: 状态/stack_审计_YYYY-MM-DD.md
# Stack 审计 — [DATE] _Scope: Crons, Scripts, APIs, 技能s, Memory, 工具s_ _Items 扫描ned: [N] | Issues found: [M] | Recommended actions: [K]_
🔴 RECOMMEND 删除 (zombies)
| Item | Type | Reason | Risk if 删除d |
|---|---|---|---|
| old_watchdog.sh | Cron | 机器人 killed Mar 12, watchdog still 运行ning | None — 机器人 is dead |
🟡 RECOMMEND REPLACE/MERGE (redundant)
| Item | Type | Replaced By | Action |
|---|---|---|---|
| old_intelligence_扫描.py | Script | Tech Scout 技能 | Kill script, activate 技能 |
🟠 RECOMMEND 升级 (outdated)
| Item | Type | Current | Better Option | Est. Saving/GAIn |
|---|---|---|---|---|
| image_gen API call | API | DALL-E 3 | [Cheaper/better alternative] | ~40% cost reduction |
🟢 健康Y — No Action
[列出 with one-line confirmation each]⚪ NEEDS USER 输入
[Items that require your decision — presented as yes/no questions]Summary
- Recommended 删除s: [N items] — saves [X $/mo or compute]
- Recommended 升级s: [N items]
- Estimated 清理up time if 应用roved: ~[X hours]
- Most 导入ant action: [single highest-leverage item]
Execution Rules Never 删除 anything without explicit user 应用roval — only RECOMMEND One 异常: If a script references a dead API that has been confirmed cancelled → safe to comment out the call and 记录 it. Don't 删除 the file. If unsure → classify as ⚪ UNKNOWN. Never guess on deletions. After 应用rovals: 执行 清理up and write 状态/stack_清理up_YYYY-MM-DD.md confirming what was 移除d and what the before/after count was. Quick 扫描 (Sunday Cron 健康 检查)
Lighter weekly version — 运行s in 5 minutes:
检查 all scheduled tasks/crons are firing on schedule 检查 all PID files match 运行ning processes 检查 for any ERROR or FAILED in last 24h 记录s 输出: 状态/cron_健康_YYYY-MM-DD.md — just a pass/fAIl 列出, no detAIl Why This Matters