Shared Azure REST API review rules for OpenAPI (Swagger) and TypeSpec specifications. Contains cross-cutting review guidelines used by ARM API reviewers, code review agents, and CI workflows. USE FOR: reviewing API specs for naming, security, property design, resource lifecycle, and versioning compliance. DO NOT USE FOR: authoring TypeSpec files (use azure-typespec-author), SDK generation, or releasing packages.
60
71%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/azure-api-review/SKILL.mdThis skill contains cross-cutting API review rules that apply regardless of whether the specification is authored in OpenAPI v2 (Swagger) JSON or TypeSpec. These rules are the single source of truth -- referenced by the format-specific instruction files and review agents.
Each reference file covers one cross-cutting rule area with:
| Reference | Rule Area | Key Rule IDs |
|---|---|---|
| secret-detection.md | Proactive secret detection in API properties | SEC-SECRET-DETECT |
| property-mutability.md | Write-only, conditional read-only, immutability, update tolerance, and field ownership rules | OAPI027, OAPI020, OAPI029, OAPI030, OAPI031, OAPI034 |
| provisioning-state.md | provisioningState requirements for ARM resources | RPC-Async-V1-02, RPC-Async-V1-03 |
| naming-conventions.md | Naming, casing, and Azure terminology | -- |
| enum-best-practices.md | Enum extensibility and boolean alternatives | -- |
| tracked-resource-lifecycle.md | Required CRUD operations and resource move for tracked ARM resources | RPC-Put-V1-22, RPC-Get-V1-05, RPC003 |
| policy-compatibility.md | Azure Policy compatibility rules for API design | PLCY001–PLCY009 |
| template-deployment.md | ARM Template Deployment engine compatibility | TD001–TD003 |
| availability-zones.md | Availability zone property contract and zone immutability | -- |
| field-ownership.md | Value preservation (array ordering, data types, casing) | OAPI024, OAPI025, OAPI026 |
| what-if-preflight-compliance.md | What-If noise prevention and preflight validation contract | WHATIF-001–005, PREFLIGHT-001–005 |
| lro-final-state-via.md | LRO polling and final-state-via decision table | -- |
| suppression-review-criteria.md | Suppression approval/rejection decision framework | RPC-SUPPRESS-GA, RPC-SUPPRESS-SCOPE |
| linter-rule-coverage.md | Linter rule ID → instruction file mapping (130+ rules) | -- |
| example-quality.md | Example file quality: orphan detection, coverage, descriptive values | EX-ORPHAN, EX-COVERAGE, EX-DESCRIPTIVE-VALUES |
| design-decisions.md | Grey-area design trade-off frameworks (10 decision matrices) | DD-001–DD-010 |
| pattern-validation.md | Allowlist vs. denylist pattern constraints; Unicode bypass risk; severity matrix | OAPI-PATTERN-ALLOWLIST |
These external documents are the upstream authorities. When they conflict with each other, the precedence order is:
These principles guide how the ARM API Reviewer agent, its instruction files, and reference files are designed and maintained:
Upstream alignment date, and the change propagates through all
cross-references automatically.The instruction files and reference files in this skill are derived from the authoritative external sources listed above. They are not replacements for those documents — they distill the most commonly violated rules into a structured format optimized for LLM-based review agents.
Why inline rules instead of raw document references: LLM review agents produce more consistent, actionable findings when rules are codified with explicit rule IDs, severity levels, and fix suggestions. Raw upstream documents are prose-heavy and not structured for automated consumption.
Keeping rules current:
Upstream alignment date in an
HTML comment at the top. This date indicates when the rules were last
verified against the upstream documents.(Also enforced by: ...). The review agent should check CI results
before flagging these to avoid duplicating linter findings..md file under skills/ or
agents/, run npm run format from the .github/ directory
(Prettier). Note: instruction files (*instructions.md) are excluded
from Prettier via .prettierignore and do not need formatting.These documents in this repo provide additional context:
The format-specific instruction files reference these shared rules:
| Instruction File | Applies To | Relationship |
|---|---|---|
arm-api-review.instructions.md | specification/**/resource-manager/**/*.json | References shared rules + adds ARM-specific rules (path structure, PUT/PATCH/DELETE contracts, LRO, ARG compatibility) |
openapi-review.instructions.md | specification/**/*.json | References shared rules + adds generic OpenAPI rules (file structure, x-ms extensions, examples, security definitions) |
typespec-review.instructions.md | specification/**/*.tsp | References shared rules + adds TypeSpec-specific rules (decorators, project structure, anti-patterns) |
b0960d6
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.