code-review-workflow
Skill229 starsChanged 3 months agoApache-2.0View on GitHub
Structured code review workflow for .NET projects using Roslyn MCP tools. Multi-dimensional review covering correctness, security, performance, architecture compliance, and test coverage. Load when: "review PR", "review code", "code review", "PR review", "review changes", "review my code", "check code quality".
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use for non-trivial PRs (3+ files changed, new features, refactors).
- Distinctive: line 34
Run MCP tools on changed files:
- Distinctive: line 68
Read changed files for things tools can't catch:
- Distinctive: line 107
Use for small changes (1-2 files, bug fixes, config changes).
- Very specific: line 110
Run detect_antipatterns on changed files
- Distinctive: line 112
Read the changed code for correctness
- Very specific: line 131
Run get_project_graph — visualize the full dependency tree
- Distinctive: line 132
Verify dependency rules per architecture:
- Very specific: line 141
Run find_references on module/layer boundary types to verify encapsulation:
- Very specific: line 148
Run detect_circular_dependencies to find cycles:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Review Workflow
Core Principles
- MCP-first analysis — Use Roslyn MCP tools before reading source files.
detect_antipatternscatches more than manual scanning,get_diagnosticsfinds what the compiler knows, andfind_referencesreveals blast radius. Only read files for context that tools can't provide. - Structured output — Every review follows the same format: Summary → Critical → Warnings → Suggestions → Architecture Compliance → Test Coverage → What's Good. Consistent structure makes reviews actionable and scannable.
- Severity-based findings — Categorize every finding as Critical (must fix before merge), Warning (should fix, creates tech debt), or Suggestion (nice to have). Never mix severities — a cosmetic issue next to a security bug buries the important finding.
- Actionable suggestions — Every finding includes: what's wrong, why it matters, and how to fix it. "This is bad" is not a review comment. "This creates N+1 queries because X. Fix by adding
.Include()or using a projection" is. - Acknowledge good work — Always include a "What's Good" section. Positive reinforcement of good patterns is as important as flagging bad ones.
Patterns
Full PR Review Flow
Use for non-trivial PRs (3+ files changed, new features, refactors). Execute steps in order:
Step 1: Understand the change scope Get changed files from git diff or user input. Categorize:
- New files (features, tests, configs)
- Modified files (which layers? domain, application, infrastructure, API?)
- Deleted files (was anything depending on them?)
Step 2: Automated analysis Run MCP tools on changed files:
→ detect_antipatterns (file: each changed .cs file)
Catch: async void, sync-over-async, DateTime.Now, new HttpClient(), broad catch, etc.
→ get_diagnostics (scope: file, path: each changed file)
Catch: new compiler warnings, nullability issues, unused variables
→ get_public_api (typeName: each modified type)
Check: API surface changes — new public members, removed members, signature changesStep 3: Blast radius assessment For each changed public API:
→ find_references (symbolName: changedMethod)
Count callers. High count = high risk. Flag breaking changes.Step 4: Architecture compliance
→ get_project_graph
Verify: dependency direction is correct (Domain → nothing, Infra → Domain, Api → Application)
Flag: circular references, wrong-direction dependenciesStep 5: Test coverage check
→ get_test_coverage_map (projectFilter: changed project)
Check: do test files exist for every changed type?
Flag: new types without tests, modified logic without test updatesStep 6: Manual review Read changed files for things tools can't catch:
- Business logic correctness
- Naming clarity and consistency
- Error handling completeness
- Concurrency safety
- Security: input validation, authorization checks, data exposure
Step 7: Produce review
## Review Summary
[1-2 sentence overall assessment: scope, risk level, recommendation]
## Critical (must fix)
- **[File:Line] [Title]** — [What's wrong]. [Why it matters]. [How to fix].
- ...
## Warnings (should fix)
- **[File:Line] [Title]** — [What's wrong]. [Impact if not fixed]. [Suggested fix].
- ...
## Suggestions (nice to have)
- **[File:Line] [Title]** — [Current approach]. [Better alternative]. [Why].
- ...
## Architecture Compliance
[Dependency direction check results. Layer violation findings. Module boundary enforcement.]
## Test Coverage
[Which changed types have tests. Which are missing. Specific test scenarios to add.]
## What's Good
- [Positive finding 1 — reinforce good patterns]
- [Positive finding 2]
- ...Quick Review
Use for small changes (1-2 files, bug fixes, config changes). Lightweight — skip blast radius and architecture checks.
Steps:
- Run
detect_antipatternson changed files - Run
get_diagnosticson changed files - Read the changed code for correctness
- Produce abbreviated review (Summary + Issues + What's Good)
## Quick Review
[1 sentence assessment]
### Issues
- [Finding with severity tag: 🔴 Critical / 🟡 Warning / 🔵 Suggestion]
### What's Good
- [Positive note]Architecture Compliance Check
Standalone check for architecture-level concerns. Use when reviewing project structure changes, new project additions, or module boundary modifications.
Steps:
- Run
get_project_graph— visualize the full dependency tree - Verify dependency rules per architecture:
| Architecture | Rule | Violation Example |
| VSA | Features don't reference each other | Feature A imports from Feature B |
| Clean Architecture | Domain has zero project references | Domain references Infrastructure |
| DDD | Aggregates don't reference other aggregates | Order aggregate imports Product aggregate |
| Modular Monolith | Modules communicate only via integration events | Module A directly references Module B's DbContext |
- Run
find_referenceson module/layer boundary types to verify encapsulation:
→ find_references(symbolName: "OrdersDbContext")
Should only be referenced within the Orders module.
External references = module boundary violation.- Run
detect_circular_dependenciesto find cycles:
→ detect_circular_dependencies(scope: projects)
Flag any project-level cycles.
→ detect_circular_dependencies(scope: types, projectFilter: "MyApp.Application")
Flag type-level cycles within the application layer.Anti-patterns
Reviewing Without MCP Tools
# BAD — Reading every file manually, missing patterns across the codebase
"Let me read OrderService.cs... looks fine to me."
# Missed: 3 DateTime.Now usages, 1 async void, 2 compiler warnings# GOOD — MCP-first, then targeted file reads
→ detect_antipatterns: Found 3 DateTime.Now (AP004), 1 async void (AP001)
→ get_diagnostics: 2 CS8600 warnings in OrderService.cs
"I found 6 issues via static analysis. Let me read the files for business logic review..."Vague Feedback
# BAD
"The code could be better."
"This doesn't look right."
"Consider refactoring this."# GOOD
"OrderService.cs:47 — `DateTime.Now` should be `TimeProvider.GetUtcNow()`.
DateTime.Now is untestable and uses local timezone. Inject TimeProvider
via primary constructor and call GetUtcNow()."Missing Security Checks
# BAD — Only checking code style and patterns
"Code looks clean, approved!"
# Missed: SQL injection in raw query, missing authorization attribute, exposed PII in logs# GOOD — Security is a review dimension
"## Critical
- **OrderController.cs:23** Missing `[Authorize]` — endpoint exposes order data without auth
- **SearchService.cs:45** SQL injection — user input concatenated into raw SQL. Use parameterized query.
## Suggestions
- **LoggingMiddleware.cs:12** PII exposure — email logged at Information level. Mask or use Debug level."Blocking on Style, Ignoring Substance
# BAD — 10 comments about naming, 0 about the race condition
"Rename `svc` to `service`. Use `var` instead of explicit type. Add XML docs."# GOOD — Prioritize by impact
"## Critical
- Race condition in OrderService.ProcessAsync — concurrent calls can double-charge
## Suggestions
- Consider renaming `svc` to `service` for clarity"Decision Guide
| Scenario | Review Type | MCP Tools |
| Feature PR (3+ files) | Full PR Review | All tools |
| Bug fix (1-2 files) | Quick Review | detect_antipatterns, get_diagnostics |
| Config/infra changes | Quick Review + Manual | get_project_graph |
| New project/module added | Architecture Compliance | get_project_graph, detect_circular_dependencies |
| Refactor PR | Full PR Review + Architecture | All tools + find_references (blast radius) |
| Security-sensitive change | Full PR Review → escalate to security-auditor | detect_antipatterns + manual security review |
| Test-only changes | Quick Review | get_diagnostics only |
| Performance-critical path | Full PR Review → escalate to performance-analyst | get_diagnostics + manual review |
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- u9401066/template-is-all-you-need★ 3same name
- thoitiettxl-cyber/Claw-II★ 2same name
- 2702207741-dev/agent-skills-pipeline★ 1same name
- codecharmhq/claude-code-skills★ 1same name
- Abdox-menara/guard-skills★ 0same name
- agent-packs/registry★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository96 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- 80-20-reviewSkill
- api-versioningSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- autonomous-loopsSkill
- cachingSkill
- ci-cdSkill
- clean-architectureSkill
- code-review-workflowSkill
- configurationSkill
- container-publishSkill
- context-disciplineSkill
- convention-learnerSkill
- dddSkill
- dependency-injectionSkill
- de-sloppifySkill
- dockerSkill
- ef-coreSkill
- error-handlingSkill
- health-checkSkill
- httpclient-factorySkill
- instinct-systemSkill
- learning-logSkill
- loggingSkill
- messagingSkill
- migration-workflowSkill
- minimal-apiSkill
- model-selectionSkill
- modern-csharpSkill
- openapiSkill
- opentelemetrySkill
- project-setupSkill
- project-structureSkill
- resilienceSkill
- scaffoldingSkill
- scalarSkill
- security-scanSkill
- self-correction-loopSkill
- serilogSkill
- session-managementSkill
- split-memorySkill
- testingSkill
- verification-loopSkill
- vertical-sliceSkill
- workflow-masterySkill
- wrap-up-ritualSkill
- 80-20-reviewSkill
- api-versioningSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- autonomous-loopsSkill
- cachingSkill
- ci-cdSkill
- clean-architectureSkill
- configurationSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

