semantic-review
Skill0 starsChanged 46 days agoMITView on GitHub
Review a change (PR, MR, branch, path or pasted diff) and label every finding with a semantic label from m31coding's Semantic Code Reviews: Remark, Question, Hint, Suggestion, Important or Crucial. Each label tells the author what response is expected. Prints a verdict and numbered comments, then can post them to a GitHub PR or GitLab MR after confirmation. Invoke only via /semantic-review.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Lanqiao-Luca/ai-java-workflowtheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Lanqiao-Luca/ai-java-workflow★ 220same 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 repository3 other files it gives its agents.
- flockSkill
- keep-diggingSkill
- tell-my-managerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
The local branch: ask which branch to diff against (see "Ask for the base" below).
- Distinctive: line 32
Run this checklist on the changed lines and on whatever those lines directly affect, such as callers, callees, and tests of changed code:
- Distinctive: line 46
If commits aren't available (a pasted diff or a single commit), go file by file instead.
- Distinctive: line 48
Do the review yourself as a single agent.
- Very specific: line 52
Use the rubric in references/labels.md.
- Very specific: line 88
If there are no findings, print the target line and OK to merge.
- Very specific: line 94
Ask which comments to post (skip this when there are none).
- Distinctive: line 96
Check each comment's line against the diff hunks.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
semantic-review
Review a change and prefix every comment with one of six labels from Semantic Code Reviews, so the author knows what response each comment expects. The label definitions and the rubric are in references/labels.md. The gh and glab commands are in references/posting.md. Read both before you start.
1. Resolve the target
Take the first one that applies:
- An explicit argument: a PR or MR number or URL, a branch, a path, or a pasted diff.
- A branch means that branch's own commits. Ask which branch to review it against (see "Ask for the base" below), then
base=$(git merge-base <base> <branch>)andgit diff "$base" <branch>. Include uncommitted and untracked changes only when<branch>is the checked-out branch. - A path means that path's diff against the merge-base with the default branch (
git diff <merge-base> -- <path>), plus its untracked files, not the whole file.
- A branch means that branch's own commits. Ask which branch to review it against (see "Ask for the base" below), then
- The branch's PR or MR:
gh pr view --json number,url,stateorglab mr view -F json(readstate). Merged and closed PRs and MRs are still reviewed. The target line shows their state. - The local branch: ask which branch to diff against (see "Ask for the base" below). Then:
base=$(git merge-base HEAD <base>)git diff "$base"covers both the committed and the uncommitted changes to tracked files.git ls-files --others --exclude-standardlists the untracked files. Review each of them as fully added.
Ask for the base: suggest the default branch from git symbolic-ref --short refs/remotes/origin/HEAD (for example origin/main). Use AskUserQuestion if you have it; otherwise ask in plain text and end your turn.
For a PR or MR target, take the repository from the URL (not from the current checkout), and review the PR or MR head, not the local working tree. references/posting.md (Repository, and Diff and commits) has the commands.
The first output line names the target. For a PR or MR it includes the state (open, draft, merged or closed): Reviewing PR #123 (owner/repo, open), Reviewing MR !45 (group/project, merged), Reviewing feat/x vs origin/main (merge-base abc1234) + uncommitted and untracked changes, Reviewing src/api/ vs main (merge-base abc1234), or Reviewing pasted diff.
2. Review
Run this checklist on the changed lines and on whatever those lines directly affect, such as callers, callees, and tests of changed code:
- Correctness: logic errors, edge cases, error handling, concurrency, off-by-one errors.
- Security: injection, authn and authz, secrets, unsafe input handling.
- Tests: new logic without tests, tests that don't actually assert the behavior.
- Design and API: misleading contracts, leaky abstractions, breaking changes.
- Naming and readability: names that mislead, code that's hard to follow.
Stay in scope. Don't review untouched code that the change doesn't affect.
Large diffs (more than about 1,500 changed lines):
- Review the committed work commit by commit (
git log --reverse <base>..<head>, thengit show <sha>) so that no file is skipped. For a PR or MR,<head>is the fetched PR or MR head, not localHEAD(seereferences/posting.md). - For a local target that includes uncommitted or untracked changes, finish with one final pass over all of them at once (
git diff HEADplus the untracked files). Before that pass, tell the user it covers the uncommitted and untracked changes and may take longer. - A later commit, or the uncommitted changes, may fix what an earlier commit broke. Check every finding against the final state (the PR or MR head, or the working tree for a local target), and drop any that are already fixed. Anchor each comment to a line in that final state, or to the base side for a removed line (
path:-line, see step 4). - If commits aren't available (a pasted diff or a single commit), go file by file instead. Skip lockfiles, generated files and vendored files, and list what you skipped.
Do the review yourself as a single agent. Don't spawn subagents.
3. Label each finding
Use the rubric in references/labels.md. In short:
| Label | When |
| Crucial | Merging causes real harm: a reachable correctness bug, a security hole, data loss, a broken build or migration. |
| Important | A concrete defect or maintainability cost: an unhandled edge case, a missing test for new logic, a misleading API. |
| Suggestion | A better alternative exists, but the current code is acceptable. |
| Hint | Relevant for the future, not for this change. |
| Remark | A neutral observation. |
| Question | The intent can't be determined from the code or the repo. |
Rules:
- Crucial and Important comments must state the concrete failure: the inputs, then the wrong outcome.
- Question discipline: answer it from the repo first. Ask only when the answer depends on intent or context that isn't in the code. If you suspect a problem, use Important or Suggestion and state it directly. Never write "did you consider…?", "what if…?" or "shouldn't this…?"
- Cap Remark and Hint at about 3 combined. Drop comments that restate the diff. Crucial, Important and Question are never capped.
4. Output
Reviewing PR #123 (owner/repo, open)
Changes expected (2 Important)
1. src/api/users.ts:42
**Important:** `limit=0` returns every row, because `0` is falsy and falls through to the unbounded query.
Fix: check `limit === undefined` instead.
2. src/api/users.test.ts:10
**Important:** The new pagination path has no test, so the `limit=0` case above goes unnoticed.
3. src/api/users.ts:58
**Suggestion:** `paginate()` in `src/lib/db.ts` already does this offset math.
4. src/api/users.ts:12
**Question:** Is the 100-row maximum a product requirement, or a guess? Nothing in the repo or the linked issue says.- The target line comes first, then the verdict line:
Blocks merge (N Crucial),Changes expected (N Important)orOK to merge. - Then the comments, numbered and grouped by severity: Crucial, Important, Question, Suggestion, Hint, Remark.
- Each comment is
path:line, then**Label:** <one direct sentence>, then an optional short reason or fix.lineis a line of the new version. For a removed line, writepath:-line(for examplesrc/api/users.ts:-40), wherelineis the line number in the base version. - If there are no findings, print the target line and
OK to merge. For a PR or MR target, go on to step 5 and offer to approve, with no comments to post.
For local and pasted-diff targets, stop here.
5. Post (PR or MR targets only)
- Ask which comments to post (skip this when there are none). Accept edits such as
post 1,3,5,post all,drop 4orrelabel 2 as Suggestion. Recompute the verdict after any relabeling and show the final list. - Fetch the user's existing comments, inline comments and review bodies or summary notes alike, and skip any duplicate: the same label at the same line with similar text. List the ones you skipped.
- Check each comment's line against the diff hunks. Any comment that can't be anchored moves into the review body now, not after a failed post.
- Show what will be posted: the comments, the review body, and the GitHub event or GitLab action (including the LGTM fallback if approval is refused). Then wait for an explicit confirmation. Use
AskUserQuestionif you have it; otherwise ask in plain text and end your turn. - Post using
references/posting.md:- Inline comments keep their
**Label:**prefix. The verdict and any comments that can't be anchored go in the review body, one- `path:line` **Label:** ...line each. - GitHub event, first match wins: any Crucial or Important →
REQUEST_CHANGES(COMMENTon your own PR); open Questions →COMMENT; only Suggestion, Hint or Remark, or no comments →APPROVE. Open Questions never weaken a request for changes; they only hold back an approval. - GitLab:
OK to mergewith no open Questions →glab mr approve. Otherwise post the comments and a summary note without approving. If the verdict isChanges expectedorBlocks mergeand the user already approved, offer to revoke the approval and wait for them to confirm. - Approval refused: always try to approve when the rules say so, even on your own PR or MR. If GitHub or GitLab refuses (your own PR or MR, or project rules), post a comment or note saying approval wasn't possible and why, and that the change is LGTM.
references/posting.mdhas the exact steps.
- Inline comments keep their
- Report what was posted, with the review or note URL, and anything that was skipped or moved into the body.
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.

