Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/microsoft/vscode/chat-perfnpx skills add microsoft/vscode --skill chat-perfgit clone --depth 1 https://github.com/microsoft/vscodeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00051 | $0.04869 |
| Opus 5 | $0.00026 | $0.02434 |
| Sonnet 5 | $0.00010 | $0.00974 |
| Haiku 4.5 | $0.00005 | $0.00487 |
Grade A, and why
chat-perf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Chat Performance Testing
When to use
- Before/after modifying chat rendering code (
chatListRenderer.ts,chatInputPart.ts, markdown rendering) - When changing the streaming response pipeline or SSE processing
- When modifying disposable/lifecycle patterns in chat components
- To compare performance between two VS Code releases
- In CI to gate PRs that touch chat UI code
Quick start
# Run perf regression test (compares local dev build vs VS Code 1.115.0):
npm run perf:chat -- --scenario text-only --runs 3
# Run all scenarios with no baseline (just measure):
npm run perf:chat -- --no-baseline --runs 3
# Compare two local builds (apples-to-apples):
npm run perf:chat -- --build /path/to/build-A --baseline-build /path/to/build-B --runs 5
# Build a local production package and compare against a release:
npm run perf:chat -- --production-build --baseline-build 1.115.0 --runs 5
# Run memory leak check (10 messages in one session):
npm run perf:chat-leak
# Run leak check with more messages for accuracy:
npm run perf:chat-leak -- --messages 20 --verbose
Perf regression test
Script: scripts/chat-simulation/test-chat-perf-regression.js
npm: npm run perf:chat
Launches VS Code via Playwright Electron, opens the chat panel, sends a message with a mock LLM response, and measures timing, layout, and rendering metrics. By default, downloads VS Code 1.115.0 as a baseline, benchmarks it, then benchmarks the local dev build and compares.
You don't always need a baseline. A baseline exists only for comparison (regression detection). If you just want the current build's numbers — profiling a single change, capturing traces/heap snapshots, or iterating on a scenario — pass
--no-baselineto skip downloading and benchmarking the baseline entirely (roughly halves runtime). Baseline comparison is what turns raw measurements into a pass/fail verdict; without it you still get all the metrics, just no verdict.
Key flags
| Flag | Default | Description |
|---|---|---|
--runs <n> |
5 |
Runs per scenario. More = more stable. Use 5+ for CI. |
--scenario <id> / -s |
all | Scenario to test (repeatable). See common/perf-scenarios.js. |
--build <path|ver> / -b |
local dev | Build to test. Accepts path or version (1.110.0, insiders, commit hash). |
--baseline <path> |
— | Compare against a previously saved baseline JSON file. |
--baseline-build <path|ver> |
1.115.0 |
Version or local path to benchmark as baseline. |
--no-baseline |
— | Skip the baseline entirely — just measure the test build (no download, no comparison, ~2× faster). Use when you only need raw numbers, not a regression verdict. |
--save-baseline |
— | Save results as the new baseline (requires --baseline <path>). |
--resume <path> |
— | Resume a previous run, adding more iterations to increase confidence. |
--threshold <frac> |
0.2 |
Regression threshold (0.2 = flag if 20% slower). |
--production-build |
— | Build a local bundled package via gulp vscode for comparison against a release baseline. |
--no-cache |
— | Ignore cached baseline data, always run fresh. |
--force |
— | Skip build mode mismatch confirmation prompt. |
--ci |
— | CI mode: write Markdown summary to ci-summary.md (implies --no-cache, --heap-snapshots, --cleanup-diagnostics). |
--heap-snapshots |
— | Take heap snapshots after each run (slow; auto-enabled in --ci mode). |
--gc-object-stats |
— | GC deep-dives only. Enables V8 gc_stats tracing (per-type heap object dump on every GC). ⚠️ Corrupts all timing metrics — a major GC landing mid-request adds ~550ms — so never use it for benchmarking. Off by default; prefer heap snapshots for memory analysis. |
--cleanup-diagnostics |
— | Delete heap snapshots, CPU profiles, and traces to save disk. During runs, only the latest run's files are kept; after comparison, files for non-regressed scenarios are deleted. Auto-enabled in --ci mode. |
--setting <k=v> |
— | Set a VS Code setting override for all builds (repeatable). |
--test-setting <k=v> |
— | Set a VS Code setting override for the test build only. |
--baseline-setting <k=v> |
— | Set a VS Code setting override for the baseline build only. |
--verbose |
— | Print per-run details including response content. |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 320 lines · 51 tokens per session scan A e3cfcf62a9bd
chat-perf is a skill published in the GitHub repository microsoft/vscode (190,061 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 4,869 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
docx
使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。 三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容, (C) 应用模板格式化并通过 XSD 验证门控检查。 当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill—— 包括他们说"写一份报告"、"起草建议书"、"制作合同"、 "填写此表单"、"按此模板重新排版",或任何最终输出为 .docx 文件的任务。 即使用户未明确提及 "docx",如果任务暗示生成可打印/正式文档,也应使用此 skill。.
cyrene-plan-mode
当 Cyrene 处于 Plan Mode(计划模式),正在讨论、调查、细化或准备代码/文件改动的实施计划时使用。.
as-planning-and-task-breakdown
Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.
as-spec-driven-development
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when requirements are unclear, ambiguous, or only exist as a vague idea.
ecc-code-tour
Create CodeTour .tour files — persona-targeted, step-by-step walkthroughs with real file and line anchors. Use for onboarding tours, architecture walkthroughs, PR tours, RCA tours, and structured "explain how this works" requests.
ecc-codebase-onboarding
Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Use when joining a new project or setting up Claude Code for the first time in a repo.