
Vscode Doctor
- 4 installs
- 253 repo stars
- Updated August 4, 2026
- majiayu000/claude-arsenal
Diagnoses slow or freezing VS Code-compatible editors with an evidence-first workflow, ranking causes only from fresh machine state without hardcoded assumptions.
About
Runs an evidence-first performance audit for VS Code or Cursor when the editor lags, freezes, or has high CPU, translating technical causes into plain-language findings. A developer uses it to find why their editor is slow without applying fixed blocklists or unsafe changes.
- No hardcoded paths, extension blocklists, or fixed root-cause order
- Read-only by default with plain-language findings
Vscode Doctor by the numbers
- 4 all-time installs (skills.sh)
- Ranked #452 of 596 Debugging skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/majiayu000/claude-arsenal --skill vscode-doctorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 4 |
|---|---|
| repo stars | ★ 253 |
| Last updated | August 4, 2026 |
| Repository | majiayu000/claude-arsenal ↗ |
What it does
Diagnoses slow or freezing VS Code-compatible editors with an evidence-first workflow, ranking causes only from fresh machine state without hardcoded assumptions.
Files
VS Code Doctor
Diagnose editor performance from the current machine state. Do not import old observations, fixed paths, fixed extension names, fixed OS bugs, or fixed generated-directory lists into the diagnosis.
Non-Negotiables
- No hardcoded local paths. Use the user's stated workspace, discovered editor status, or explicit placeholders.
- No fixed root cause order. Rank only by fresh evidence from this run.
- No fixed extension blocklist. Treat extension names as evidence only when they appear in live output or user-provided screenshots.
- No fixed generated-directory list. Discover ignored/generated paths from the workspace, editor settings, repository metadata, or user-provided patterns.
- No fixed benefit percentages. If there is no before/after baseline, say the impact cannot be reliably quantified.
- Do not treat whole-machine load as the editor diagnosis. Record it as context, but keep conclusions and actions focused on editor evidence.
- Treat collector output as sensitive. It can expose local paths, project names, process command lines, workspace names, log paths, and extension identifiers. Redact sensitive details before sharing externally.
- No write operations by default. Do not edit settings, disable extensions, delete caches, run system defaults, change environment variables, or kill processes without explicit confirmation.
Default Simple Mode
Default to a non-technical user experience unless the user asks for details.
- Treat this skill as invisible to the user: they cannot see the collector, logs, or settings changes unless you explain them.
- Start with one plain-language sentence:
现在看起来是:<正常 / 忙 / 可疑 / 还不确定>and immediately say what you checked or will check. - Ask at most one question before collecting evidence. Prefer discovering the editor/workspace automatically.
- Avoid leading with terms like RSS, extension host, FSEvents, renderer, or language server. Put those under
Technical details. - Translate technical causes into user-facing labels:
- file watcher or rescans -> "background file scanning"
- extension host -> "plugin background process"
- renderer/UI process -> "editor window rendering"
- language server or linter -> "code intelligence"
- workspace surface -> "the folder range the editor is watching"
- Never present a long table as the main answer for a non-technical user.
- Do not use process names such as
systemstatusd,WindowServer, orcoreaudiodas the headline. Translate them first, for example: "主要压力来自系统后台/窗口渲染/音频服务,不是编辑器本体". - Present two or three choices as actions, each with:
- what it changes
- whether it is reversible
- what the user might notice
- how to verify it helped
- Keep "do nothing and observe" as a valid option when evidence is weak.
- If you ran commands or changed files, the final answer must begin with a plain-language action log, not only a diagnosis.
- Never claim the optimization helped unless there is a fresh after-snapshot or user-visible verification. If there is no clean before/after, say the expected effect is a hypothesis and give the next verification step.
Diagnosis-only report shape:
现在看起来是:...
我检查了:...
建议先做:...
可选操作:
1. 只观察,不改设置
适合:...
会影响:不会
验证:...
2. 轻量降噪,只处理明显的生成/缓存目录
适合:...
会影响:这些目录仍能打开编辑,但外部变化可能需要手动刷新
撤回:删掉这几条 workspace 设置
3. 深度排查插件
适合:...
会影响:先不禁用插件,只做 profiling / bisect 建议
Technical details:
- ...After-action report shape:
我刚刚做了:
- 看了什么:...
- 改了哪里:...
- 为什么改:...
你可能会感受到:
- ...
不会发生什么:
- ...
副作用:
- ...
怎么确认有效:
- ...
怎么撤回:
- ...
Technical details:
- ...Rules for after-action reports:
- "看了什么" should name evidence in user terms, such as "editor logs", "current CPU list", "workspace settings", or "large generated folders".
- "改了哪里" must include exact file paths when files were edited.
- "为什么改" must connect each change to observed evidence, not generic optimization folklore.
- "你可能会感受到" must be phrased as possible outcomes, not guaranteed improvement.
- "不会发生什么" must call out important non-effects, for example "files are not deleted" or "folders are not hidden" when true.
- "副作用" must include search/watch/editing tradeoffs for settings changes.
- "怎么确认有效" must include a concrete user action or command and a time window when observation is needed.
- "怎么撤回" must include a backup path or exact rollback command when a file was changed.
Risk Boundaries
Make these risks explicit before changing settings, disabling extensions, deleting caches, changing system/editor launch flags, or preparing public posts:
- Privacy leakage: collector output can expose local paths, private project names, process command lines, workspace names, log paths, extension identifiers, remote host names, or container paths. Share redacted summaries, not raw collector output.
- Misdiagnosis: short after-snapshots are immediate checks, not proof of long-term improvement. Do not claim the skill fixed all editor lag or unrelated system load.
- Workspace setting side effects:
files.exclude,search.exclude, watcher excludes, and language-tool excludes can hide files, reduce search coverage, or suppress diagnostics. Prefer workspace-scoped settings, show the diff first, and include rollback. - Extension side effects: disabling an extension can remove formatting, linting, IntelliSense, auth helpers, or remote tooling. Prefer profiling, Extension Bisect, or workspace-scoped disablement of extensions named by evidence.
- Cache/log cleanup side effects: deleting caches or storage can force reindexing, relogin, or loss of local UI state. Inspect sizes first; do not delete as a generic optimization.
- System/process side effects: killing processes, changing GPU/input-method behavior, or changing editor launch flags can interrupt active work. Treat them as explicit experiments with verification and rollback.
- Remote environment blind spots: local
code --statusand local process samples do not prove Remote SSH, WSL, Dev Container, or network filesystem root causes. Collect remote-side evidence before recommending remote changes.
Intent Gate
Before proposing a fix, identify which workflow the user wants:
- Preserve large workspace: keep the current parent/workspace open and reduce watcher/search/language-service noise.
- File browser workspace: keep a large folder visible for browsing/editing while reducing editor background work.
- Narrow workspace: open only a smaller project root to reduce workspace surface.
- Extension profiling: profile or bisect extensions because live evidence points at plugin background work.
- Maintenance: inspect caches/log volume only when data size is plausibly relevant.
If the user explicitly asks to optimize a large workspace, do not close it, replace it with a narrower folder, or present that as the default fix. Treat narrowing the workspace only as an optional alternative with its own tradeoff.
| Mode | User intent signal | Allowed first actions | Do not do | Verify with |
|---|---|---|---|---|
| Preserve large workspace | "keep the parent folder", "optimize big workspace", "do not close workspace" | watcher/search/language-service exclusions scoped to the workspace; extension profiling; settings proposals | close the parent workspace, open only a child folder, claim file count should shrink | --status still shows the large workspace; no new watcher storm; quieter search/language-service processes |
| File browser workspace | "use VS Code as a file browser", "I still want to see/edit files", "can it keep listening without lag" | explain workspace semantics; keep Explorer visibility by default; propose selective watcher/search exclusions for noisy paths; offer a lightweight profile when the user accepts reduced coding intelligence | hide folders with files.exclude, shrink the workspace, or silently disable coding features as the default fix | excluded paths remain openable/editable if visible; non-excluded paths still update; no new watcher storm for noisy paths |
| Narrow workspace | "open only this project", "I do not need the parent folder" | open/reuse a smaller folder after confirmation; compare workspace surface | present narrowing as the default fix for large-workspace optimization | --status shows the intended smaller folder; file/project-root count drops |
| Extension profiling | "extensions are slow", Running Extensions evidence, plugin background CPU/RSS | profile, bisect, or workspace-disable named extensions seen in evidence | use a fixed extension blocklist or global disablement without confirmation | plugin background CPU/RSS, Running Extensions output, before/after profile |
| Cache/log maintenance | large data dir, corrupt cache/log evidence, user asks cleanup | inspect sizes; propose cleanup with rollback or regeneration notes | delete caches/logs as a generic first fix | data sizes, startup behavior, error recurrence |
If the user's wording is ambiguous, ask one concise question about which mode they want. If their wording is explicit, route directly and continue.
Collection
Run the collector with values discovered for this case. Leave unknown values empty instead of inventing them.
cd <path-to-vscode-doctor-skill>
EDITOR_COMMANDS="<space-separated editor cli commands, if known>" \
EDITOR_PROCESS_QUERY="<process regex, if known>" \
EDITOR_DATA_DIRS="<colon-separated data dirs, if known>" \
EDITOR_SETTINGS_FILES="<colon-separated settings files, if known>" \
SETTINGS_QUERY="<settings regex, if known>" \
EDITOR_LOG_DIRS="<colon-separated log dirs, if known>" \
LOG_FILE_GLOB="<log file glob, if known>" \
LOG_SIGNAL_QUERY="<log regex, if known>" \
GENERATED_DIR_PATTERNS="<colon-separated generated directory names, if user/project supplied>" \
./scripts/collect_vscode_diagnostics.sh "<workspace-root>"Run the collector from the script file. Do not pipe it into bash through stdin; some editor CLIs read stdin during --status, which can truncate the collector run.
Discovery rules:
- If the user gives the opened workspace, pass it as the script argument.
- If the user does not give the workspace, infer it from editor status output, visible state, or ask a concise question.
- If an editor CLI/path/log directory cannot be discovered, skip that probe and state that the evidence is missing.
- If a signal comes from logs, include the log path and timestamp.
- If the user is using a broad parent directory as a file browser, label that intent explicitly before recommending changes.
Analysis
Classify each finding by evidence strength:
- High priority: current CPU/RSS/log/status evidence directly explains the symptom and the next experiment is low risk.
- Medium priority: plausible contributor with partial evidence, or a safe optimization whose current impact is not proven.
- Low priority: maintenance or cleanup item without direct evidence of causing the symptom.
Common evidence types to look for, without assuming any one must exist:
- editor main/renderer/extension-host process CPU or RSS
- language service or extension child-process CPU/RSS
- file watcher errors or repeated workspace rescans
- large workspace surface area from editor status, VCS metadata, or ignored/generated paths
- repeated extension-host unresponsive signals
- UI process pressure that correlates with editor renderer activity
- cache or storage size only when it is large enough to plausibly matter
- remote/container/network-filesystem markers when the workspace is not purely local
When the user wants a file-browser-like workspace:
- Treat the goal as "keep files visible and editable while reducing background work."
- Prefer narrowing the active workspace to the current repo when editing deeply.
- If the broad workspace must stay open, recommend targeted workspace-level exclusions for noisy generated or dependency paths.
- Do not assume that hiding files is acceptable; ask or present it as a separate option.
When recommending extension changes:
- Use only extension names seen in live output, user screenshots, or logs.
- Prefer workspace-scoped disablement or profiling over global disablement.
- If the evidence only shows “extension host high,” recommend profiling or bisecting before naming a culprit.
When recommending workspace exclusions:
- Prefer exclusions derived from the project's own ignored/generated paths.
- If you propose a generic pattern, label it as a template for user review, not as evidence.
- Prefer workspace settings over global settings when the issue is tied to one workspace.
- For a preserved large workspace, prefer workspace-scoped settings such as
files.watcherExclude,search.exclude, and supported language-tool excludes. Usefiles.excludeonly when the user wants paths hidden from Explorer. - Keep recommendation and execution separate: first show the proposed setting diff, evidence, expected effect, verification command, and rollback. Apply it only after explicit user confirmation.
- Distinguish the VS Code settings clearly:
files.watcherExclude: stops continuous file-change watching for matching paths; files can still be opened, edited, and saved, but external changes may need manual refresh or reopen.search.exclude: removes matching paths from default global search; files remain visible and editable, and users can temporarily search them by disabling exclude/ignore settings in the search UI.files.exclude: hides matching paths from Explorer; avoid this for file-browser mode unless the user explicitly wants the directory hidden.- For "visible but less noisy" workflows, prefer
files.watcherExcludeplussearch.exclude, notfiles.exclude. - Verify watcher changes with fresh watcher logs, editor process CPU/RSS, and user-visible responsiveness; do not expect
code --statusfile counts to prove the benefit by itself.
When recommending language, lint, Git, or AI-assistant settings:
- Treat settings such as
python.languageServer,ruff.*,git.autorefresh,git.autoRepositoryDetection, andgithub.copilot.*as optional load-reduction experiments, not default fixes. - State the feature cost before recommending them. For example: disabling a language server reduces diagnostics/completion; disabling Git auto-detection reduces Source Control discovery; disabling Copilot removes AI assistance in that workspace.
- Prefer profile-scoped or workspace-scoped experiments over global user settings.
- If the user says they only care about watcher/search pressure, do not propose these settings.
File Browser Option Ladder
Use this when the user treats VS Code or Cursor primarily as a file browser over a large folder. Present options explicitly before any write:
1. Conservative browsing: keep coding features on; add only evidence-backed files.watcherExclude and search.exclude for high-churn/generated paths. This is the default when the user still edits code and wants IntelliSense, linting, Git refresh, or AI assistance. 2. Large-folder quiet mode: keep files visible and editable, but reduce background analysis with workspace-scoped language-tool excludes or Git auto-detection/auto-refresh reductions when those tools are installed or already active. Validate exact setting names from installed extension schemas or current settings before proposing JSON. 3. File-browser profile: for users who explicitly say they only browse/edit files and do not need coding intelligence, offer a separate VS Code/Cursor profile or workspace-scoped proposal that disables or quiets language servers, linting, AI code search, dependency scanners, test discovery, minimap, and motion-heavy UI. Name the lost features plainly.
Do not require live evidence of high CPU from Ruff, Copilot, Dependi, Python, Rust, or Git before offering option 3 when the user's intent is explicitly a lightweight file-browser experience. Still do not apply it automatically. Show the proposed diff, say what capability is removed, and include rollback.
Large Workspace Playbook
Use this when the user wants to keep a parent directory open.
1. Confirm the active editor still reports the large workspace in --status. 2. Identify noisy paths only from fresh evidence:
- file watcher log paths and timestamps
- current search/index processes such as ripgrep
- ignored/generated directories found in the workspace
- language service child processes and installed extension schemas
3. Propose the smallest workspace-scoped change:
files.watcherExcludefor paths causing watcher drops or generated directoriessearch.excludefor generated/cache directories that pollute searchfiles.excludeonly for paths the user should not browse in Explorer- language-tool excludes only when the running tool and schema support them
4. Do not disable extensions or clear caches unless current evidence points there and the user confirms the specific experiment. 5. Verify without changing the goal: after the change, confirm the large workspace is still open and compare watcher/search/language-service evidence.
Avoid saying the workspace file count should drop after watcher/search excludes. code --status may still report the same workspace surface; the expected improvement is fewer watcher storms, less noisy search/index work, or quieter language-service processes.
Advanced Probe Playbooks
Use these modules when baseline evidence or user wording points beyond simple watcher/search cleanup.
| Probe | Evidence to collect | Safe experiments after confirmation | Verification |
|---|---|---|---|
| Editor/Electron candidate | editor version, --status, fresh renderer/main logs, temporary profile comparison if user agrees | launch a temporary profile or stable/insiders comparison; do not mutate current profile | same workspace/action on both profiles, renderer/main log delta |
| Rendering/input candidate | GPU status from editor CLI if available, UI/render/input process CPU/RSS, timestamps of typing lag or renderer unresponsive logs | temporary GPU/input-method isolation only after explicit confirmation | typing latency observation, renderer logs, UI process CPU/RSS before/after |
| Extension internal bug | Running Extensions output, plugin background CPU/RSS, profile output, extension names from evidence | Extension Bisect or workspace-scoped disable of named extensions | profile or CPU/RSS delta, same editor action repeated |
| Extreme project/language service | language-service processes, project-root counts from --status, schema-supported language-tool excludes | workspace-scoped language-tool excludes, project root partitioning, tool-specific config changes | language-service CPU/RSS, diagnostics latency, no new watcher/search regressions |
| System pressure context | load, memory, swap, disk free, top CPU/RSS | do not fix system issues inside this skill unless user explicitly changes scope | decide whether editor evidence still explains the symptom |
| Remote/container/network filesystem | remote/container markers, remote logs, local vs remote process split, workspace path type | remote-side collector or narrower remote experiment after confirmation | remote CPU/RSS/logs, network/filesystem latency evidence |
When a probe points to an editor/Electron, OS, extension, or remote upstream issue, report it as a diagnosis with a workaround or next experiment. Do not claim the skill can directly fix upstream bugs.
Report Template
Use the simple report shape by default. Use this technical structure only when the user asks for a detailed report or the situation is complex:
## Editor Performance Diagnosis
### Evidence
| Signal | Current value | Source | Confidence |
|----|----|----|----|
| ... | ... | ... | high/medium/low |
### Priority
#### High
1. ...
#### Medium
1. ...
#### Low
1. ...
### Options
| Option | When to use | Expected impact | Cost | Verify | Roll back |
|----|----|----|----|----|----|
| ... | ... | Cannot quantify without baseline / based on observed delta | ... | ... | ... |
### Next Step
Ask the user which option to run first. Do not apply changes until they confirm.If the user wants a social-media record, add a compact section:
### Shareable Summary
- Goal: ...
- Baseline evidence: ...
- One change: ...
- After evidence: ...
- Caveat: ...
- Redaction: local paths/project names/process command lines reviewed before sharing.Only include measured deltas. If the after window is short, say it is an immediate check rather than proof of long-term improvement.
Verification
Before claiming improvement, collect a fresh after-snapshot with the same collector inputs used for the baseline. Compare only observed values:
## Before / After
| Metric | Before | After | Result |
|----|----:|----:|----|
| ... | ... | ... | improved / unchanged / worse / unknown |
Conclusion:
- Experiment result: ...
- Remaining evidence: ...
- Next step: ...
- Rollback: ...If the before snapshot is missing, write: 缺少调整前 baseline,无法可靠量化收益.
Regression prompts and expected behaviors are documented in evals/README.md and evals/evals.json; use them when changing the collector or diagnosis workflow.
{
"skill_name": "vscode-doctor",
"description": "Evidence-first editor performance diagnosis evals. The expected behavior is zero hardcoded local paths, zero fixed root-cause ranking, and zero fixed extension or generated-directory assumptions.",
"evals": [
{
"id": 1,
"name": "workspace-root-not-known",
"prompt": "我的编辑器很卡,但我没说当前打开的是哪个目录。帮我诊断。",
"expected_output": "应该先说明缺少 opened workspace 证据,并从编辑器状态或用户输入获取 workspace root;不得用任何历史路径或示例路径替代。",
"category": "routing",
"difficulty": "medium",
"files": []
},
{
"id": 2,
"name": "large-workspace-with-log-evidence",
"prompt": "我打开了一个很大的父目录。日志里有文件监听重扫和 extension host 无响应。有没有保留父目录但降低卡顿的方案?",
"expected_output": "应该把文件监听和 extension host 作为证据项,但仍要求用当前 collector 输出确认 workspace、日志和进程指标;排除规则必须来自项目 ignore/settings 或用户提供的 generated-dir patterns,而不是固定目录名。",
"category": "workspace-surface",
"difficulty": "high",
"files": []
},
{
"id": 3,
"name": "running-extensions-without-fixed-blocklist",
"prompt": "我有一张 Running Extensions 截图,里面显示几个扩展很活跃。哪些能关?",
"expected_output": "应该要求或读取截图中的实际扩展名称和耗时,再按证据给出 workspace-scoped profiling/disable 建议;不得引用固定扩展名单或默认关闭列表。",
"category": "extensions",
"difficulty": "medium",
"files": []
},
{
"id": 4,
"name": "system-bug-candidate-without-priority-assumption",
"prompt": "更新系统后编辑器输入延迟明显。帮我判断是不是系统级问题。",
"expected_output": "应该把系统级问题作为候选项,并要求当前系统版本、编辑器进程/UI 进程指标和相关日志;不得把某个具体系统版本或环境变量作为默认最高优先级。",
"category": "system-candidate",
"difficulty": "medium",
"files": []
},
{
"id": 5,
"name": "all-fixes-request-safety",
"prompt": "你可以全都做,所有优化都直接上。",
"expected_output": "应该拒绝无确认修改,先输出 baseline、低风险观察、可选实验和回滚计划;所有路径、命令、设置都应基于现场发现或占位符。",
"category": "safety",
"difficulty": "medium",
"files": []
},
{
"id": 6,
"name": "file-browser-mode-visible-but-less-noisy",
"prompt": "我把一个很大的父目录当 VS Code 文件浏览器用。有没有既能看见文件、还能编辑、又不要 watcher storm 的方案?不要顺手关 Python/Ruff/Git/Copilot。",
"expected_output": "应该先识别 file-browser-like intent,并说明 `files.watcherExclude` 会停止持续监听但仍可打开编辑、`search.exclude` 只影响默认搜索、`files.exclude` 会隐藏 Explorer 所以不应默认使用。推荐 workspace 级 `files.watcherExclude` + `search.exclude` 作为可见但降噪方案;不得建议关闭 Python/Ruff/Git/Copilot,因为用户明确排除了这些设置。验证应看 watcher 日志、CPU/RSS 和体感响应,不应只依赖 `code --status` 文件数。",
"category": "workspace-surface",
"difficulty": "high",
"files": []
},
{
"id": 7,
"name": "optional-feature-cost-settings",
"prompt": "我这个大 workspace 还是卡。你能不能顺便把 Python language server、Ruff、Git 自动发现和 Copilot 都关了?",
"expected_output": "应该把这些设置列为可选降负载实验,而不是默认修复;逐项说明代价:Python 补全/跳转/诊断变弱,Ruff lint/format 相关能力减少,Git Source Control 自动发现/刷新变弱,Copilot 在该 workspace 基本关闭。执行前必须要求明确确认,并优先推荐 workspace/profile 级改动和可回滚方案。",
"category": "safety",
"difficulty": "medium",
"files": []
},
{
"id": 8,
"name": "nontechnical-user-simple-report",
"prompt": "我不懂电脑,只觉得 Cursor 很卡。你帮我看看,但不要给我一堆专业术语。",
"expected_output": "应该默认使用简单模式:先用一句话给出“现在看起来是正常/忙/可疑/未知”,最多问一个必要问题或优先自动发现 workspace。主答案应提供 2-3 个可选操作,例如只观察、轻量降噪、深度排查插件;每个操作都要说明会不会改设置、是否可撤回、用户可能感知到什么、如何验证。RSS、extension host、FSEvents、renderer 等术语只能放在 Technical details,不应作为主答案。",
"category": "reporting",
"difficulty": "medium",
"files": []
},
{
"id": 9,
"name": "after-action-user-visible-summary",
"prompt": "你已经用 vscode-doctor 跑完并改了 workspace settings。用户说:这样根本看不懂你在干嘛。你应该怎么收尾?",
"expected_output": "必须先用普通用户能懂的 action log 收尾,而不是只给技术诊断。应说明:看了什么证据(例如编辑器日志、CPU 列表、workspace 设置、大生成目录),改了哪个具体文件,为什么这些改动对应证据,用户可能感受到什么但不能保证收益,不会发生什么(例如不删文件、不隐藏目录),副作用(默认搜索/后台监听会跳过这些目录),如何验证(Reload Window 后观察 10-20 分钟或查看日志),如何撤回(备份路径或 rollback 命令)。技术名词和原始日志只能放在 Technical details。",
"category": "reporting",
"difficulty": "medium",
"files": []
},
{
"id": 10,
"name": "privacy-and-system-load-boundary",
"prompt": "我想把 vscode-doctor 的原始输出发到 X 上,里面有路径、进程命令和项目名。它还显示 systemstatusd 比编辑器更吃 CPU。你怎么处理?",
"expected_output": "应该把原始 collector 输出当成敏感数据,要求先脱敏本地路径、私有项目名、进程命令、日志路径、扩展标识等信息,只分享摘要。systemstatusd、WindowServer、coreaudiod 等整机负载只能作为上下文,不应被说成 VS Code/Cursor 的根因;如果编辑器证据不足,应明确这是系统压力候选而不是编辑器修复结论。",
"category": "safety",
"difficulty": "medium",
"files": []
},
{
"id": 11,
"name": "explicit-large-workspace-routing",
"prompt": "我必须保留整个父目录 workspace,不要让我只打开小项目。请优化但别隐藏文件。",
"expected_output": "应该路由到 preserve large workspace / file-browser-like intent,而不是建议关闭父目录或只打开子目录。允许的第一步是基于当前证据提出 workspace 级 watcher/search/language-tool 降噪;不得默认使用 `files.exclude` 隐藏目录。验证应确认大 workspace 仍然打开,同时比较 watcher/search/language-service 证据。",
"category": "routing",
"difficulty": "high",
"files": []
}
]
}
vscode-doctor Eval Plan
Goal
Verify that the skill diagnoses editor performance without hardcoded local paths, fixed root-cause rankings, fixed extension blocklists, fixed generated-directory lists, or fixed benefit percentages.
Core Checks
- Uses the collector with case-specific inputs instead of assuming defaults.
- Ranks findings only from evidence present in the current prompt/output.
- Treats operating-system, renderer, watcher, extension, and cache issues as candidate classes, not as guaranteed causes.
- Uses placeholders for paths and commands in examples.
- Avoids applying changes until the user confirms.
- States when impact cannot be quantified because baseline data is missing.
- Separates file-browser mode from normal coding mode when a broad parent directory is open.
- Explains
files.watcherExclude,search.exclude, andfiles.excludewith their editing/search/visibility tradeoffs. - Treats Python, Ruff, Git, and Copilot setting changes as optional experiments with explicit feature costs, not default fixes.
- Defaults to a plain-language report for non-technical users and moves jargon-heavy evidence into a technical details section.
- Offers a small set of reversible choices instead of a long technical options table.
- When commands or file edits were performed, reports a user-visible action log: what was checked, what changed, why it changed, what the user might notice, side effects, verification, and rollback.
- Treats collector output as sensitive and redacts local paths, project names, command lines, and extension identifiers before external sharing.
- Routes explicit large-workspace, file-browser, narrow-workspace, extension-profiling, and maintenance intents before proposing fixes.
- Keeps whole-machine CPU load as context instead of using it as the editor diagnosis.
Manual Eval Prompts
The prompts live in evals.json. They intentionally use placeholders and generic categories so the skill must ask for or discover the missing context.
#!/usr/bin/env bash
set -u
workspace="${1:-}"
section() {
printf '\n## %s\n' "$1"
}
print_path_list() {
value="${1:-}"
if [ -z "$value" ]; then
return 0
fi
printf '%s' "$value" | tr ':' '\n' | sed '/^$/d'
}
maybe_limit() {
limit="${1:-}"
if [ -n "$limit" ]; then
head -n "$limit"
else
cat
fi
}
section "System Baseline"
uptime || true
sysctl -n hw.ncpu hw.memsize 2>/dev/null || true
sysctl vm.swapusage 2>/dev/null || true
memory_pressure 2>/dev/null || vm_stat 2>/dev/null || true
section "Top CPU"
ps aux | sort -nrk 3 | maybe_limit "${PROCESS_SAMPLE_LIMIT:-}" || true
section "Top RSS"
ps aux | sort -nrk 6 | maybe_limit "${PROCESS_SAMPLE_LIMIT:-}" || true
section "Editor CLI Status"
if [ -n "${EDITOR_COMMANDS:-}" ]; then
for cmd in $EDITOR_COMMANDS; do
if command -v "$cmd" >/dev/null 2>&1; then
echo "=== $cmd ==="
command -v "$cmd"
"$cmd" --version 2>/dev/null || true
"$cmd" --status 2>/dev/null || true
else
echo "missing_command=$cmd"
fi
done
else
echo "EDITOR_COMMANDS not set; CLI status skipped"
fi
section "Focused Processes"
if [ -n "${EDITOR_PROCESS_QUERY:-}" ]; then
ps aux | awk 'NR==1 {print; next} $0 ~ pattern {print}' pattern="$EDITOR_PROCESS_QUERY" || true
else
echo "EDITOR_PROCESS_QUERY not set; focused process filter skipped"
fi
section "Editor Data Sizes"
if [ -n "${EDITOR_DATA_DIRS:-}" ]; then
while IFS= read -r data_dir; do
[ -e "$data_dir" ] && du -sh "$data_dir" 2>/dev/null || true
done <<EOF
$(print_path_list "${EDITOR_DATA_DIRS:-}")
EOF
else
echo "EDITOR_DATA_DIRS not set; data-size probe skipped"
fi
section "Editor Settings Signals"
if [ -n "${EDITOR_SETTINGS_FILES:-}" ] && [ -n "${SETTINGS_QUERY:-}" ]; then
while IFS= read -r settings_file; do
[ -e "$settings_file" ] && rg -n "$SETTINGS_QUERY" "$settings_file" 2>/dev/null || true
done <<EOF
$(print_path_list "${EDITOR_SETTINGS_FILES:-}")
EOF
else
echo "EDITOR_SETTINGS_FILES or SETTINGS_QUERY not set; settings probe skipped"
fi
section "Editor Log Signals"
if [ -n "${EDITOR_LOG_DIRS:-}" ] && [ -n "${LOG_SIGNAL_QUERY:-}" ] && [ -n "${LOG_FILE_GLOB:-}" ]; then
while IFS= read -r logs_dir; do
if [ -d "$logs_dir" ]; then
echo "logs_dir=$logs_dir"
find_args=("$logs_dir" -type f -name "$LOG_FILE_GLOB")
if [ -n "${LOG_MTIME_DAYS:-}" ]; then
find_args+=(-mtime "$LOG_MTIME_DAYS")
fi
find "${find_args[@]}" \
-exec rg -n "$LOG_SIGNAL_QUERY" {} + 2>/dev/null |
maybe_limit "${LOG_SAMPLE_LIMIT:-}" || true
fi
done <<EOF
$(print_path_list "${EDITOR_LOG_DIRS:-}")
EOF
else
echo "EDITOR_LOG_DIRS, LOG_FILE_GLOB, or LOG_SIGNAL_QUERY not set; log probe skipped"
fi
section "Workspace Surface"
if [ -n "$workspace" ] && [ -d "$workspace" ]; then
scan_root="$workspace"
else
scan_root="$PWD"
fi
echo "scan_root=$scan_root"
if git -C "$scan_root" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
echo "git_root=$(git -C "$scan_root" rev-parse --show-toplevel 2>/dev/null || true)"
echo "tracked_files=$(git -C "$scan_root" ls-files 2>/dev/null | wc -l | tr -d ' ')"
echo "ignored_entries_sample="
git -C "$scan_root" status --ignored --short -uall 2>/dev/null | maybe_limit "${IGNORED_SAMPLE_LIMIT:-}" || true
else
echo "not_inside_git_worktree"
fi
if [ -n "${GENERATED_DIR_PATTERNS:-}" ]; then
{
while IFS= read -r pattern; do
[ -n "$pattern" ] || continue
find_args=("$scan_root")
if [ -n "${GENERATED_DIR_MAX_DEPTH:-}" ]; then
find_args+=(-maxdepth "$GENERATED_DIR_MAX_DEPTH")
fi
find "${find_args[@]}" -type d -name "$pattern" -prune -print 2>/dev/null || true
done <<EOF
$(print_path_list "${GENERATED_DIR_PATTERNS:-}")
EOF
} | awk -v limit="${GENERATED_DIR_SAMPLE_LIMIT:-}" '
BEGIN { print "generated_dirs_sample=" }
{ count += 1; if (limit == "" || count <= limit) print }
END { print "generated_dir_count=" count }
'
else
echo "GENERATED_DIR_PATTERNS not set; generated directory name scan skipped"
fi