Token导航 LogoToken导航TokenDH.com
开发权限需确认github未标认证来源可访问许可证需确认审计通过

openclaw-test-heap-leaksOpenClaw 测试 heap leaks

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

2,584

周安装

111

GitHub Stars

366,434

下载量

906
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openclaw-test-heap-leaks(OpenClaw 测试 heap leaks)
来源仓库:https://github.com/steipete/clawdis
仓库路径:skills/openclaw-test-heap-leaks
安装命令:
npx skills add https://github.com/steipete/clawdis --skill openclaw-test-heap-leaks
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/steipete/clawdis --skill openclaw-test-heap-leaks

简介

用于辅助测试设计、自动化测试、用例整理和回归验证,适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。

  • 使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。
  • 它可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 可通过 npx skills add 命令从 GitHub 仓库安装。
  • openclaw-test-heap-leaks 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

OpenClaw Test Heap Leaks

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.

Workflow

  1. Reproduce the failing shape first.

- Match the real entrypoint if possible. For Linux CI-style unit failures, start with: - pnpm canvas:a2ui:bundle && OPENCLAW_TEST_MEMORY_TRACE=1 OPENCLAW_TEST_HEAPSNAPSHOT_INTERVAL_MS=60000 OPENCLAW_TEST_HEAPSNAPSHOT_DIR=.tmp/heapsnap OPENCLAW_TEST_WORKERS=2 OPENCLAW_TEST_MAX_OLD_SPACE_SIZE_MB=6144 pnpm test - Keep OPENCLAW_TEST_MEMORY_TRACE=1 enabled so the wrapper prints per-file RSS summaries alongside the snapshots. - If the report is about a specific shard or worker budget, preserve that shape. - Before you analyze snapshots, identify the real lane names from [test-parallel] start... lines or pnpm test --plan. Do not assume a single unit-fast lane; local plans often split into unit-fast-batch-*.

  1. Wait for repeated snapshots before concluding anything.

- Take at least two intervals from the same lane. - Compare snapshots from the same PID inside the real lane directory such as .tmp/heapsnap/unit-fast-batch-2/. - Use .agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs to compare either two files directly or the earliest/latest pair per PID in one lane directory. - If the helper suggests transformed-module retention, confirm the top entries in DevTools retainers/dominators before calling it solved.

  1. Classify the growth before choosing a fix.

- If growth is dominated by Vite/Vitest transformed source strings, Module, system / Context, bytecode, descriptor arrays, or property maps, treat it as likely retained module graph growth in long-lived workers. - If growth is dominated by app objects, caches, buffers, server handles, timers, mock state, sqlite state, or similar runtime objects, treat it as a likely cleanup or lifecycle leak. - If the names are ambiguous, stop short of a confident label and inspect retainers/dominators in DevTools for the top deltas.

  1. Fix the right layer.

- For likely retained transformed-module growth in shared workers: - Prefer timing and hotspot-driven scheduling fixes first. Check whether the file is already represented in test/fixtures/test-timings.unit.json and whether scripts/test-update-memory-hotspots.mjs should refresh the measured hotspot manifest before hand-editing behavior overrides. - Move hotspot files out of the real shared lane by updating test/fixtures/test-parallel.behavior.json only when timing-driven peeling is insufficient. - Prefer singletonIsolated for files that are safe alone but inflate shared worker heaps. - If the file should already have been peeled out by timings but is absent from test/fixtures/test-timings.unit.json, call that out explicitly. Missing timings are a scheduling blind spot. - For real leaks: - Patch the implicated test or runtime cleanup path. - Look for missing afterEach/afterAll, module-reset gaps, retained global state, unreleased DB handles, or listeners/timers that survive the file.

  1. Verify with the most direct proof.

- Re-run the targeted lane or file with heap snapshots enabled if the suite still finishes in reasonable time. - If snapshot overhead pushes tests over Vitest timeouts, fall back to the same lane without snapshots and confirm the RSS trend or OOM is reduced. - For wrapper-only changes, at minimum verify the expected lanes start and the snapshot files are written.

Heuristics

  • Do not call everything a leak. In this repo, large unit-fast or unit-fast-batch-* growth can be a worker-lifetime problem rather than an application object leak.
  • scripts/test-parallel.mjs and scripts/test-parallel-memory.mjs are the primary control points for wrapper diagnostics.
  • The lane names printed by [test-parallel] start... and [test-parallel][mem] summary... tell you where to focus.
  • When one or two files account for most of the delta and they are missing from timings, reducing impact by isolating them is usually the first pragmatic fix.
  • When the same retained object families grow across multiple intervals in the same worker PID, trust the snapshots over intuition, then confirm ambiguous calls with retainer evidence.

Snapshot Comparison

  • Direct comparison:

- node.agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs before.heapsnapshot after.heapsnapshot

  • Auto-select earliest/latest snapshots per PID within one lane:

- node.agents/skills/openclaw-test-heap-leaks/scripts/heapsnapshot-delta.mjs --lane-dir.tmp/heapsnap/unit-fast-batch-2

  • Useful flags:

- --top 40 - --min-kb 32 - --pid 16133

Read the top positive deltas first. Large positive growth in module-transform artifacts suggests lane isolation; 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.

Output Expectations

When using this skill, report:

  • The exact reproduce command.
  • Which lane and PID were compared.
  • The dominant retained object families from the snapshot delta.
  • Whether the issue is a likely real leak or likely shared-worker retained module growth, plus whether retainers/dominators confirmed it.
  • The concrete fix or impact-reduction patch.
  • What you verified, and what snapshot overhead prevented you from verifying.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.78%
按下载量换算315

Claude

30.3%
按下载量换算275

Cursor

19.74%
按下载量换算179

Gemini CLI

8.4%
按下载量换算76

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills