Add PR Review Skill for Claude Code#182
Merged
sellakumaran merged 15 commits intomainfrom Feb 11, 2026
Merged
Conversation
Co-authored-by: sellakumaran <147754920+sellakumaran@users.noreply.github.com>
Co-authored-by: sellakumaran <147754920+sellakumaran@users.noreply.github.com>
Add logic to confirm Website Contributor role assignment for the current user after attempting assignment. If verification fails, log detailed warnings and manual remediation steps. Update tests to cover verification scenarios, including cases where the role already exists or assignment/verification fails, and assert correct logging and command execution.
Update log instructions to specify --endpoint-only for endpoint cleanup/registration in BlueprintSubcommand and BotConfigurator. Refine InfrastructureSubcommandTests mocks: webapp show now simulates post-creation success, signed-in-user returns valid GUID, and role assignment verification returns empty result for realism. Improves user guidance and test reliability.
- Context-aware review: Differentiates CLI vs GitHub Actions code - Actionable refactoring suggestions for large files - Engineering principles: KISS, DRY, SOLID, YAGNI - Test coverage requirements (blocking for CLI, high for actions) - Cross-platform checks (CLI only) - Security: Context-aware credential guidance - Windows encoding fixes for subprocess Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Rename skill.yaml to SKILL.md with YAML frontmatter - Use proper Claude Code skills format (Agent Skills standard) - Add markdown documentation in SKILL.md - Skill should now be discoverable in Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ist all file types
mengyimicro
previously approved these changes
Jan 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a Claude Code /review-pr skill for generating/editing/posting structured PR review comments, and also enhances the CLI’s Azure infrastructure setup by attempting to assign the current user the Website Contributor role (plus associated tests) and updating endpoint-cleanup guidance to use --endpoint-only.
Changes:
- Add a new Claude skill implementation (
.claude/skills/review-pr/) that generates YAML-based review output and can post viagh. - Update
InfrastructureSubcommand.CreateInfrastructureAsyncto assign/verify “Website Contributor” for the current signed-in user, with new unit tests covering success/failure paths. - Update CLI log guidance to reference
a365 cleanup blueprint --endpoint-only, and ignore locally generated PR review artifacts.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
src/Tests/.../InfrastructureSubcommandTests.cs |
Adds tests for Website Contributor role assignment behavior during infra creation. |
src/.../Services/BotConfigurator.cs |
Updates user guidance strings to use --endpoint-only for endpoint cleanup. |
src/.../Commands/SetupSubcommands/InfrastructureSubcommand.cs |
Adds Azure role assignment + verification for current user on the web app scope. |
src/.../Commands/SetupSubcommands/BlueprintSubcommand.cs |
Updates endpoint registration troubleshooting guidance to use --endpoint-only. |
.gitignore |
Ignores locally generated PR review markdown artifacts. |
.claude/skills/review-pr/review-pr.py |
Adds the PR review generator/poster script (YAML output + gh integration). |
.claude/skills/review-pr/SKILL.md |
Defines the Claude Code skill metadata and usage. |
.claude/skills/review-pr/README.md |
Documents setup/usage for the new /review-pr skill. |
src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/InfrastructureSubcommand.cs
Show resolved
Hide resolved
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Commands/InfrastructureSubcommandTests.cs
Show resolved
Hide resolved
Replaced all hardcoded references to "toolingManifest.json" and "ToolingManifest.json" with McpConstants.ToolingManifestFileName. Updated command classes, helpers, validation, and tests for consistent manifest file handling and improved error/log messages.
This reverts commit d8fdb17.
src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/InfrastructureSubcommand.cs
Show resolved
Hide resolved
tmlsousa
previously approved these changes
Feb 11, 2026
This update adds deep, context-sensitive code analysis to the PR review tool, leveraging engineering principles and repository guidelines. Key improvements include: - Parsing PR diffs to analyze added/modified code per file. - Loading and applying rules from .github/copilot-instructions.md. - Automated checks for legacy keywords, copyright headers, large functions, resource leaks, code duplication, hardcoded secrets, workflow permissions, and test quality. - Contextual feedback based on PR intent (bug fix, feature, security, etc.). - Improved file categorization and more actionable, principle-driven review comments. - Refactored large file checks to be context-aware and updated the main flow to ensure all analyses have the necessary context. These changes transform the script into a robust, best-practice-enforcing code review assistant.
Resolved conflict in .gitignore by keeping both PR review patterns and Python ignores. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
mengyimicro
approved these changes
Feb 11, 2026
skg-marimuthu
approved these changes
Feb 11, 2026
joratz
approved these changes
Feb 11, 2026
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.
Summary
Adds a reusable PR review skill for Claude Code that generates AI-powered, engineering-principles-based review comments.
Features
Usage
/review-pr <pr-number>/review-pr <pr-number> --postEngineering Principles
The skill enforces:
Files Added
.claude/skills/review-pr/SKILL.md- Skill definition with YAML frontmatter.claude/skills/review-pr/review-pr.py- Implementation script.claude/skills/review-pr/README.md- DocumentationWhat Gets Reviewed
Review Comments Include
Output Format
Generated reviews are saved to:
C:\Users\<username>\AppData\Local\Temp\pr-reviews\pr-<number>-review.yamlComments can be:
Test Plan
🤖 Generated with Claude Code