auto-perf-optimize

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

1|Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Niiihuel/openide --skill auto-perf-optimize-niiihuel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: auto-perf-optimize
Source: https://github.com/Niiihuel/openide/tree/main/vscode/.github/skills/auto-perf-optimize
Command: npx skills add https://github.com/Niiihuel/openide --skill auto-perf-optimize-niiihuel

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Investigating memory leaks in VS Code requires repeatable scenario automation, reliable heap snapshot capture, and verified run evidence — doing this manually is slow, error-prone, and hard to reproduce. ## Core Features & Use Cases - Scenario Automation: Launch Code OSS with Playwright over CDP, drive repeatable UI workflows, and capture screenshots, summary.json, and renderer heap samples. - Checked-in Runners: Use bundled runners like chat-memory-smoke.mts and chat-session-switch-smoke.mts for multi-turn chat and session-switching memory probes with targeted heap snapshot labels. - Fix and Verify Loop: Compare before/after snapshots via the heap-snapshot-analysis skill, make root-cause product-code fixes, and rerun identical scenarios to confirm memory stays flat. - 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 heapsnapshots, identify the retaining service, fix the disposal logic, and rerun to verify. ## Quick Start Ask the agent to run the chat memory smoke runner with a few iterations and no heap snapshots to validate the scenario, then capture targeted heap snapshots for leak analysis.

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 with automation?▼

Run the bundled chat-memory-smoke.mts runner with a small iteration count and --no-heap-snapshots first to validate the scenario. Once reliable, rerun with targeted --heap-snapshot-label flags to capture baseline and later-iteration snapshots for comparison.

How to capture heap snapshots from a running VS Code instance?▼

Launch Code OSS with --enable-smoke-test-driver and a known remote-debugging port, connect Playwright via chromium.connectOverCDP, enable the CDP HeapProfiler domain, force garbage collection, and write .heapsnapshot files at labeled checkpoints.

Can I reuse a logged-in VS Code profile across automation runs?▼

Yes, the default persistent profile at .build/auto-perf-optimize/user-data retains Copilot auth across runs. You can also pass --seed-user-data-dir to copy a logged-in profile into a fresh target, as long as the seed Code window is closed.

Why should I avoid taking heap snapshots on every iteration?▼

Heap snapshots are large and slow to capture, often gigabytes each. The recommended practice is to snapshot only a warmed-up baseline and a later iteration, since startup and first-use allocations are expected and not leak evidence.

When should I use heap-snapshot-analysis instead of this skill?▼

Use heap-snapshot-analysis directly when .heapsnapshot files already exist and you only need object grouping, retainer paths, or snapshot comparison. This skill is for driving scenarios and producing the snapshots, not analyzing them.