/xwiki:xwiki-reviewfrom xwiki
Performs an expensive, XWiki-aware code review of a change set (PR, commit range, or working tree) using multiple senior-reviewer agents and an independent verifier. Opt-in only via `/xwiki-review` or CI.
Ships in xwiki. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is opt-in, never the answer to a plain "review this": it runs only when named
(/xwiki-review, "run xwiki-review") or invoked by a CI routine. It costs several times a
single-pass review.
What it must do better than a single pass: find the problems a strong XWiki committer would find — bugs, a better existing tool or place for new code, tests that prove nothing, a point the project's reviewers have raised before — and apply XWiki's written conventions, without the noise. Each reviewer therefore brings general engineering judgement and XWiki's knowledge; neither limits the other. Every finding is then re-checked against the code by someone who did not write it, because a review nobody trusts is worse than no review.
The caller supplies one of:
PR <number> — the checkout must be at the PR's head (gh pr checkout).COMMITS <base>..<head> — that range (the daily sweep over direct pushes).HEAD, untracked files included (local pre-PR use).The review goes to a PR comment, a commit comment on the range's last commit, or — for the working tree — the terminal only (§4).
Decide the security depth before any work starts, so the run never stalls on it later:
quick — the Defensive conventions reviewer (§2). The only depth when a CI routine invokes
this skill, or when the session has no xwiki-security-review skill (the private xwiki-security
plugin) — then do not ask.full — run xwiki-security-review on the same change set in its place (§2b). Only offered
when that skill is available and a developer is at the keyboard: ask whether they want the full
security review — it proves each finding on a disposable local instance and costs far more time —
or the quick one.From the checkout, write the pack into a new directory under the work directory:
node <skill>/tools/pack.mjs --out <dir> [--pr <n> | --range <base>..<head>]
It writes pack.md (commits, changed files and their module profile, applicable CLAUDE.md files,
the JIRA issues), diff.patch and prior-reviews.md (what committers said on earlier pull requests
touching the same files), and prints the gate. If stop is set, stop — post nothing, except that
a change too large to review gets a one-line comment saying so.
One judgement call is left, from the diff alone: stop if the change carries no human judgement worth
reviewing — mvn license:format or xar:format output, a translation sync, a typo in a comment, a
single @since fix.
| Reviewer | Runs when |
|---|---|
| Correctness | the change touches code (anything but docs or translations) |
| Design | the change adds or reshapes code |
| Tests | the change touches code or tests |
| History | always |
| Conventions | always |
| Defensive conventions | always — at full depth, replaced by §2b |
Say in one line which ran and which did not, and why. Give each agent its role name, the pack
directory, the plugin's absolute root (in Claude Code ${CLAUDE_PLUGIN_ROOT}, in Kimi Code
${KIMI_SKILL_DIR}/../.., in opencode $XWIKI_LLM_HOME/xwiki; the KB is its kb/) and the absolute
path of references/reviewers.md, which it reads — the shared part and its own role only. Run every
reviewer and verifier on the session's model: Correctness and Design are where a weaker model
loses most. They are read-only: never edit, build, push or post.
Read references/reviewers.md's "Never write the word" yourself before fanning out, and load
kb/processes/security-policy.md: that section binds your own narration, the comment and every log
from here on (§5 says why).
xwiki-security-reviewAt full depth the Defensive conventions reviewer does not run: xwiki-security-review does its
work and more. Invoke it on the same change set, concurrently with the reviewers, and let it follow
its own procedure and gate unchanged.
Its output never joins this pipeline: not §3's verifiers (it proves its own findings), not §4's comment, not any log. It stays in that skill's report in the work directory and in the terminal; §4's comment leaves the role out of both its run and its skipped lists. Should the developer then ask to tell the author about one of its findings, that skill's gate says how — phrased as §5 prescribes, as one more finding of the comment.
Merge findings that make the same point about the same code, keeping the best evidence and the most
specific source. Then run one verifier per finding, in parallel, each given the finding, the pack
directory, the plugin root and the absolute path of references/verifier.md, which holds its
instructions. Keep the findings it returns as keep, at the severity it gives; drop the rest.
Re-run pack.mjs (the PR may have been merged or closed, or reviewed by another run, while you
worked; stop must still be unset), and check the comment against "Never write the word" in
references/reviewers.md. Then post one comment — on the PR for PR, as a commit comment on the
range's last commit for COMMITS (gh api repos/<repo>/commits/<sha>/comments). For the working
tree post nothing: print the same body in the terminal, without the marker, citing code as
path:line. Never split a review across several comments.
The comment's first line is the marker <!-- xwiki-review sha=<full-head-sha> --> (invisible once
rendered, and what pack.mjs looks for); then this disclaimer, verbatim, always:
Automated review — generated by Claude Code. It can be wrong. Treat every point below as a question, not a verdict: verify the claim against the code before acting on it, and dismiss anything that does not hold.
Then:
### Automated review
Reviewed <N> files: <reviewers run>. <M> issue(s), <S> suggestion(s), <K> nit(s).
**Blockers**
1. <one-sentence claim> <why, one sentence>. <what to do instead> — <source, linked>
<permalink>
**Major** / **Minor** (same shape)
**Suggestions — not blocking, take or leave**
4. ...
<details><summary>Nits</summary>
5. ...
</details>
<Reviewers that did not run, and why.>
Rules for the body:
https://github.com/<repo>/blob/<full-40-char-sha>/<path>#L<start>-L<end> (the head from the gate
output; a $(git rev-parse HEAD) inside the URL will not render).https://github.com/xwiki/xwiki-dev-llm/blob/v<version>/xwiki/<path> (<version> from
xwiki/.claude-plugin/plugin.json), a past review to its PR. "Engineering judgement" needs no link.1 issue, not 1 issues. With nothing kept the
comment is the marker, the disclaimer and the Reviewed … line — post it anyway: the marker is what
stops a re-trigger from re-running the whole review.gh for all GitHub interaction.kb/processes/security-policy.md holds the non-disclosure rule; what follows is only its
consequence for review output, which the policy does not itself cover. This repo is public, and so
is more than the comment:
GitHub Actions logs on a public repository are public. Everything the run prints — the narration, an agent's returned text, a job summary — is world-readable at a stable URL and stays in the log archive. Reasoning that never reaches the comment is published anyway.
There is therefore no safe place in this pipeline to say that something is a vulnerability. The resolution is not to hide the finding but to never form it as one: the Defensive conventions reviewer checks mechanisms, not attacks, so no stage — reviewer, verifier, comment, log — ever holds a sentence worth suppressing. A finding phrased that way reads like any other convention finding — actionable for the author, signalling nothing to anyone reading over their shoulder: the device the policy prescribes for a security fix's commit message.
Out of scope, deliberately. This routine does not hunt for novel vulnerabilities, which need
reasoning about reachability and attacker capability that cannot be phrased mechanically. That work
stays with humans, on the security list, and with committers running the full depth locally, where
nothing is published. The routine must never be described as a security review — nor may the comment
say, or hint, that a full review ran.
Reviewers return candidate conventions — something that should hold for every change and that no
KB topic says. They are not posted: batch them and offer them to a human through the
xwiki-knowledge EXTEND flow, which is how the review gets sharper instead of repeating unwritten
opinions.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xwiki/xwiki-dev-llm --plugin xwiki38 skills in this plugin
/xwiki-backportBackport any change (bug fix, feature, refactor, or test) to an older branch of an XWiki repo (xwiki-platform / xwiki-commons / xwiki-rendering / xwiki-contrib). Cherry-pick `-x` the source commit(s) into a worktree, ADAPT the result to the older branch (module pom versions, Java level, `@since` tags, data migration versions and skip ranges, style/API divergence), verify it compiles against that branch, and push / open a PR. Use whenever a commit that exists on one branch needs to be applied to an older/maintenance branch. For the `testneeded`-labelled test sweep use xwiki-backport-testneeded (which builds on this skill); for Maven commands use xwiki-build; for PR/commit conventions use xwiki-pull-request; for the versioning/`@since` conventions (the format and what carries `@since`) use xwiki-knowledge./xwiki-backport-testneededBackport the automated test of one JIRA issue labelled `testneeded` to the currently-supported stable branches, adjust its `@since` tags across all branches, and open the PRs. Use when asked to backport the test of a given testneeded issue, or to catch a stable branch up with a recently-added test. (For several issues at once, the user will say so — then apply this per issue.) This is the test-specific layer on top of xwiki-backport (which owns the generic cherry-pick / adapt-to-branch / verify mechanics — including the mandatory pom-version, Java-version and `@since` checks). For Maven use xwiki-build; for PR/commit conventions use xwiki-pull-request; for the `@since` rules use xwiki-knowledge; for querying JIRA (the testneeded sweep) use xwiki-jira.