Official agent skill

Twoslash Validator

by microsoft in microsoft/aspire.dev

Validate and fix two-slash TypeScript examples for aspire.dev.

OfficialMITAuto-check passed

Install Twoslash Validator

skills CLI
$ npx skills add microsoft/aspire.dev --skill twoslash-validator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/aspire.dev twoslash-validator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/aspire.dev.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/twoslash-validator .claude/skills/twoslash-validator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
twoslash-validator
GitHub stars
196
Token cost
~856 tokens
SKILL.md length
388 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Validate and fix two-slash TypeScript examples for aspire.dev.

  • Works in 4 steps: Ensure dependencies are installed → If TypeScript API JSON changed,… → Run the two-slash block gate → …
  • Editing twoslash code fences
  • SKILL.md covers When to use this skill, Core rule, Validation workflow and Fix strategy, plus 2 more sections
  • Calls pnpm

What it does

Twoslash Validator is an agent skill from microsoft/aspire.dev, published by the product's own GitHub organization. Validate and fix two-slash TypeScript examples for aspire.dev. Use when adding or editing twoslash code fences, TypeScript AppHost samples, generated TypeScript API data, or failures from pnpm test:unit:twoslash-blocks.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with TypeScript and pnpm. The repository describes itself as: The official website for all things aspire.dev. The licence is MIT.

When your agent uses it

  • Editing twoslash code fences
  • TypeScript AppHost samples
  • Generated TypeScript API data
  • Failures from pnpm test:unit:twoslash-blocks

Example prompts

  • “/twoslash-validator”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Ensure dependencies are installed
  2. If TypeScript API JSON changed, regenerate the two-slash declaration bundle
  3. Run the two-slash block gate
  4. If the test fails, read every reported file, line, block number, and ts(...) code. Fix every diagnostic before considering the work…

What it can do on your machine

Read from SKILL.md and the folder at commit a097c7e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Twoslash Validator loads about 856 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 388 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~856

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/aspire.dev at commit a097c7e, republished under its MIT licence (© microsoft). 388 words, ~856 tokens.

