vscode: Skill for Claude Code

.github/skills/unit-tests/SKILL.md

unit-tests is a skill for Claude Code, Codex from microsoft/vscode. It costs 50 tokens per session (1,050 once invoked), scanned A, original, MIT.

A guide for running VS Code unit tests, which test small parts of the application in isolation. It covers the preferred test runner and the platform-specific fallback scripts.

In plain words
What is it for?
Use it to run tests by file or name, filter test cases, collect coverage, or debug unit-test failures on macOS, Linux, or Windows.
Why use it?
It helps run only the relevant test files or test cases and provides a consistent way to investigate failures.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

This is microsoft/vscode's own configuration. It tells Claude Code and Codex how to work on vscode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vscode configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/test.sh src/vs/editor/test/common/model.test.ts.

About the project

Visual Studio Code is a code editor that supports editing, navigating, understanding, debugging, and extending software projects. Developers use it for the edit-build-debug cycle, and the catalogue add-ons provide skills, instructions, and agents for working within the editor.

microsoft/vscode · 193,657 stars · on GitHub · code.visualstudio.com

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/vscode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/unit-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/vscode

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unit-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/vscode/unit-tests/github.svg)](https://agentmods.dev/skills/microsoft/vscode/unit-tests)
Your own site
<a href="https://agentmods.dev/skills/microsoft/vscode/unit-tests"><img src="https://agentmods.dev/badge/skills/microsoft/vscode/unit-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unit-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/vscode/unit-tests"><img src="https://agentmods.dev/badge/skills/microsoft/vscode/unit-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,050 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 6 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01050
Opus 5.5 $0.00020 $0.00420
Sonnet 5.5 $0.00010 $0.00210
Haiku 4.5 $0.00005 $0.00105

Measured yesterday against content hash 51f4ab83806f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unit-tests 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.

.github/skills/unit-tests/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Running Unit Tests

Preferred: Use the runTests tool

If the runTests tool is available, prefer it over running shell commands. It provides structured output with detailed pass/fail information and supports filtering by file and test name.

  • Pass absolute paths to test files via the files parameter.
  • Pass test names via the testNames parameter to filter which tests run.
  • Set mode="coverage" to collect coverage.

The tool runs tests discovered by VS Code's registered test controllers; it does not compile the repository or invoke a shell test command. If discovery is unavailable, pending, or reports no executed tests, treat the request as unvalidated and use the repository's configured test command. Review per-file and test-name diagnostics for partially matched requests instead of repeatedly checking the same paths.

Example (conceptual): run tests in src/vs/editor/test/common/model.test.ts with test name filter "should split lines".

Fallback: Shell scripts

When the runTests tool is not available (e.g. in CLI environments), use the platform-appropriate script from the repo root:

  • macOS / Linux: ./scripts/test.sh [options]
  • Windows: .\scripts\test.bat [options]

These scripts download Electron if needed and launch the Mocha test runner.

Commonly used options

Bare file paths - Run tests from specific files

Pass source file paths directly as positional arguments. The test runner automatically treats bare .ts/.js positional arguments as --run values.

./scripts/test.sh src/vs/editor/test/common/model.test.ts
.\scripts\test.bat src\vs\editor\test\common\model.test.ts

Multiple files:

./scripts/test.sh src/vs/editor/test/common/model.test.ts src/vs/editor/test/common/range.test.ts
--run <file> - Run tests from a specific file (explicit form)

Accepts a source file path (starting with src/). The runner strips the src/ prefix and the .ts/.js extension automatically to resolve the compiled module.

Read the full file on GitHub · 108 lines

Changes

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.

  1. yesterday Changed · +2 lines 51f4ab83806f
  2. 9d ago Changed 31f25e2328f6
  3. 1mo ago First seen · 106 lines · 50 tokens per session scan A ff37056fc57a

Subscribe to this mod's changes

unit-tests is a skill published in the GitHub repository microsoft/vscode (193,657 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,050 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

repro-api

Reproduce an EmDash bug below the browser layer -- REST handlers, CLI, MCP, migrations, schema registry, or build tooling. No browser. Prefer a failing vitest test in the affected package, run in an attached container.

emdash-cms/emdash · 51 tokens

adversarial-reviewer

Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart. Do not use for ordinary review, style feedback, or general improvement suggestions.

emdash-cms/emdash · 62 tokens

work

Deliver one maintainer-approved EmDash issue, choosing the bug-fix path for a defect and the direct implementation path for an enhancement or task.

emdash-cms/emdash · 31 tokens

winapp-sandbox

Run, debug, and UI-automate a Windows app in a persistent Windows Sandbox rather than the user's desktop. Use for disposable app testing, guest diagnostics, file transfer, and app or whole-desktop evidence. Builds remain on the host; connection and reconnect can briefly take focus.

microsoft/winappCli · 62 tokens

om-troubleshooter

Diagnose and fix standalone Open Mercato bugs across scope, commands, locking, fields, generated registries, UI hydration, cache/search, bootstraps, queues, and providers. Use for "fix bug", "why does this fail", "regression", "debug", "napraw błąd", or a failing test.

open-mercato/open-mercato · 73 tokens

fixing-flaky-tests

Guides an agent through reproducing, root-causing, fixing, and validating flaky tests in the PostHog monorepo. Use when a test fails intermittently in CI but passes on rerun or locally, when hogli ci:insights or the debugging-ci-failures skill classifies a failure as a flaky test, when given a GitHub Actions URL for a…

PostHog/posthog · 220 tokens