Investigate test memory growth, heap leaks, and OOM root causes.
The material indicates a prompt/document-style skill for test memory investigations, with no required secrets and no declared remote endpoints, from a highly starred open-source GitHub repository, so overall risk is low. The README includes local commands and script paths, but in this material they appear to be guidance rather than built-in execution capability; the main caution is that it may lead users to interact with local test data and scripts.
The material explicitly states that no keys or environment variables are required. It does not request API tokens, account credentials, or other sensitive secrets, and shows no obvious credential collection or abuse path.
No remote endpoints are declared, and the content focuses on local test memory snapshot analysis. There is no indication that user data is sent to external services.
The README includes `pnpm test`, build commands, and local script paths, indicating usage may involve running tests/scripts on the local machine. This is a normal developer-tool capability, and the material does not show extra privileged execution or covert system actions.
The skill is aimed at heap snapshots and test artifact investigation, involving reading local project test outputs and writing snapshots to directories such as `.tmp/heapsnap`. This is normal for this type of diagnostic tool, and no excessive access beyond its purpose is indicated.
The source is an open-source GitHub repository with extremely strong community adoption (about 377k stars), providing good auditability and source trust. The license and maintenance status are not clearly stated, which is a minor information gap but not enough on its own to raise the risk level.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "openclaw-test-heap-leaks" skill from askskill: 1. Download https://raw.githubusercontent.com/openclaw/openclaw/main/.agents/skills/openclaw-test-heap-leaks/SKILL.md 2. Save it as ~/.claude/skills/openclaw-test-heap-leaks/SKILL.md 3. Reload skills and tell me it's ready
Help me analyze OpenClaw memory growth during pnpm test. Use RSS trends, heap snapshot diffs, and possible test isolation issues to identify likely leak sources, validation steps, and fix recommendations.
A diagnostic report with suspected leak points, supporting evidence, reproduction and validation steps, and concrete fix directions.
I have two Node.js heap snapshots from before and after tests. Compare object types with large retained size growth and determine which may be unreleased module caches, event listeners, or global state.
An interpretation of heap snapshot differences highlighting abnormal object growth and likely code origins.
Based on OpenClaw's current test execution setup, propose optimizations to reduce RSS peaks and prevent Vitest OOMs, covering concurrency, test splitting, resource cleanup, and debugging flags.
An actionable optimization checklist prioritized by expected impact, implementation approach, and risks.
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.
For runtime fixes (e.g., closure leaks in long-running services like the gateway), see Validating runtime fixes below — that uses a dedicated harness, not the test-parallel snapshot machinery.
Reproduce the failing shape first.
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 testOPENCLAW_TEST_MEMORY_TRACE=1 enabled so the wrapper prints per-file RSS summaries alongside the snapshots.[test-parallel] start ... lines or pnpm test --plan. Do not assume a single unit-fast lane; local plans often split into unit-fast-batch-*.Wait for repeated snapshots before concluding anything.
.tmp/heapsnap/unit-fast-batch-2/..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.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.
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.test/fixtures/test-parallel.behavior.json only when timing-driven peeling is insufficient.singletonIsolated for files that are safe alone but inflate shared worker heaps.test/fixtures/test-timings.unit.json, call that out explicitly. Missing timings are a scheduling blind spot.afterEach/afterAll, module-reset gaps, retained global state, unreleased DB handles, or listeners/timers that survive the file.Verify with the most direct proof.
…
Fetch GitHub issues, create fixes, open PRs, and handle reviews.
Convert text to speech locally and offline with sherpa-onnx, no cloud needed.
Regenerate OpenClaw release changelog sections from Git history before releases.
Prepare and verify OpenClaw stable or beta releases and release notes.
Automate web page workflows, login checks, tab handling, and recovery steps.
Verify an OpenClaw release is fully published and working across all channels.
Analyze and optimize OpenClaw test performance, memory use, and coverage slowdowns.
Deeply review code and fix only small, high-confidence OpenClaw bugs.
Refactor OpenClaw docs pages with source-checked preservation, clearer structure, and verification.
Find and fix small high-confidence OpenClaw bugs ready to land.
Choose and run the safest, cheapest OpenClaw test and validation path.
Review, triage, and manage OpenClaw issues and pull requests faster.