mgmt-review-comment-resolution
Skill6.1k starsChanged 8 months agoMITView on GitHub
Resolve review comments on Azure management-plane .NET SDK PRs. Handles renaming types/properties, changing property types, and other API surface adjustments by updating TypeSpec client.tsp and regenerating.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about Azure/azure-sdk-for-net
- Azure/Azurite“Add support for Blob Batch operations”GitHub · Nov 26, 2019 · 33 reactions
- microsoft/DockerTools“Cannot authenticate using DefaultAzureCredential when running in container”GitHub · Jul 5, 2022 · 27 reactions
- NixOS/nixpkgs“.NET Core tooling stops working due to `ñ` in release codename and lack of HTTP headers sanitization”GitHub · May 29, 2024 · 15 reactions
- dotnet/msbuild“Using ValueTuple with PackageReference on Azure Cloud Services”GitHub · Jul 27, 2018 · 15 reactions
- A Hacker News story“DocumentDB as not a service”Hacker News · Mar 9, 2015 · 2 points
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub, Bluesky and Hacker News (9 times).
On GitHub · 4
- Nov 26, 2019Add support for Blob Batch operations — Azure/Azurite33 reactions · 15 comments
- Jul 5, 2022Cannot authenticate using DefaultAzureCredential when running in container — microsoft/DockerTools27 reactions · 12 comments
- May 29, 2024.NET Core tooling stops working due to `ñ` in release codename and lack of HTTP headers sanitization — NixOS/nixpkgs15 reactions · 29 comments
- Jul 27, 2018Using ValueTuple with PackageReference on Azure Cloud Services — dotnet/msbuild15 reactions · 8 comments
On Bluesky · 4
- Nov 27, 2024📦 Azure / azure-sdk-for-net ⭐ 5,492 (+1) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Oct 26, 2024📦 Azure / azure-sdk-for-net ⭐ 5,378 (+2) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Jun 14, 2024📦 Azure / azure-sdk-for-net ⭐ 5,089 (+2) 🗒 C# This repository is for active development of the Azure SDK for .NET. For consumers of the… — @github-trending.bsky.social1 likes and repost
- Apr 30, 2024📦 Azure / azure-sdk-for-net ⭐ 4,985 (+2) This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we… — @github-trending.bsky.social1 likes and repost
On Hacker News · 1
- Mar 9, 2015DocumentDB as not a service2 points
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agentic-workflowsSkill
- analyze-ci-failuresSkill
- auto-build-repairSkill
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-releaseSkill
- azure-sdk-mgmt-pr-reviewSkill
- csharp-azure-spector-coverage-gapsSkill
- dpg-migrationSkill
- find-package-skillSkill
- mitigate-breaking-changesSkill
- ownersSkill
- pre-commit-checksSkill
- provisioning-library-generationSkill
- refresh-arm-sdk-releaseSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 6 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
How to decide the prefix: Read the review comment carefully — it may suggest a specific prefix.
- Very specific: line 70
Determine if the type is defined in the service's TypeSpec: Search all .tsp files under the spec folder for a model, union, or enum …
- Very specific: line 71
If defined → the rename will use @@clientName in client.tsp (Step 3)
- Distinctive: line 72
If NOT defined → the rename must use SDK-side custom code (Step 3b)
- Distinctive: line 74
If a comment is ambiguous about what the new name should be, ask the user before proceeding.
- Distinctive: line 97
If not available locally, clone it or ask the user for the path
- Very specific: line 99
If there is an existing spec PR branch, check it out.
- Very specific: line 101
Add @@clientName decorators to client.tsp.
- Very specific: line 108
Make sure the using statement for the service namespace is present so that type names resolve correctly.
- Very specific: line 114
Create a customization file in the SDK package's src/Customize/Models/ directory (create the directory if it doesn't exist).
- Very specific: line 132
After creating customization files, proceed to Step 6 (Regenerate the SDK) — Steps 4 and 5 (commit spec changes and update …
- Very specific: line 136
Commit client.tsp changes and push to the spec PR branch.
- Very specific: line 140
Update the commit field in tsp-location.yaml to point to the new spec commit SHA:
- Distinctive: line 167
If tests fail to build due to old type/property names, update the test files to use the new names.
- Very specific: line 171
Check the API surface file (api/*.cs) to confirm the review comments have been addressed — old names are gone and new names are present.
- Distinctive: line 175
Commit and push the regenerated SDK to the SDK PR branch
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: mgmt-review-comment-resolution
Resolve review comments on Azure management-plane SDK PRs by making changes in the TypeSpec spec repo (client.tsp) and regenerating the SDK.
When Invoked
Trigger phrases: "resolve review comments", "fix review comments", "resolve PR comments", "rename types", "fix naming", "resolve naming comments", "fix API surface".
Overview
Management-plane SDK code is generated from TypeSpec definitions in azure-rest-api-specs. Review comments on SDK PRs often request changes to the generated API surface — renaming types, renaming properties, or changing property types to be more user-friendly. These changes are made in the spec repo's client.tsp using TypeSpec decorators (primarily @@clientName), then the SDK is regenerated.
Key Concepts
@@clientName(TypeSpecName, "CSharpName", "csharp")— renames a TypeSpec model/union/enum/property to a different name in the generated C# SDK. This is the primary tool for resolving naming comments.@@clientNameonly works on types defined in the service's TypeSpec — you can only target models, unions, enums, and interfaces that are explicitly declared in the service's.tspfiles. If a type is not defined there (e.g., it comes from ARM common types or TypeSpec templates),@@clientNamecannot target it. See "Renaming via SDK Custom Code" below.@@clientNamecannot target aliases — if a type is defined as analias,@@clientNamecannot target it. See "Handling Unsupported Cases" below.- Only
client.tspmay be changed in the spec repo — do not modify any other.tspfiles or config files. If resolving a comment would require changes to other files, skip that change and inform the user with the reason after processing all other comments. Since onlyclient.tspis modified, swagger regeneration is never needed.
Types of Review Comments
1. Type Names Too Generic
Review comments may flag type names that are too generic and could collide with types from other SDKs or lack sufficient context.
Goal: Make the name more descriptive by adding context — this could be the RP name, the resource name, or other domain-specific context. The right prefix depends on what makes the name unambiguous and meaningful.
Examples:
| Original | Renamed | Context Added |
ProvisioningState | ManagedOpsProvisioningState | RP name |
ServiceInformation | ManagedOpsServiceInformation | RP name |
EncryptionProperties | VaultEncryptionProperties | Resource name |
ConnectionState | PrivateEndpointConnectionState | Feature name |
How to decide the prefix: Read the review comment carefully — it may suggest a specific prefix. If not, choose the most natural context that makes the name unambiguous within the SDK's namespace. When uncertain, ask the user what prefix or name they prefer.
2. Property Renames
Properties can also be renamed using @@clientName on the model's property:
@@clientName(MyModel.oldPropertyName, "NewPropertyName", "csharp");3. Property Type Changes
Some review comments ask for property types to be changed (e.g., string → ResourceIdentifier, string → TimeSpan). Use the @@alternateType decorator in client.tsp to change the generated C# type:
@@alternateType(MyModel.myProperty, armResourceIdentifier, "csharp");
@@alternateType(MyModel.durationProperty, duration, "csharp");This changes the property's type in the generated C# SDK without modifying other .tsp files. If @@alternateType cannot handle the requested type change, skip the change and inform the user with the reason after processing all other comments.
Workflow
Step 1: Read and Understand Review Comments
Fetch the PR's review comments using GitHub MCP tools. For each unresolved comment:
- Identify what change is requested (rename type, rename property, change type, etc.)
- Find the corresponding TypeSpec type/property in the spec
- Determine the appropriate new name or change
- Determine if the type is defined in the service's TypeSpec: Search all
.tspfiles under the spec folder for amodel,union, orenumdeclaration with the same name.- If defined → the rename will use
@@clientNameinclient.tsp(Step 3) - If NOT defined → the rename must use SDK-side custom code (Step 3b)
- If defined → the rename will use
If a comment is ambiguous about what the new name should be, ask the user before proceeding.
Step 2: Locate the Spec Files
- Find
tsp-location.yamlin the SDK package directory:sdk/<service>/Azure.ResourceManager.<Service>/tsp-location.yaml - This file contains:
directory: path to the TypeSpec spec (e.g.,specification/managedoperations/ManagedOps.Management)commit: the spec repo commit SHArepo: the spec repo (e.g.,Azure/azure-rest-api-specs)
- Key spec files:
client.tsp— where@@clientNameand@@alternateTypedecorators go (this is the only.tspfile you should modify)- Other
.tspfiles — read-only reference for understanding models, unions, and aliases
Step 3: Apply Changes in the Spec Repo (for types defined in TypeSpec)
This step applies only to types that are defined in the service's TypeSpec files. For types NOT defined in the service's TypeSpec, skip to Step 3b.
Locate the spec repo. It may be:
- A local clone (typically at
../azure-rest-api-specsrelative to the SDK repo) - If not available locally, clone it or ask the user for the path
If there is an existing spec PR branch, check it out. If there is no spec PR or branch yet, create a new branch from the commit referenced in tsp-location.yaml.
Add @@clientName decorators to client.tsp. Read the existing client.tsp to find the correct using statement for the service namespace (e.g., using Microsoft.ManagedOps;, using Azure.ResourceManager.Compute;, etc.), then add decorators targeting the types to rename:
@@clientName(GenericTypeName, "MoreDescriptiveTypeName", "csharp");
@@clientName(MyModel.genericProperty, "moreDescriptiveProperty", "csharp");Make sure the using statement for the service namespace is present so that type names resolve correctly. Check the namespace declaration in main.tsp or other .tsp files to find the correct namespace.
Step 3b: Apply Changes via SDK Custom Code (for types NOT defined in TypeSpec)
Types that are not defined in the service's TypeSpec (e.g., from ARM common types or TypeSpec templates) cannot be renamed via @@clientName. Instead, create SDK-side customization files to rename them.
- Create a customization file in the SDK package's
src/Customize/Models/directory (create the directory if it doesn't exist). - Define a
partial class(orpartial structfor value types) with the desired name, and apply the[CodeGenType("OriginalGeneratedName")]attribute to map it to the generated type.
Example: To rename OptionalPropertiesUpdateableProperties to DurableTaskPrivateEndpointConnectionPatchProperties:
// src/Customize/Models/DurableTaskPrivateEndpointConnectionPatchProperties.cs
using Azure.ResourceManager.DurableTask.Models;
namespace Azure.ResourceManager.DurableTask.Models
{
[CodeGenType("OptionalPropertiesUpdateableProperties")]
public partial class DurableTaskPrivateEndpointConnectionPatchProperties
{
}
}After creating customization files, proceed to Step 6 (Regenerate the SDK) — Steps 4 and 5 (commit spec changes and update tsp-location.yaml) are only needed if client.tsp was also modified.
Step 4: Commit and Push Spec Changes
Commit client.tsp changes and push to the spec PR branch.
Step 5: Update SDK tsp-location.yaml
Update the commit field in tsp-location.yaml to point to the new spec commit SHA:
directory: specification/<service>/<ServiceName>.Management
commit: <new-commit-sha>
repo: Azure/azure-rest-api-specsStep 6: Regenerate the SDK
cd sdk/<service>/Azure.ResourceManager.<Service>/src
dotnet build /t:GenerateCodeStep 7: Build and Verify
# Build the library and tests (mgmt libraries always have a solution file)
cd sdk/<service>/Azure.ResourceManager.<Service>
dotnet build
# Export API listing
cd <repo-root>
pwsh eng/scripts/Export-API.ps1 <service-directory>If tests fail to build due to old type/property names, update the test files to use the new names.
Step 8: Verify the Changes
Check the API surface file (api/*.cs) to confirm the review comments have been addressed — old names are gone and new names are present.
Step 9: Commit, Push, and Resolve Comments
- Commit and push the regenerated SDK to the SDK PR branch
- Resolve the corresponding review comments on the SDK PR using GitHub GraphQL API
Handling Unsupported Cases
Some changes cannot be done purely through @@clientName or @@alternateType in client.tsp. When you encounter any of the following, skip the change and continue processing other comments. After all processable changes are done, inform the user about the skipped changes with the reason, and let them choose how to proceed:
- Aliases —
@@clientNamecannot target TypeSpec aliases (e.g.,alias foo = "A" | "B" | string;). Explain to the user that the alias needs to be converted to a named type (e.g.,union) in the spec.tspfile first. - Changes requiring spec file modifications beyond
client.tsp— any change that cannot be expressed viaclient.tspdecorators or SDK custom code alone (e.g., structural changes, flattening/unflattening models, adding/removing properties, or changing inheritance). - Ambiguous naming — if a review comment says "rename this" but doesn't specify the new name, ask the user what name they prefer.
Common Pitfalls
- Missing
usingstatement inclient.tsp— the type names won't resolve and@@clientNamewill silently fail. Check thenamespacedeclaration in the spec's.tspfiles to find the correct namespace. - Modifying files other than
client.tsp— onlyclient.tspshould be modified in the spec repo. If other file changes are needed, skip and inform the user. - Stale commit SHA — always update
tsp-location.yamlto point to the pushed spec commit before regenerating. - Test files — after renaming types, test and sample files may still reference old names and need manual updates.
- Not building tests — always build the solution (which includes tests), not just the library, to catch stale references.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

