create-linter-rule

Create TypeSpec Azure linter rules with tests, documentation, and registration workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers create consistent, production-ready TypeSpec linter rules by guiding them through implementation, testing, documentation, registration, and validation workflows.

Core Features & Use Cases

  • Linter Rule Development: Guides the creation of new TypeSpec lint diagnostics and design guideline checkers using a structured TDD workflow.
  • Complete Rule Lifecycle: Covers scaffolding, failing tests, implementation, ruleset registration, documentation updates, changesets, and final validation.
  • Use Case: When adding an Azure API design guideline check, use this Skill to create the rule, verify diagnostics, register it in the correct rulesets, and prepare it for review.

Quick Start

Use the create-linter-rule skill to add a new TypeSpec Azure linter rule that validates API patterns and includes tests and documentation.

Frequently Asked Questions about create-linter-rule

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

FAQPage Schema
How do I create a TypeSpec linter rule for Azure API design guidelines?

To create a TypeSpec linter rule, you scaffold the rule, implement logic for API design guideline checks, and register it in the correct rulesets. The workflow includes writing failing tests, updating documentation, and preparing changesets for PR validation.

What is the best way to enforce TypeSpec Azure package validation checks?

The best way to enforce TypeSpec Azure package validation is by creating new lint diagnostics through a structured TDD workflow. This ensures your rule correctly validates API patterns and includes comprehensive test coverage and documentation for review.

Does the TypeSpec linter rule creation process require test-driven development?

Yes, the TypeSpec linter rule creation process requires test-driven development. You start by writing failing tests for the new lint diagnostic, then implement the rule logic until tests pass, ensuring consistent and production-ready validation.

Can I add a new lint diagnostic to an existing TypeSpec ruleset?

Yes, you can add a new lint diagnostic to an existing TypeSpec ruleset. The rule lifecycle workflow covers scaffolding the diagnostic, implementing the checker, updating ruleset registration, and generating documentation for the new validation.

What steps are needed to register a TypeSpec linter rule and prepare it for review?

To register a TypeSpec linter rule for review, you update the target rulesets, generate documentation, and add a changeset. Final validation ensures the rule follows repository conventions before opening a pull request.