auto-perf-optimize

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

10|1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill auto-perf-optimize-kevinhuangislearning
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: auto-perf-optimize
Source: https://github.com/KevinHuangIsLearning/shortestpath-ide/tree/main/.github/skills/auto-perf-optimize
Command: npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill auto-perf-optimize-kevinhuangislearning

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Investigating memory leaks or performance regressions in VS Code requires manually repeating UI workflows and capturing heap snapshots, which is slow, error-prone, and hard to reproduce. This Skill automates launching Code OSS, driving repeatable scenarios, and collecting verifiable memory artifacts. ## Core Features & Use Cases - Automated scenario runners: Checked-in Playwright-based runners drive multi-turn Chat sessions, session switching, and workbench CSS performance measurement while sampling renderer heap. - Targeted heap snapshot capture: Take labeled .heapsnapshot files at warmed-up baselines and later iterations, with screenshots and a machine-readable summary.json for verification. - Fix-and-verify workflow: Guides root-cause analysis with git history, product-code fixes, and like-for-like rerun comparisons to confirm leaks are resolved. - Use Case: You suspect the Chat view leaks memory across turns. Run the chat memory smoke runner with 8 iterations and two snapshot labels, verify the summary, then hand the snapshots to heap-snapshot-analysis to find retained objects. ## Quick Start Ask the agent to run the bundled Chat memory smoke runner with a few iterations and no heap snapshots to validate the scenario before capturing targeted heap snapshots.

Frequently Asked Questions about auto-perf-optimize

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

FAQPage Schema
How do I investigate a VS Code memory leak automatically?▼

Run a scenario runner that launches Code OSS with the smoke test driver, repeats the suspected leaking workflow, and captures labeled heap snapshots. Verify summary.json and screenshots first, then compare snapshots with the heap-snapshot-analysis skill.

How do I run the Chat memory smoke runner?▼

Run node .github/skills/auto-perf-optimize/scripts/chat-memory-smoke.mts with --iterations and optionally --heap-snapshot-label flags. Start with --no-heap-snapshots for a fast validation pass before capturing full snapshots.

Can I write a custom VS Code automation scenario?▼

Yes, write new scenario runners in the gitignored scratchpad folder inside a dated subfolder, copying patterns from the checked-in scripts. Validate with --no-heap-snapshots first, then capture targeted snapshots once the runner is reliable.

Why should I avoid heap snapshots on the first run?▼

Heap snapshots are huge and slow, so a broken runner plus a 2GB snapshot wastes time and hides the real failure. Validate the scenario with --no-heap-snapshots until it completes reliably, then capture targeted labeled snapshots.

When should I not use this skill?▼

Do not use it when heap snapshots already exist and you only need object or retainer analysis. In that case use the heap-snapshot-analysis skill directly for comparison scripts, object grouping, and GC root paths.