code-review
/code-review
Review a pull request, or the current branch, of C# and .NET code on Azure DevOps or GitHub. Use when asked to review code, check a PR against the team guidelines, find defects, or post review comments. Applies the coding, C#, HTTP API and ponytail guidelines. Posts comments only after the author confirms.
- Author
- dennisdoomen ↗
- Repository
- skills ↗
- Licence
- MIT
- Last repository change
- 06.11.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 3
No signals detected. Repository changed on 06.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Review a pull request, or the current branch, of C# and .NET code on Azure DevOps or GitHub. Use when asked to review code, check a PR against the team guidelines, find defects, or post review comments. Applies the coding, C#, HTTP API and ponytail guidelines. Posts comments only after the author confirms.
Original author description
Review a pull request, or the current branch, of C# and .NET code on Azure DevOps or GitHub. Use when asked to review code, check a PR against the team guidelines, find defects, or post review comments. Applies the coding, C#, HTTP API and ponytail guidelines. Posts comments only after the author confirms.
How it works
- 1. Load the skills first
- 2. Choose the target
- 3. Use a fresh context if you wrote the code
- 4. Collect context
- 5. Read the code
- 6. Walk the checklist
- 7. Reconcile
- 8. What to review
- 9. What not to post
- 10. Verify before you claim a defect
SKILL.md preview
---
name: code-review
description: "Review a pull request, or the current branch, of C# and .NET code on Azure DevOps or GitHub. Use when asked to review code, check a PR against the team guidelines, find defects, or post review comments. Applies the coding, C#, HTTP API and ponytail guidelines. Posts comments only after the author confirms."
---
# Code review
Follow the steps in order. Do not skip a step.
## 1. Load the skills first
Do this before anything else. Load these five skills:
`coding-guidelines`, `csharp-guidelines`, `http-api-guidelines`, `ponytail`, `ponytail-review`.
If a team skill with extra guidelines is available, such as a team-specific `<team>-coding-guidelines`, load it as well.
**Show the proof.** Write the names in a list. Put the call that loaded each skill next to its name. A skill with no load call next to it is not read. Go and read it. Never write that a skill was read when it was not. That has happened before, and it caused missed findings.
If a skill is not available:
1. Read its `SKILL.md` straight from its repository: `skills/<name>/SKILL.md` in https://github.com/dennisdoomen/skills (or the repository of the team skill), https://github.com/DietrichGebert/ponytail for the ponytail skills, or `Skills/csharp-guidelines/SKILL.md` in https://github.com/dennisdoomen/CSharpGuidelines.
2. Tell the author that the skill was not available as a skill.
3. If that fails too, stop. Tell the author which guidelines are missing. Do not review without them.
If you delegate the review (see step 3), the subagent does this step.
Loading a rule is not the same as applying it. Rules that were in context the whole time are still missed. The steps below turn recall into lookup.
## 2. Choose the target
1. If the arguments of the invocation say what to review, use that. Skip questions 2 to 4.
2. Otherwise, ask whether the author wants a review of a specific pull request.
3. If yes, ask for the pull request URL or number and any focus areas.
4. If the URL or number is invalid or not accessible, tell the author. Ask for a valid one.
5. If there is no pull request, review the current branch. Compare it with the target branch of its pull request. If there is none, compare it with the default branch of the repository.
6. For a pull request, check out the changes locally.
7. If the checkout would overwrite local changes, ask the author for a patch file. Or ask them to push their changes to a new branch.
If an earlier review of this PR exists, review the commits added after it again. An earlier review does not cover later commits.
## 3. Use a fresh context if you wrote the code
If you wrote or changed any of the code under review earlier in this session, do not review it in the main conversation. A review by the same author mostly confirms earlier decisions.
Run the review in a subagent instead. Run this same skill, by the name it is installed under. Do not use a generic review agent or skill.
- Give the subagent only the target (PR number or diff range) and the focus areas. State the target clearly, so it skips the questions in step 2. It cannot ask the author.
- Do not give it your reasoning or your earlier conclusions.
- The subagent does step 1 and all reading itself.
- The subagent does not start another subagent. It never posts anything.
- The subagent returns the verdict lines, the numbered summary, the "Checked" line and the drop table (see step 13).
- You pass these on to the author. Posting needs the author's confirmation in the main conversation.
## 4. Collect context
1. **Existing comments.** Read all existing threads on the PR. This includes comments from the PR author. Use them to avoid duplicates. The platform file says how to read them.
2. **Project settings.** Read `.editorconfig`, `*.DotSettings` and the analyzer settings. Note the rules for line length, wrapping, initializer layout, naming and member order. Use them in the checks below.
3. **Formatter or inspection tool.** Look for one. Do not assume there is none. Search the build and pipeline files for it: `*.yml`, `Directory.Build.*`, `*.csproj`, `.config/dotnet-tools.json`, `agents.md` and readme files. Look for `dotnet format`, `jb inspectcode`, `InspectCode`, `--verify-no-changes`, or analyzers with severity `error`. If you find one, run it on the changed projects. Keep the output. If you find none, note where you looked.
4. **Closest sibling.** For each new type, find its closest sibling in the same folder or feature. Examples: a new controller and the existing controllers, or a new spec class and the other specs. Compare visibility, attributes, documentation, helper structure and how the type is registered. A difference with no reason is a finding.
5. **Platform.** The platform file is `references/azdo.md` for Azure DevOps (`dev.azure.com` or `visualstudio.com`). It is `references/github.md` for GitHub. Read the one that matches the remote.
## 5. Read the code
Treat the code as written by someone else. This applies even if you wrote part of it.
1. Re-read every changed file in full from disk. This includes renamed files and files with a small diff. Do not rely on your memory or on the hunks you edited.
2. If the change set is too large to read completely, say so. List the files you did not read. They go in the "Checked" line.
3. **Read the diff first without the checklist.** Read it as a colleague who sees it for the first time. Write down anything that looks odd. Examples:
- a name that is awkward
- a comment you must read twice to trust
- arithmetic that is longer than it should be
- a method whose name promises more than the body does
Do not use IDs or rules here. Only write your first reaction. A checklist can only find what someone gave an ID. This step finds the rest. Keep this list. Add it to your findings in step 8.
4. **Model the design before the checklist.** Write three lines, for the author and for yourself:
- **Guarantee:** what the change promises (for example "one email per idempotency key").
- **Side effects in order:** each write or external call, in the order they run.
- **Gaps:** what happens if the process dies, times out or is retried between each pair of side effects, and while a second request runs at the same time.
Do this for every change that adds a retry, lease, lock, idempotency key, cache, queue publish, state column or check-then-act guard (look something up, then create or reject). Then ask for each gap: does the platform already solve it? Examples: Service Bus duplicate detection, a database constraint, an ETag, a unique index. A gap that a platform feature closes is a finding, even when the author documented it.
A gap that breaks the guarantee the PR adds is a finding too, even when no platform feature closes it and the gap already existed before the PR. Example: a PR that adds "no second account for the same email" leaves two requests at the same time free to both pass the check. Ask it as 🤔 ("Did you consider two requests at the same time?"). "Pre-existing" and "no platform fix" are not reasons to drop it.
Write the three lines to the scratch file from step 6.7. Show them in the reply (step 13).
## 6. Walk the checklist
1. List every changed file. Classify each one: HTTP function, DTO, spec file, service agent, project file (block `F`), config, and so on.
2. Every changed method also gets block `E`, whatever file it is in. A handler or a private helper matches no file type. A method that no block covers is not reviewed.
3. For each file, walk the matching block in `coding-guidelines/references/checklists.md`. If you loaded a team skill in step 1 that has its own `references/checklists.md`, walk its matching block right after the general one.
4. **Report a verdict for every ID in the block, in order.** Use one line per file:
`<file> (<block>, N items): A1 ok · A2 ok · A3 VIOLATION route is PascalCase · A4 ok · …`
Every ID must appear. A gap in the sequence shows that you skipped one. Never write "the rest are fine". Never summarize a block as "looks fine".
5. **Read the full reference files that apply.** List the contents of these folders first. A file added later must be read too.
- `coding-guidelines/references/`
- `csharp-guidelines/references/`
- the `references/` folder of any team skill you loaded in step 1
Read, in full, every file whose topic matches the changed code. Examples: `unit-testing.md` when specs changed, `azure-functions.md` when functions changed, `build-pipelines.md` when pipeline files changed. For C# code, read the files about naming, documentation and layout too. Do not skip a file because the change seems unrelated to it. Do not rely on the rules you remember from a `SKILL.md`.
6. **HTTP endpoints.** Check the status codes. Examples: `202 Accepted` when the work finishes in the background, and `201 Created` with a `Location` header. Check the error responses and the validation. State which API level applies (private, internal or public). Say whether the endpoint belongs in OpenAPI or must stay private on purpose.
7. **Where to write the verdict lines.** The lines can be very long. Write them to a scratch file, for example `review-selfcheck.md` in the temp folder. Do not paste them into the reply. The author sees the proof list from step 1, the reconciliation (step 7) and the drop table.
8. **Run `ponytail-review` over the diff.** Apply the skill, not only load it. Walk its ladder for the design as well as for the code: does this need to exist, does the platform or stdlib already do it? List its findings (one line each, with `net: -N lines possible`). Each finding goes through the step 9 gate, then appears in the numbered summary or in the drop table. Write "ponytail-review: nothing to cut" if that is the result.
## 7. Reconcile
Every ID that you marked `VIOLATION` must appear in one of two places:
- in the comments you plan to post, or
- in the drop table under step 13.
A violation in neither place was dropped without a record. This step exists to prevent that.
## 8. What to review
- Defects and design issues.
- **Design gaps found in step 5.4.** A concurrency, retry or failure gap with a realistic trigger is a finding. State the trigger in the comment (for example "publish succeeds, then the database update fails"). Verify it when proof is cheap (step 10). Otherwise use 🤔 and name the assumption.
- Names. Is the code clear without comments?
- Whether each `<summary>` says more than the identifier already says. "Normalizes a house number and its addition" repeats the method name. The reader learns nothing. It must say what normalizing does: which inputs are rejected, and what comes out. A comment with no information counts as a missing comment.
- Chances to use current C# and .NET features.
- Changed test and spec files. Use the same care as for production code. They are never out of scope.
- Equality and comparison methods. Check all null cases: both null, one null and one not null, and neither null.
- Config and settings files. Values meant only for production (feature flags, endpoints) need safe defaults for local development. A new setting that the code reads must also be registered wherever the deployment defines its configuration, such as Bicep, Terraform or the app settings of the environment.
- The PR title and description. They must describe what the user gets, not the technical steps. They must be correct about what the PR does.
## 9. What not to post
Apply this gate to every candidate finding. Do it before you think about severity.
- **Does the change make the code more correct, safer or easier to read?** If not, drop it. A design that leaves a realistic failure unhandled is less correct, even when it is documented. "It breaks a rule" is not enough. A rule decides the severity of a finding that already earned its place. It does not decide whether the finding earns a place.
- **Judge a rule by its purpose, not by counting.** AV1500 limits how much a reader must keep in mind. A flat list of independent guard clauses at one level of abstraction is fine, even with more than 15 statements.
- **A 🤔 or ❓ passes the same gate.** Before you ask, name the concrete harm: a failure, a data or privacy leak, a wrong result, a caller that breaks, or code the next reader cannot follow. "This couples X to Y" or "a dedicated name would be cleaner", with no such harm, is too minor. Put it in the drop table. Example: a 🤔 on reusing existing App Configuration keys for a new, similar mail was deleted as not worth a comment.
- **A checklist violation is dropped only by the first question of this gate.** "It states the intent of the test", "it matches the existing tests" or "it is pre-existing" are not reasons when the PR adds or repeats the code. Example: `NotContainRequestFor` assertions dropped as "it states the fact the test name promises" were later posted by a human reviewer.
- **A documented risk is not a reason to drop a finding.** A log message, comment or PR description that admits something can fail shows the author knows it. It does not show that a simpler or safer option was considered. Ask the question (🤔). Drop it only when no alternative exists. This does not apply to a design choice the author disclosed that has no failure mode, such as reusing a config key. That choice must pass the first question of the gate on its own.
- **Check the member first.** Before you review the details of a member, ask whether it should exist at all. Do not polish the comment of a method that should be deleted.
- Do not flag what an analyzer, `.editorconfig` or the compiler already reports.
- Do not repeat an observation from an earlier review or from another reviewer. This includes comments by the PR author on their own PR.
- **A written guideline beats the local habit.** If the sibling files break the rule, that is not a reason to drop the finding on new code. Post it. Name the precedent, so the author knows it is not personal. Example: "Same as `<ExistingType>`, which we should fix too."
- Only `.editorconfig` can override a guideline. Habit cannot.
- Be careful when you cite a sibling as a good example. Check what it does right before you decide that new code may copy what it does wrong.
- Do not lower the severity for this reason. Code that the PR adds or changes must follow the current rules. It stays 🔧. Use ⛏ only if it is really taste. Use 🏕️ only for code the PR did not touch. A pattern that the PR repeats is not that, however old the pattern is.
There is no limit on the number of findings. Post every finding that passes the gate. Order them by what you want fixed before merge. Never merge two different findings into one comment to reduce the count.
## 10. Verify before you claim a defect
A made-up defect is worse than a missed one. The author loses time to disprove it. It also lowers trust in the rest of the review.
For anything you call a bug (wrong result, exception, broken contract), prove it first when proof is cheap:
- Write the expression in a scratch console project and run it.
- Load the real assembly and check the real code. Do not infer from the name.
- Run the affected `*.Specs`. Do not predict what they do.
Be careful with reasoning about generic type inference, `default(T)`, boxing of `Nullable<T>`, operator overloads and serializer defaults. A confident chain of logic often fails here. Example: a review said that `IsNullOrDefault()` on a `bool?` treats `false` as missing. It does not. A five-line program would have shown this.
If proof is not cheap, say so in the comment. Use 🤔 or ❓. Name the assumption you could not check. Never state an unchecked defect as a fact.
## 11. How to write a comment
Load the `plain-english` skill before you write comments. The readers may not be native English speakers.
- **One sentence, at most 120 characters.** State the problem and the fix. Nothing else. The severity prefix, a thread link and a named precedent do not count toward the 120.
- No reasons, no repeat of the guideline, no worked example. No code block, unless the fix cannot be said in words.
- Group repeats. Comment on the first case. Add "Same applies to the other tests" or "Same for the other properties". Never post many near-identical comments.
- To point to an earlier comment, link its thread. The platform file shows the link format.
- Name the guideline when one exists. Do not repeat its argument.
- Write in US English.
## 12. Severity
Start every comment with its emoji, in the comment text. Keep the 🤖 marker. It shows that the comment is automated. Do not remove it when you build API payloads.
- 🔧🤖 This must change. It is code that the PR added or changed, and it is worth fixing.
- 🤔🤖 I do not follow this, or I think it is wrong. Also use it to suggest an alternative, or to explain the code in my own words to check my understanding.
- ❓🤖 A complete question about information I do not have and cannot find in the code.
- ⛏🤖 A nitpick. It is taste, formatting, or a C# or .NET suggestion that no rule backs.
- ♻️🤖 A refactoring suggestion for code that the PR changed. It does not block the merge. Unlike 🔧, it is a nice-to-have.
- 🏕️🤖 A chance to improve old code that the PR did not touch. The aim is to leave the code in better shape than we found it.
- 🌱🤖 An observation with larger effects. It is not a request for a change. Use it rarely.
- 💪🤖 This is really good. Use it rarely, and only when you mean it.
Rules for choosing:
- Severity applies only to findings that passed the gate in step 9. A rule behind a finding sets its severity. It does not give the finding a place.
- **A finding that maps to a written rule is 🔧.** Do not lower it to ❓ or 🤔 to be polite. If a guideline says that a synchronous create returns `201 Created`, write "🔧🤖 This must be 201 Created". Do not write "❓🤖 Is 202 the right status code here?".
- ❓ and 🤔 are for real uncertainty. This includes a defect you could not verify cheaply.
- ⛏ needs two things: no rule backs the point, and it still passes the gate.
- A design gap with a realistic trigger and a platform-provided fix is 🤔 when you cannot prove the trigger cheaply, and 🔧 when you can.
- A cheap fix is not a nitpick. Removing detail that hides the point of a test is a change request.
- **Hard to follow means 🔧.** If a reader must read a block twice to follow it, that is 🔧. Examples: a long chain with many branches, or a change to the data that has no description. ♻️ is for code that is already clear and could be cleaner. Do not choose the softer label only because a shorter version is easy to imagine.
## 13. Before posting
1. Check your calibration. About half of all findings are usually 🔧. This is a check, not a quota. If almost none are 🔧, look again at your rule-backed findings. If most are 🔧 because a rule only mentions the point, look again at the gate. For each 🤔, check that the harm is clear from the comment itself. If it is not, move the 🤔 to the drop table.
2. Write a short numbered list of the findings.
3. Add a "Checked" line. It lists:
- the skills, with their load calls (step 1)
- the reference files you read
- the project settings you read
- the formatter or inspection result, or where you looked and found none
- the sibling files you compared
- the changed files you did not read
- the design model from step 5.4 (the three lines), or "no design change"
- the `ponytail-review` result from step 6.8
Never write that something was checked if you did not check it.
4. Show the dropped candidates in a table. Do not describe them in prose.
| Checklist ID / rule | `file:line` | Finding, one clause | Why dropped |
|---|---|---|---|
Rules for the table:
- A candidate you decided against while thinking is a dropped candidate. If it is not in the table, you hid it. This includes everything you noticed and chose not to raise.
- Put the drops that cite a written rule at the top. These are the drops most likely to be wrong. They must be easy to see.
- For each drop that cites a written rule, the "Why dropped" column names the gate question from step 9 that removed it. "Pre-existing" alone is not a reason when the PR adds, changes or builds on that code.
- End with the count: `posted = N`, `dropped = M`. Every drop needs a reason from the gate. Never drop a finding to reduce the count.
- State that the reconciliation holds. Or name the IDs that do not.
5. Ask whether the user wants changes. Then ask for explicit confirmation to post.
⚠️ **STOP before posting.** Do not post any comment until the user has confirmed. There are no exceptions.
## 14. Posting
When the user asks you to post, the first step is always the same. Look for an open (pending) review of the user's own on that PR. Do this every time, before you create anything. If you find one, add your comments to it. Leave the submission to the user. Create a new review only if there is none.
The platform file has the exact calls:
- Azure DevOps: `references/azdo.md`
- GitHub: `references/github.md`
After posting, read the comments back from the platform. Check that the emoji and code spans are correct. Only then tell the user that posting is done.
Files in this package (3)
- SKILL.md 21 KB
- references/azdo.md 2 KB
- references/github.md 3 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · dennisdoomen/skills | 100 | MIT |
| microsoft/aspire | 100 | MIT |
| kdlbs/kandev | 100 | AGPL-3.0 |
| dotnet/runtime | 100 | MIT |
| drosam/agents | 100 | MIT |
| ggml-org/llama.cpp | 100 | MIT |
| ShamelesAbyss/Nyx | 100 | Apache-2.0 |
| dzhng/jevgrep | 100 | MIT |
| iuliandita/skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version f09baaa61da9 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100pr-review-comments
Guide for submitting/posting inline PR review comments to GitHub. Use this when you need to post code review comments on specific lines of a Pull Request. - 100post-code-review-to-pr
Run a full pull request review and post review comments directly to the current branch's GitHub PR. Requires the gh CLI to be installed and a PR to already exist for the current branch. Use when you want review feedback posted to GitHub as PR comments. For local code review… - 100review-pr-local
The authority on pulling a pull request — Azure DevOps or GitHub — into an isolated local worktree so a human can review it in their editor, and on posting human-controlled review comments back to the PR (ADO via the ado PR-thread MCP tools or the Azure DevOps REST API, GitHub… - 100pr-review
Review an Azure DevOps pull request in Review with me, Review for me, or Delegate mode. Fetch the PR, review the code, and record the verdict to Argus. Use when given a PR link or number, or asked to review a PR. - 100review-pr-local
The authority on pulling a pull request — Azure DevOps or GitHub — into an isolated local worktree so a human can review it in their editor, and on posting human-controlled review comments back to the PR (ADO via the ado PR-thread MCP tools or the Azure DevOps REST API, GitHub… - 100debate-review
Two-model debate review of a GitHub PR, GitLab MR, Azure DevOps PR, or local working tree, posted as inline comments or printed. Use for any PR/MR review request, or a local review before a PR exists.