auto-perf-optimize

Automates VS Code scenarios to capture heap snapshots and diagnose memory leaks.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/voidful/Aixlarity --skill auto-perf-optimize-voidful
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-perf-optimize
Source: https://github.com/voidful/Aixlarity/tree/main/aixlarity-ide/.github/skills/auto-perf-optimize
Command: npx skills add https://github.com/voidful/Aixlarity --skill auto-perf-optimize-voidful

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright-core, and includes scripts (resource) components.

What problem does it solve? Investigating memory leaks in VS Code requires manually repeating UI workflows, capturing heap snapshots, and verifying that the scenario actually ran — a slow, error-prone process. This Skill automates launching Code OSS, driving repeatable scenarios, sampling renderer memory, and producing verifiable evidence so leaks can be diagnosed and fixed. ## Core Features & Use Cases - Checked-in automation runners: Run multi-turn Chat memory smoke tests or chat-session-switching scenarios that launch Code OSS via Playwright over CDP, send prompts, sample heap, and write summary.json plus screenshots. - Targeted heap snapshot capture: Take labeled .heapsnapshot files at warmed-up baseline and later iterations instead of snapshotting every sample, keeping runs fast and comparable. - Verification before analysis: Inspect summary.json, chat turn counts, and screenshots to confirm the scenario actually executed before handing snapshots to heap-snapshot-analysis. - Fix-and-verify loop: Root-cause leaks with git blame and lifecycle tracing, patch product code, rerun the identical scenario, and compare like-for-like memory trends. - Use Case: A user suspects the Chat view leaks memory across turns. Run the chat-memory-smoke runner with 8 iterations and two snapshot labels, compare the snapshots, identify a growing service map, fix the disposal logic, and rerun to confirm flat memory. ## Quick Start Ask the agent to run the bundled Chat memory smoke runner with a few iterations and no heap snapshots to verify the scenario works end to end.

Frequently Asked Questions about auto-perf-optimize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a VS Code memory leak investigation?

Run the bundled chat-memory-smoke runner with a small iteration count and --no-heap-snapshots first to prove the scenario completes. Then rerun with targeted --heap-snapshot-label flags to capture a warmed-up baseline and a later iteration for comparison.

How do I capture heap snapshots from VS Code renderer?

The runners launch Code OSS with --enable-smoke-test-driver and a remote debugging port, connect Playwright over CDP, enable the HeapProfiler domain, force GC, and write labeled .heapsnapshot files under the run's heap/ folder.

Can I automate a non-Chat VS Code scenario?

Yes. Write a new scenario runner in the gitignored scratchpad folder using patterns from the checked-in scripts: launch Code OSS, connect via chromium.connectOverCDP, wait for workbench restore, and write an incremental summary.json.

Why should I avoid snapshotting every iteration?

Heap snapshots are huge and slow to capture, so snapshotting every sample wastes time and hides failures. Capture only a warmed-up baseline and a later iteration, since startup and first-use allocations are expected.

What should I check before analyzing heap snapshots?

Read the run's summary.json first: confirm no error field, expected chat turn counts, response text per turn, and that requested snapshot labels exist under heap/. Never analyze a failed login, trust prompt, or stuck UI state.

Is it safe to run Chat automation on my machine?

Runs execute on the real machine with real Copilot auth, so prompts trigger actual tool calls. Use a throwaway workspace via --workspace, stick to read-only commands, and keep seeded profiles inside ignored .build/ folders.