VS Code Performance Investigation Workflow
Automate repeatable VS Code scenarios and collect performance and memory evidence.
The document explicitly discloses execution on the real machine, full VS Code launch, reuse of user-data that may contain authentication secrets, and real LLM/tool side effects. It recommends throwaway workspaces, safe prompts, scoped cleanup, and avoiding destructive commands. However, the default workspace can still be the repository root, persistent profiles and Copilot/LLM calls remain high-impact, and there is no uniform per-action confirmation, isolation model, or complete rollback plan, so points are deducted.
The workflow includes no-snapshot smoke runs, screenshots, incremental summary.json, error fields, run verification, explicit cleanup, and diagnostic failure guidance. The main path is coherent, but this is a static review with no execution of scripts, dependencies, selectors, or cross-platform behavior; referenced helper skills and implementations are also not fully supplied. The score therefore remains below the static ceiling.
Use cases, non-fit cases, parameters, Chat versus non-Chat branches, and expected artifacts are reasonably clear. However, non-Chat investigations still require missing scenario details, and core operation depends on local Code OSS, Playwright, Electron, npm downloads, and Copilot authentication. Chinese-language interaction and mainland-China network reachability are not addressed, so points are deducted.
The documentation is well organized with progressive workflow sections, examples, profile guidance, safety notes, troubleshooting, directory conventions, and limitations. Repository material supplies MIT licensing, Microsoft attribution, and version information. The skill does not clearly state a maintainer, changelog, versioning policy, or update path, and its persistent-profile guidance conflicts with the supplied scratchpad README, so points are deducted.
The intended outputs—repeatable runs, screenshots, summary.json, heap samples, snapshots, and handoff for analysis—are concrete and useful for performance investigations. Nevertheless, success depends on execution in a suitable environment and on a separate heap-analysis skill; the supplied files contain no representative successful output for this revision. The instruction to fix product code and run all tests can also exceed a narrowly scoped investigation, so the static ceiling applies.
The repository includes chat performance and memory-leak CI workflows, providing some auditable execution evidence. Those workflows do not clearly cover every key path of this specific skill, and no revision-pinned run results or independent reproduction record is supplied. The score therefore stays below the static ceiling.
- Runs use a real VS Code instance and may send prompts to a real Copilot/LLM or execute tools; require an isolated disposable workspace and explicit user confirmation.
- Persistent user-data may contain authentication secrets; never upload or share it, and do not copy it while Code is running.
- The default workspace and instructions to modify product code and run all tests may expand scope; confirm target paths, change boundaries, and rollback before execution.
- Core operation depends on npm, Playwright, Electron downloads, and Copilot authentication; mainland-China network reliability is not established by the supplied material.
What it does & when to use it
This skill drives Code OSS through repeatable VS Code scenarios and collects performance, memory, and UI-verification evidence. It can run the bundled Chat memory smoke test, sample renderer heap usage, and produce screenshots, summary.json, and selected heap snapshots. When object-level investigation is needed, it hands the captured data to the generic heap-snapshot-analysis skill. It is intended for engineering investigations where the scenario must be proven to have completed before memory growth or leaks are analyzed.
Defines a warmup action, repeatable iteration, and quiescent sampling point; runs chat-memory-smoke.mts with Node.js or uses it as a pattern for a scratchpad runner; launches Code OSS and connects to it over CDP with Playwright; sends Chat prompts, waits for responses, samples renderer heap usage, and saves screenshots; writes summary.json, heap samples, and optional .heapsnapshot files; checks errors, response counts, response text, snapshot labels, and screenshots; and hands snapshots to heap-snapshot-analysis for comparisons and retainer-path analysis when required.
- A VS Code engineer suspects that repeated Chat conversations increase memory and needs a multi-turn run with warmed-up baseline and later heap snapshots.
- A developer needs to investigate a leak in a non-Chat VS Code workflow and wants to create a one-off runner, validate it without snapshots, and then capture targeted snapshots.
- An automation run may be stuck on authentication, workspace trust, progress UI, or the wrong workbench target, and the investigator needs Playwright snapshots and workspace-local screenshots to diagnose it.
- A suspected product-code leak has been fixed and the engineer needs to rerun the same scenario with the same snapshot labels for a like-for-like comparison.
Pros & cons
- Includes a runnable Chat memory smoke runner with a fast no-snapshot health check and targeted snapshot labels.
- Requires summary.json and screenshots to verify the scenario before heap analysis, reducing the risk of analyzing an incorrect UI state.
- Supports persistent profiles, temporary profiles, and seeded copies of logged-in profiles.
- Covers scenario design, runner development, artifact capture, verification, analysis handoff, and post-fix reruns.
- The repository source is licensed under MIT.
- Runs on the real machine: the Chat runner launches full Code OSS, sends prompts to a real LLM, and may execute real terminal commands or file edits through agent tool calls.
- Chat investigations may require Copilot authentication, and user-data directories can contain authentication secrets.
- Only the Chat runner is explicitly provided; non-Chat scenarios require a custom scratchpad runner.
- The source does not document a standalone installation flow, client registration procedure, or dedicated skill test suite.
- The frontmatter includes the Bash(npx @playwright/cli:*) tool-allowance syntax, so other clients may require adaptation.
How to install
The source does not provide a standalone installer or client registration procedure. First obtain the repository:
git clone https://github.com/microsoft/vscode.git
cd vscode
The skill is located at .github/skills/auto-perf-optimize/SKILL.md. Make that skill directory available according to the skill-directory rules of the Agent Skills client you use; the client-specific registration steps are not documented in the source.
How to use
From the repository root, run the Chat smoke test, for example:
node .github/skills/auto-perf-optimize/scripts/chat-memory-smoke.mts --iterations 3 --no-heap-snapshots
To capture selected post-warmup snapshots, run:
node .github/skills/auto-perf-optimize/scripts/chat-memory-smoke.mts --iterations 8 --heap-snapshot-label 03-iteration-01 --heap-snapshot-label 03-iteration-08
A request such as “launch VS Code, repeat this scenario, and investigate whether memory grows” can invoke the workflow. For a non-Chat scenario, specify the starting action, what counts as one iteration, how settled UI state is recognized, and whether the profile should be persistent or temporary. If snapshots already exist and only heap-object analysis is needed, use heap-snapshot-analysis directly.