typespec-custom-emitters

Create custom TypeScript emitters that generate outputs from TypeSpec programs.

1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/hafley66/claude-research --skill typespec-custom-emitters
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typespec-custom-emitters
Source: https://github.com/hafley66/claude-research/tree/main/skills/typespec-custom-emitters
Command: npx skills add https://github.com/hafley66/claude-research --skill typespec-custom-emitters

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Custom TypeSpec emitters let you generate outputs across many formats from a single model. This Skill enables building and configuring emitters to produce tables, code files, IDL, YAML/JSON configs, and other formats.

Core Features & Use Cases

  • Create custom emitters in TypeScript that access the TypeSpec program via JS API
  • Emit to tables, CSV, JSON, YAML, code files, IDL, config
  • Configure emitter options in tspconfig.yaml and coordinate multi-emitter projects

Quick Start

Create a TypeScript emitter with a $onEmit function and run tsp compile --emit ./typespec-custom-emitters to generate outputs.

Frequently Asked Questions about typespec-custom-emitters

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate custom output formats from a TypeSpec model?▼

Yes, you can configure multiple custom TypeSpec emitters in a single tspconfig.yaml file to coordinate multi-emitter projects, allowing you to simultaneously generate tables, IDL, and configuration files from one model.

What is the best way to output YAML or JSON configuration files using TypeSpec?▼

The best way to output YAML or JSON configuration files using TypeSpec is to create a custom TypeScript emitter that traverses the program model and serializes the data into your desired configuration format.

Does generating code from TypeSpec require specific compiler configuration?▼

Generating code from TypeSpec requires defining emitter options and diagnostics handling in your tspconfig.yaml file, and executing the compile command with the --emit flag pointing to your custom emitter.

When do I need to build a custom TypeSpec emitter instead of using existing ones?▼

You need to build a custom TypeSpec emitter when your complex project requires generating specialized outputs like tables, specific code generation patterns, or configuration files that existing emitters do not support.