检查1Password命令行工具的安装和认证,将已保存的密码或API密钥传入命令及配置。支持桌面应用集成、服务账号和交互式登录,并先验证访问权限。
- 安装1Password命令行工具
- 将API密钥传入命令
- 在CI中使用服务账号认证
调查OpenClaw测试中的内存增长和内存不足,比较测量结果与内存对象记录,区分实际释放遗漏和测试进程保留的模块,并验证修复效果。
Investigate OpenClaw pnpm test memory growth, Vitest OOMs, RSS spikes, and heap snapshot deltas.
此技能调查OpenClaw测试中的内存增长,以及Vitest因内存不足而失败的问题。它会复现实际运行条件,测量内存用量,并比较内存分配记录和堆快照,即内存中对象的记录。通过这些证据,区分应用未释放对象造成的泄漏与测试进程保留已加载模块的情况,再针对原因修复并重新验证。
适合测试持续运行后内存不断增长,或仅在特定配置、并行执行数量下失败的情况。对于长时间运行的处理逻辑,也会使用专门的验证程序,检查修复后函数保留的状态是否得到释放。
依赖OpenClaw的pnpm命令、附带脚本和Vitest配置,并参阅相关的openclaw-test-performance资料。详细检查记录时使用DevTools。不能仅凭整个进程的内存用量或对象名称对应数量的增加,就断定存在内存泄漏。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。
总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月19日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Use this skill for test-memory investigations. Do not guess from RSS alone when heap snapshots are available. Treat snapshot-name deltas as triage evidence, not proof, until retainers or dominators support the call.
Read ../openclaw-test-performance/SKILL.md first for the current test-performance commands and proof routing.
For runtime fixes (e.g., closure leaks in long-running services like the gateway), see Validating runtime fixes below — that uses a dedicated harness rather than the unit-test profiling workflow.
Reproduce the failing shape first.
Match the real entrypoint and worker budget. For a broad unit-fast baseline with per-config max RSS and top-file timing, start with:
pnpm test:perf:groups \
--config test/vitest/vitest.unit-fast.config.ts \
--allow-failures \
--output .artifacts/test-perf/unit-fast-memory.json
For a suspected file, rerun that file with one worker and collect wall/RSS evidence: /usr/bin/time -l pnpm test <file> --maxWorkers=1 --reporter=verbose.
Current pnpm test execution is planned by scripts/test-projects.mts. Record the printed Vitest config or shard and preserve that shape when the report is configuration- or worker-budget-specific.
Collect the strongest available heap evidence.
pnpm test:perf:profile:runner -- --output-dir .artifacts/test-perf/vitest-runner-profile -- <file> for a CPU profile plus a sampling heap profile of the unit runner. Open the heap profile in DevTools and inspect the largest allocation families..heapprofile output is not a .heapsnapshot; do not pass it to the snapshot delta helper..heapsnapshot files, compare snapshots from the same PID with .agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs.Classify the growth before choosing a fix.
Module, system / Context, bytecode, descriptor arrays, or property maps, treat it as likely retained module graph growth in long-lived workers.Fix the right layer.
scripts/test-projects.test-support.mjs. Fix process lifetime or project ownership there only when the same-shape evidence shows that shared-worker retention is the cause.test/vitest/vitest.unit-fast-isolated.config.ts is for audited stateful tests that need a fresh module graph. Do not use it as a generic memory-hotspot list.afterEach/afterAll, module-reset gaps, retained global state, unreleased DB handles, or listeners/timers that survive the file.Verify with the most direct proof.
scripts/test-projects.mts, scripts/test-group-report.mts, and scripts/run-vitest-profile.mts are the current execution, grouped-RSS, and profile entrypoints.[test] starting ... lines identify the Vitest config or shard to reproduce..artifacts/vitest-shard-timings.json stores config/shard durations for scheduling. It is not a file-level memory-hotspot or behavior manifest.node .agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs before.heapsnapshot after.heapsnapshotnode .agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs --lane-dir <snapshot-directory>--top 40--min-kb 32--pid 16133Read the top positive deltas first. Large positive growth in module-transform artifacts points to shared-process lifetime or project ownership; large positive growth in runtime objects suggests a real leak. If the names alone do not settle it, open the same snapshot pair in DevTools and inspect retainers/dominators for the top rows before declaring root cause.
The workflow above is for diagnosing Vitest worker memory growth. For validating that a runtime/closure fix actually releases captured state, use the dedicated harness:
pnpm leak:embedded-run — runs scripts/embedded-run-abort-leak.ts. Loops N
aborted runs in a function-shaped scope mimicking runEmbeddedAttempt,
writes heap snapshots, and reports a PASS/FAIL verdict on retention growth
using FinalizationRegistry for tracked-instance counting plus RSS delta.Modes:
closure-extracted (default) — production fix shape (helper at module scope).closure-inline — pre-fix shape (closure inside the runner scope). Use as a
sensitivity check: if it passes you've broken the harness, not fixed a bug.synthetic-leak — deliberately retains via a module-level bucket. Use to
confirm the harness can detect leaks before trusting a PASS on a real fix.Snapshots land in .tmp/embedded-run-abort-leak/. Diff with the same script
as above:
node .agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs \
.tmp/embedded-run-abort-leak/baseline-*.heapsnapshot \
.tmp/embedded-run-abort-leak/batch-N-*.heapsnapshot --top 30
When fixing a different runtime leak, add a new harness alongside this one rather than retrofitting it. The fixture function should mimic the lexical scope of the function where the leak lives, not be a generic abort-loop.
When using this skill, report:
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
检查1Password命令行工具的安装和认证,将已保存的密码或API密钥传入命令及配置。支持桌面应用集成、服务账号和交互式登录,并先验证访问权限。
将提交给OpenClaw的自然语言请求转交给Claude Code等外部编程智能体,通过ACP或acpx启动、继续会话,并保留对话上下文。
为OpenClaw添加模型服务商,并通过实际回复验证连接。凭据以环境变量或文件引用的形式配置,同时验证设置并报告测试结果。
将AI代理的工作日志整理为可附在GitHub拉取请求或议题中的记录,筛选相关内容、移除敏感信息,并支持预览及经单独授权后的发布。
通过代理管理macOS上的Apple Notes笔记,支持创建、查看、搜索、编辑和删除,在文件夹之间移动笔记,并将选定笔记导出为HTML或Markdown。
通过Mac查看、添加和编辑Apple Reminders中带截止时间的待办事项,管理列表并完成或删除任务,整理在iPhone或iPad上查看的个人任务。