Download SKILL.mdSave it as .claude/skills/twoslash-validator/SKILL.md (or your agent's skills folder).
name
twoslash-validator
description
Validate and fix two-slash TypeScript examples for aspire.dev. Use when adding or editing `twoslash` code fences, TypeScript AppHost samples, generated TypeScript API data, or failures from `pnpm test:unit:twoslash-blocks`.

Two-slash Validator Skill

Use this skill to keep aspire.dev from shipping rendered two-slash error UI. Any TypeScript diagnostic in a twoslash code block renders an error box on the site, so diagnostics must be fixed rather than suppressed.

When to use this skill

  • Adding or editing a TypeScript code fence with the twoslash meta flag
  • Updating TypeScript AppHost examples that import './.aspire/modules/aspire.mjs'
  • Refreshing src/frontend/src/data/ts-modules/ or src/frontend/src/data/twoslash/aspire.d.ts
  • Investigating failures from pnpm test:unit:twoslash-blocks
  • Reviewing docs changes that affect TypeScript sample rendering

Core rule

Do not add diagnostic allowlists or suppressions. A two-slash diagnostic is user-visible output on aspire.dev. Fix the docs sample, fix/regenerate the generated type surface, or remove the twoslash meta until the sample compiles cleanly.

Validation workflow

Run commands from the repository root unless noted.

  1. Ensure dependencies are installed:

    powershell
    Set-Location -Path .\src\frontend
    pnpm install --frozen-lockfile --prefer-offline
  2. If TypeScript API JSON changed, regenerate the two-slash declaration bundle:

    powershell
    pnpm twoslash-types
  3. Run the two-slash block gate:

    powershell
    pnpm test:unit:twoslash-blocks
  4. If the test fails, read every reported file, line, block number, and ts(...) code. Fix every diagnostic before considering the work complete.

Show full SKILL.md (218 more words)Show less

Fix strategy

Use this order when deciding what to change:

  1. Docs sample bug: If the TypeScript snippet calls the wrong API, uses the wrong argument shape, has a stale model name, or chains incompatible resources, fix the MDX sample.
  2. Generated type data stale: If the sample matches the product API but src/frontend/src/data/twoslash/aspire.d.ts is stale, run pnpm twoslash-types and commit the regenerated bundle.
  3. Generator type-shape gap: If regeneration is not enough because scripts/generate-twoslash-types.ts loses valid SDK shape, fix the generator and regenerate aspire.d.ts.
  4. Feature not representable yet: If a correct sample cannot be represented by the current two-slash type data, remove the twoslash meta from that block and leave the code sample visible without two-slash rendering. Do not leave a rendered diagnostic.

What not to do

  • Do not reintroduce KNOWN_TYPE_BUGS, per-page diagnostic budgets, or equivalent allowlists.
  • Do not disable TWOSLASH_ENABLED to make the test pass.
  • Do not change noErrorValidation as a substitute for fixing diagnostics; it exists so the audit can collect all failures at once.
  • Do not hide failures by changing the fence language away from TypeScript unless the sample is not TypeScript.
  • Do not edit generated aspire.d.ts by hand; update the generator or source JSON and regenerate.

Expected final checks

Before finishing a two-slash-related change, run:

powershell
Set-Location -Path .\src\frontend
pnpm test:unit:twoslash-blocks

If you changed the generator, also run:

powershell
pnpm test:unit:twoslash-types

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/twoslash-validator of microsoft/aspire.dev.

Open the folder on GitHubat commit a097c7e

Compare with similar skills

Twoslash Validator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Twoslash Validator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Twoslash Validator this skillmicrosoft/aspire.dev196—~856Automated safety check: PassMIT
Link Workspace Packagesnomcopter/react-mosaic4.8k5 repos~760Automated safety check: PassCustom licence
Pnpm Engineteambit/bit18k—~1.9kAutomated safety check: PassCustom licence
Create Docsvictorgarciaesgi/nuxt-typed-router4132 repos~2.8kAutomated safety check: PassMIT
Testing Changespnpm/pnpm37k—~1.1kAutomated safety check: PassMIT
Windows Releasemilind-soni/OpenMausBot4.1k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • Link Workspace Packages

    nomcopter/react-mosaic

    Link workspace packages in monorepos (npm, yarn, pnpm, bun).

    4.8k GitHub starsUsed in 5 repos~760 tokens
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Create Docs

    victorgarciaesgi/nuxt-typed-router

    Create complete documentation sites for projects. An agent skill from victorgarciaesgi/nuxt-typed-router.

    413 GitHub starsUsed in 2 repos~2.8k tokens
    Frontend & DesignAuto-check passed
  • Run the tests that cover a change in the pnpm repository, in the Rust workspace (pnpm/, pnpr/) or the TypeScript CLI (pnpm11/), and recognize the cases where a scoped run passes without testing…

    37k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Windows Release

    milind-soni/OpenMausBot

    Build and verify the Windows desktop build (NSIS installer + latest.yml) for the canonical OpenMausBot release and its legacy updater mirror.

    4.1k GitHub stars~1.5k tokensUpdated today
    MobileAuto-check passed
  • Walks through adding a new built-in evlog drain adapter for an observability platform: source, build config, exports, tests, docs and PR scope.

    1.9k GitHub stars~2.9k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from microsoft/aspire.dev

All 8 skills in this repo
  • Aspire

    microsoft/aspire.dev

    Official

    Orchestrates Aspire distributed applications using the Aspire CLI for running, debugging, and managing distributed apps.

    196 GitHub starsUsed in 4 repos~1.1k tokens
    Auto-check passed
  • Whatsnew

    microsoft/aspire.dev

    Official

    Step-argument skill that formalizes writing an Aspire "What's new in N.N" release-notes page (src/frontend/src/content/docs/whats-new/aspire-N-N.mdx) as a repeatable lifecycle.

    196 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Container Images

    microsoft/aspire.dev

    Official

    Extracts all container image references (registry, image, tag) from the microsoft/aspire source code and produces a JSON data file for the aspire.dev Astro site.

    196 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Doc Writer

    microsoft/aspire.dev

    Official

    Guidelines for producing accurate and maintainable documentation for the Aspire documentation site.

    196 GitHub stars~7.6k tokensUpdated yesterday
    Auto-check passed
  • Update Samples

    microsoft/aspire.dev

    Official

    Update the samples data file by fetching sample metadata from the microsoft/aspire-samples GitHub repository.

    196 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Update Integrations

    microsoft/aspire.dev

    Official

    Update integration documentation links and API reference data by synchronizing NuGet package names with their documentation URLs and generating per-package API schemas.

    196 GitHub stars~5.2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Twoslash Validator

What does Twoslash Validator do?

Validate and fix two-slash TypeScript examples for aspire.dev. dev, published by the product's own GitHub organization.dev.

When should I use Twoslash Validator?

Twoslash Validator fits situations like: editing twoslash code fences; typeScript AppHost samples; generated TypeScript API data; failures from pnpm test:unit:twoslash-blocks.

How do I install Twoslash Validator in Claude Code?

Run `npx skills add microsoft/aspire.dev --skill twoslash-validator -a claude-code`. Or copy the skill folder (.agents/skills/twoslash-validator in microsoft/aspire.dev) into .claude/skills/twoslash-validator in your project. Claude Code loads it when a task matches its description.

How do I install Twoslash Validator in Codex?

Run `npx skills add microsoft/aspire.dev --skill twoslash-validator -a codex`. Or copy the skill folder (.agents/skills/twoslash-validator in microsoft/aspire.dev) into .agents/skills/twoslash-validator in your project. Codex loads it when a task matches its description.

Can I use Twoslash Validator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/aspire.dev --skill twoslash-validator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/twoslash-validator, .gemini/skills/twoslash-validator, .github/skills/twoslash-validator and .opencode/skills/twoslash-validator in your project.

What does Twoslash Validator need to run?

Going by SKILL.md and its folder, Twoslash Validator needs the command-line tools its instructions call (pnpm).

Does Twoslash Validator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Twoslash Validator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Twoslash Validator use?

Twoslash Validator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Twoslash Validator use?

About 856 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Twoslash Validator?

Skills that share tags, products or a category with Twoslash Validator: Link Workspace Packages (nomcopter/react-mosaic, 4.8k stars), Pnpm Engine (teambit/bit, 18k stars), Create Docs (victorgarciaesgi/nuxt-typed-router, 413 stars) and Testing Changes (pnpm/pnpm, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Twoslash Validator?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/aspire.dev, which has 196 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 7, 2026.

Source: microsoft/aspire.dev on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.