doc-example-generator

Compile TypeSpec definitions and extract generated client code for documentation examples.

27|86|Updated Nov 1, 2023
One-click install
npx skills add https://github.com/Azure/typespec-azure --skill doc-example-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-example-generator
Source: https://github.com/Azure/typespec-azure/tree/main/.github/skills/doc-example-generator
Command: npx skills add https://github.com/Azure/typespec-azure --skill doc-example-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of creating trustworthy TypeSpec documentation examples by validating source code and replacing manually written snippets with verified emitter-generated API samples.

Core Features & Use Cases

  • Compilation Verification: Builds temporary TypeSpec projects and confirms examples compile successfully before documentation use.
  • Multi-language Example Generation: Runs Azure TypeSpec emitters to extract public API surfaces for Python, C#, TypeScript, Java, and Go documentation tabs.
  • Use Case: Documentation authors can use this Skill when adding client customization, paging, long-running operation, or model examples that require accurate generated SDK code.

Quick Start

Generate a verified ClientTabs documentation example for the TypeSpec feature I am documenting.

Frequently Asked Questions about doc-example-generator

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

FAQPage Schema
How do I generate verified code samples for TypeSpec documentation?

To generate verified TypeSpec documentation, compile API definitions in a temporary project and extract emitter-generated client code to replace manually written snippets with validated samples.

What is the best way to create multi-language API examples from TypeSpec?

Creating multi-language API examples from TypeSpec involves running Azure SDK emitters to extract public API surfaces for Python, C#, TypeScript, Java, and Go documentation tabs.

Does TypeSpec documentation generation require a successful compilation step?

Yes, TypeSpec documentation generation requires successful compilation; the Skill builds temporary projects and confirms API definitions compile successfully before generating any client code samples.

How does emitter output validation work for Azure SDK examples?

Emitter output validation for Azure SDK examples works by compiling TypeSpec API definitions, running configured language emitters, and extracting the public generated code to ensure documentation snippets are accurate.

When do I need to use a TypeSpec documentation generator for Azure SDK workflows?

You need a TypeSpec documentation generator when adding client customization, paging, long-running operation, or model examples that require accurate generated SDK code across multiple language tabs.

Can I generate documentation tabs for multiple languages without manually writing SDK code?

Yes, you can generate multi-language documentation tabs without manual code by running Azure TypeSpec emitters that automatically extract the public API surface for Python, C#, TypeScript, Java, and Go.