Update SKILL.md with additional code style guidelines - #12953
Merged
Conversation
Clarify guidelines on string interpolation and expression-bodied members.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the dotnet-snippet-modernization agent skill documentation to clarify when to prefer string interpolation vs. composite formatting, and how to format expression-bodied members for readability, aligning snippet modernization with repository formatting expectations.
Changes:
- Adds guidance to avoid string interpolation when it would reduce readability (with an illustrative example).
- Clarifies formatting guidance for long expression-bodied members (with an example).
- Adds an explicit curly-braces formatting guideline.
Suppressed comments (1)
.agents/skills/dotnet-snippet-modernization/SKILL.md:39
- This bullet uses "for example" twice in the same sentence, which reads awkwardly. Removing the second usage keeps the guidance clearer.
- Use expression-bodied members for simple single-expression members. If the line gets too long, for example, a method signature with a type parameter constraint, place the expression body on a new line, for example:
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
gewarren
commented
Aug 7, 2026
wadepickett
approved these changes
Aug 8, 2026
wadepickett
left a comment
Contributor
There was a problem hiding this comment.
@gewarren, approved. Looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarify guidelines on string interpolation and expression-bodied members.
Contributes to #12713.