Authors Azure TypeSpec API specifications. MUST BE USED for all .tsp changes except naming-only client.tsp SDK overrides handled by azure-typespec-sdk-naming. WHEN: versions, resources, operations, models, properties, decorators, visibility, constraints, breaking changes, LRO for ARM or data-plane. DO NOT USE FOR: naming-only client.tsp overrides, SDK generation/releases, single MCP calls. INVOKES: azure-sdk-mcp:azsdk_typespec_retrieve_knowledge, azure-sdk-mcp:azsdk_run_typespec_validation.
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
—
The risk profile of this skill
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/azure-typespec-author/SKILL.mdThis skill authors and modifies Azure TypeSpec (.tsp) API specifications for ARM resource-manager and data-plane services, covering versioning, resources, operations, models, decorators, constraints, and other schema changes that must follow the repository's TypeSpec authoring workflow.
USE FOR: TypeSpec/tsp changes except naming-only client.tsp SDK overrides — api versions (add, bump, preview, stable, promote), resources, operations, models, properties, decorators, visibility, constraints, breaking changes, LRO, suppressions, operationId, spread model WHEN: "add TypeSpec API version", "modify .tsp file", "change TypeSpec decorators", "update TypeSpec models or operations", "author Azure TypeSpec" DO NOT USE FOR: naming-only client.tsp SDK overrides, SDK generation, releasing SDK packages, or single MCP tool calls
The azure-typespec-author skill must be invoked immediately in all modes (including plan mode) for any task that involves creating and modifying TypeSpec (.tsp) files except naming-only client.tsp SDK overrides. This skill MUST be used regardless of how simple the task appears — there are no "simple" TypeSpec source edits. Even trivial-seeming changes (adding a single enum value, one property, one operation) require the full workflow because versioning decorators, validation, and compliance checks are mandatory.
For naming-only client.tsp requests, invoke azure-typespec-sdk-naming directly; it applies authorized SDK overrides through scoped direct edits, not the customization tool. Other SDK customizations remain with the existing customization workflow. This exception does not bypass naming guidance.
This includes but is not limited to:
| Tool | Purpose |
|---|---|
azure-sdk-mcp:azsdk_typespec_retrieve_knowledge | Retrieve authoring knowledge for requests not covered by the reference catalog; Agentic Search handles covered requests. |
azure-sdk-mcp:azsdk_run_typespec_validation | Validate TypeSpec. |
These MCP tools are optional capabilities, not prerequisites. Call them at their documented workflow stages when they are exposed. When retrieval MCP is not exposed, continue the selected knowledge route with authoritative Agentic Search. When validation MCP is not exposed, continue with the mandatory local compile and case-specific checks.
An exposed tool that returns an error, times out, or fails authentication is not unavailable. Report that failure instead of silently taking its fallback.
Install azure-typespec-sdk-naming alongside this skill. Invoke it by name for naming guidance; do not copy its rules into this skill. If unavailable, report the naming coverage gap rather than inventing a replacement.
@added decorators, version gating, and validation. The only .tsp exception is a naming-only client.tsp SDK override routed directly to azure-typespec-sdk-naming..tsp edits — even a single ? change can be breaking. Do not invoke this skill for the naming-only client.tsp exception.client.tsp edits through its apply workflow.tsp compile .; absence of the validation MCP tool is not a blocker.azsdk_typespec_retrieve_knowledge for the complete request when the tool is exposed; if it is not exposed, use authoritative Agentic Search for the complete request. Do not call both knowledge routes. Step 3 reuses the fetched content and must not retrieve it again.azsdk_typespec_generate_authoring_plan — synthesize the authoring plan locally from the selected grounding source.Analyze → Read catalog → Classify coverage → Ground once during intake → Plan source locally → Plan client configuration unless opted out → Apply → Validate. If neither the selected MCP route nor authoritative Web grounding can provide sufficient guidance, report a blocker instead of making ungrounded edits.azsdk_run_typespec_validation after edits does not violate the one-source rule. If that tool is unavailable, record the skip and continue with tsp compile ..node_modules, packages,
restored tools, or fixture links during validation cleanup, even if they were
installed or restored in the current turn. They are environment setup, not
compiler output.Analyze → Intake → Plan TypeSpec source → Client configuration unless opted out → Apply → Validate → Output reference links
See analyze-project.md.
See intake.md.
See authoring-plan.md.
See client-configuration.md. Invoke
azure-typespec-sdk-naming for SDK-visible changes unless the user explicitly
opts out. Skip this step without prompting for unrelated or documentation-only
requests that cannot affect the generated client surface. Do not pause source
authoring to confirm the recommended default, and do not invoke the naming skill
when the user opts out.
Make minimal .tsp declaration edits following the source plan from Step 3. If
Step 4 produced a client configuration plan, use
azure-typespec-sdk-naming in apply mode; it directly edits scoped naming
overrides and necessary imports/loading without calling the customization tool.
Do not bypass that workflow. Resolve missing material source decisions during
intake before applying changes; do not reconfirm decisions already supplied.
See validation.md. Run 6.1.1 TypeSpec validation when its MCP tool is available and always run 6.1.2 tsp compile .; run 6.1.3 client configuration checks when Step 4 produced a client configuration plan and 6.2 case-specific validation whenever its case matches.
Output the validation results as a checklist. Report one line per executed check, each marked ✅ (pass) or ❌ (fail) with a short note. Record unavailable validation MCP and opted-out or inapplicable client configuration checks as skipped, not passed. Fix every ❌ and re-run until all checks pass, subject to the retry limit in the validation reference; report a blocker if errors remain. For API Versioning (Case 3) the checklist must cover every §6.2 Case 3 check — including: the new version's examples/ folder exists; no example folder remains for a version absent from the Versions enum; no decorator references a version absent from the enum; every carried-over feature is present with its decorators rebased onto the new version (not reverted); every excluded feature is fully removed.
Output all referenced document URLs from the source plan in Step 3 and any client configuration plan in Step 4. This gives the user direct links to the documentation that informed the changes.
| File | Purpose |
|---|---|
| analyze-project.md | Step 1: project analysis |
| intake.md | Step 2: general + case-specific intake |
| authoring-plan.md | Step 3: build TypeSpec source plan locally |
| client-configuration.md | Step 4: client configuration unless opted out |
| agentic-search.md | Procedure: fetch URLs → extract guidance |
| reference-document-links.md | Catalog of external guide URLs |
| validation.md | Step 6: validate → compile → verify |
Azure/azure-rest-api-specs
3b64c3a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.