VS Code Hygiene Checks
Catch VS Code commit-blocking style and hygiene issues before the work is declared complete.
The skill only invokes a repository-local hygiene script against staged files, with no evidence of credential theft, covert exfiltration, or malicious dependencies. It does not disclose data flow, user confirmation, permission boundaries, or rollback behavior, so points are deducted.
The commands, script path, and staged-file scope are internally consistent, and package.json exposes the referenced script. However, this is a static-only review with no skill-specific tests, abnormal-input handling, or clearly documented diagnostic behavior, so the score remains conservative.
The trigger scenario and main checks are clear for VS Code contributors before committing. Non-fit cases, workflow boundaries, failure-repair guidance, and Chinese-language usage support are not specified, so points are deducted. The core function does not depend on an overseas online service.
The document is readable and includes execution commands, a direct-file example, and a check summary. It lacks skill versioning, changelog, maintenance ownership, update path, FAQ, dependency-installation notes, and fuller limitation disclosure, so points are deducted. Repository evidence supplies MIT licensing and Microsoft attribution.
It can guide users to run the pre-commit hygiene check, and the command matches the repository script. However, expected output and remediation steps are not explained; failures still require substantial user diagnosis, and comparative benefit over manual checking is not evidenced, so points are deducted.
The instructions are auditable against package.json and the referenced repository hygiene script. No skill-specific tests, CI coverage, or independently reproducible execution evidence is supplied, so the static evidence is limited and points are deducted.
- The skill executes a repository script but does not document its full side effects, data flow, or required permissions; review build/hygiene.ts before first use.
- It requires running the check before declaring work complete but does not explain failure output, remediation, or how files outside the staged set are handled.
- This static review did not execute the command and cannot confirm runtime behavior for the assessed revision.
What it does & when to use it
Hygiene is the skill at `.github/skills/hygiene/SKILL.md` in the microsoft/vscode repository. It guides agents through VS Code's pre-commit hygiene check while changing code. The check scans staged files, or a specified file path, for repository rules covering Unicode, quoting, copyright headers, indentation, formatting, ESLint, and stylelint. It is best suited to contributors working inside the VS Code source tree, not as a standalone quality platform with its own documented installer.
It instructs the user to run npm run precommit, which executes node --experimental-strip-types build/hygiene.ts and scans staged files obtained from git diff --cached. It also supports direct checks with node --experimental-strip-types build/hygiene.ts path/to/file.ts. The checks reject non-ASCII Unicode characters, reserve double-quoted strings for externalized localized strings, require Microsoft copyright headers, require tabs for indentation, verify TypeScript formatting, run ESLint on TypeScript files, and run stylelint on CSS files. A failed hygiene check causes the Git commit to be rejected.
- A VS Code contributor who has staged source changes can run the full pre-commit hygiene check before committing.
- A developer who wants to inspect one TypeScript file before staging it can pass that file path directly to the hygiene script.
- A contributor investigating a rejected commit can use the listed checks to locate Unicode, quoting, header, indentation, formatting, ESLint, or stylelint problems.
- A developer changing CSS in the VS Code source tree can run the check before committing to catch stylelint failures.
Pros & cons
- Covers several commit-relevant rules, including Unicode, quoting, copyright headers, indentation, formatting, ESLint, and stylelint.
- Supports both complete staged-file checks and direct checks of individual files.
- Explicitly places the check before declaring work complete, helping catch issues that would block a commit.
- It is tailored to the VS Code repository, its `build/hygiene.ts` script, and its development conventions rather than being a general-purpose checker for any project.
- It depends on Node.js, npm, Git, and repository-provided build scripts; no standalone package is documented.
- The default command scans staged files only, so unstaged changes are excluded.
- The SKILL.md does not document a test suite, cross-platform validation, or automatic remediation of failures.
How to install
The skill is located at .github/skills/hygiene/SKILL.md in the repository. The source does not document a standalone installation command, a target client skills directory, or separate packaging; provide the containing skill folder to an Agent Skills-compatible client. The repository source is available under the MIT license.
How to use
After making changes in the VS Code repository and staging the files, run:npm run precommit
This command scans staged files only. To check a specific file without staging it first, run:node --experimental-strip-types build/hygiene.ts path/to/file.ts
A suitable agent request is: “Run the VS Code hygiene check before declaring the work complete, and fix any reported issues.”