microsoft/typespec · Archived

minimal-repro

Help create a minimal reproduction for a TypeSpec compiler or emitter bug. Use when a user provides TypeSpec source (pasted code or a GitHub URL) and describes an issue. Reproduces locally and reduces to a single-file repro.

First seen Jun 19, 2026

Installation

$ npx skills add microsoft/typespec --skill minimal-repro

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from microsoft/typespec.

npx skills add microsoft/typespec

Browse all from microsoft/typespec

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 5.8K
License LICENSE
Default branch main
Open issues 1,008
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,982 B
  • docs SUMMARY.md 245 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Minimal Reproduction

Reduce a user-reported TypeSpec bug to the smallest single .tsp file that still triggers the issue.

Inputs

  • TypeSpec source (pasted or GitHub URL)
  • Error description (diagnostic code, message, or incorrect emitter output)

Environment

Use packages/samples/scratch/ as the working directory — it's gitignored and the packages/samples package already depends on compiler, http, rest, openapi3, versioning, json-schema, etc.

If the repro needs packages NOT in the workspace (e.g., @azure-tools/*), use a temp folder with npm install instead.

Steps

  1. Reproduce — Write the user's code to packages/samples/scratch/main.tsp, compile with npx tsp compile main.tsp (add --emit <emitter> if relevant), and confirm the same error occurs.
  1. Minimize — Iteratively remove code (unused imports, models, properties, decorators, operations, namespaces) and re-compile after each removal. Keep only what's needed to trigger the same error. Undo any removal that makes the error disappear.
  1. Present — Show the final minimal .tsp, the compile command, and the error output. Suggest pasting into a GitHub issue or the TypeSpec Playground.
  1. Cleanup — Remove scratch files (rm -f packages/samples/scratch/*.tsp packages/samples/scratch/tspconfig.yaml && rm -rf packages/samples/scratch/tsp-output).

Tips

  • Most reproductions reduce to a single file with no namespaces needed.
  • Remove @service, @server, @doc, @info early — they're rarely relevant.
  • Combine multi-file code into one file by inlining.
  • If the error doesn't reproduce, check for missing import/using statements.