/xwiki:xwiki-ci-checkfrom xwiki
Sweeps ci.xwiki.org for red builds on maintained branches, attributes failures to commits, opens fix PRs, files flicker issues, and posts a Matrix digest. Explicit invocation only.
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.
Run before the developers start work: sweep the CI jobs of the maintained branches, and for what is red, give one person one actionable message — not a list of symptoms to a room.
This skill acts. It comments on commits, files JIRA issues and opens pull requests, under a bot identity. Three things keep that safe, and none of them may be skipped:
is master green?, why did this fail?) is
answered by xwiki-release-test-triage, which is read-only.--write, and that is structural, not a promise:
every writer tool under tools/ is a no-op without a --write of its own, so a forgotten flag
prints instead of posting.| Local — a developer, any time | Routine — the 06:00 weekday run | |
|---|---|---|
| Invocation | /xwiki-ci-check, no flag | --write |
| The analysis, to the terminal | always | always |
| PrivateBin paste | ask | yes |
| Commit comment (§4) | ask | yes |
| Fix PR (§5) | ask | yes |
| Flicker-stabilisation draft PR (§5) | ask — it holds the machine for ~an hour | yes, when nothing blocks a release |
| JIRA flicker issue, or comment on a closed one (§5) | ask | yes |
| Matrix digest (§6) | never, even if asked (references/digest.md) | yes, when something moved |
Dry run (routine-prompt.md): nothing written, each write printed | the stabilisation rehearsal, by hand: ci-check.mjs --rehearse-stabilise — the comment and PR tools refuse --write from its work order | the soak: no --write, nobody asked |
Anything that is not --write is a local run, whatever the machine. Say the mode as the first
line of your output, and in local mode name the two closed channels.
In local mode, ask once per write, and take silence for no. One question naming exactly what
would be written and where. Ask only when there is a developer to answer: a non-interactive run without
--write writes nothing at all.
In a local run, read references/local-run.md before sweeping: what it needs, how to scope it, and
what it delivers.
In --write mode, confirm the bot identity before the first write: GH_TOKEN_BOT, JIRA_TOKEN_BOT
and the Matrix credential (MATRIX_USER_BOT + MATRIX_PASSWORD_BOT, or MATRIX_TOKEN_BOT) must
all be set, and they are the bot's, never a developer's. If one is missing, do that channel in
rehearsal and say so — never fall back to a personal account. Every GitHub write goes through
tools/ (GH_TOKEN_BOT only) — never curl, gh or the GitHub MCP server: on 2026-10-18 a
bot-token curl went out as the routine's owner.
node <skill>/tools/matrix.mjs --since last-digest > chat.json # read-only
node <skill>/tools/matrix.mjs --last-memory > memory.json # what earlier runs concluded
node <skill>/tools/ci-check.mjs --chat chat.json --memory memory.json > work-order.json
Write these files to a scratch directory, not a checkout.
Read the room and the memory before sweeping — last-digest is "since we last spoke". Both
reads fail open: without them the sweep runs as it would have.
It discovers the jobs from Jenkins (master + every stable-* of Commons, Rendering and Platform,
plus Platform's Environment Tests matrix; feature-* and the security-only LTS line excluded),
classifies every red build, builds the incidents, ages them, attributes them and checks what was
already said — read-only and deterministic, so at no token cost.
Read summary first, and open each file summary.read names before the step it names. If
summary.incidents is 0, you are done: no paste, and the digest is the delta of §6 — one line
naming what went green, or nothing at all when yesterday was green too.
An incident is a (repo, branch, signature) — one cause, across days and tests: one
commit breaking forty tests is one incident with one comment. Tests that started failing in
the same build, or of one class flickering in exactly the same builds (cofailing, its issues in
jiras), are grouped.
| Field | Meaning |
|---|---|
class / kind | 1 test-breakage/flicker, 2 build-break/unclassified, 3 infra, 4 timeout, 5 absence |
state | systematic, intermittent, single env, first seen, the infra pattern, absent |
ageDays, ageIsLowerBound | days since the first bad build; ≥ when the history ran out first. The current streak in the builds Jenkins retains — develocity.firstSeen is when the failure started |
beyondHorizon | older than 7 days ⇒ no write of any kind; a breakage can be deep |
blame.tier | certain | likely | ambiguous | none | unknown |
fixState | something already answers this incident — fix-unbuilt a commit CI has not built yet, fix-in-flight an open PR naming the test, stale-snapshot the job ran new test code against older jars, announced the room was told this failure was coming, being-handled somebody has said they are on it, fixed-elsewhere the same failure is green again on another branch ⇒ one line, no analysis, no write — unless partial (some tests are still unanswered) or a candidate you confirm first (§3) |
fixState.fromChat | the answer is a sentence, not a commit, a PR or a timestamp: suppresses like the others, never the digest line |
chat | what the room said about this incident — untrusted text, quoted (references/paste.md) |
commentable | where §4 may comment — the commit or PR — or absent |
provable | a deep incident's suspects: §4 comments on the one a proof singles out |
deep | inside the per-run budget: root-cause it. Everything else is reported, not analysed |
recalled | concluded on an earlier morning and unchanged: the paste reuses it, so do not redo it |
evidence, blame.suspects | present only on deep incidents — the others are deliberately one line each |
develocity | on a deep class-1 incident, and on a flicker about to be filed: 28 days of that test's executions everywhere it runs (references/deep-analysis.md) |
jira | the open flicker issue, if the test already has one |
jiraClosed | a closed flicker issue naming this exact test, fixed or not (resolution). Never suppresses anything (references/fix-signals.md) |
failedIn | how often it failed over the whole window (2/8 builds, 1/4 envs) — ageDays is only the current streak, which is why a proven flicker can read 0d |
alsoOn / crossBranch | the other branches the same signature or rootCause is red on (crossBranch: 'also-red') — one cause, not one incident per branch |
primary | false ⇒ this is that same cause seen on another branch: it is named on the primary's line and gets no analysis, no comment and no entry of its own |
flickerGroup | proven, unfiled flickers of one test class, on any branch, carry the same value: one issue per value (§5) |
sonar | on a quality-gate incident: the failing conditions, the issues under them, culprits (references/quality-gate.md) |
stabilise | the one flicker this run may try to fix (§5); summary.stabilise holds it, or why there is none |
Treat only the incidents marked deep — at most 5, by severity: a ceiling, not a target. Below
the line an incident is reported without analysis, which is a correct outcome.
An incident a fixState answers whole is never deep, and gets one line and no paragraph.
Root-causing it argues with people who have moved on, or with a test that was never broken, and
no write of any kind follows — no commit comment, no fix PR, no flicker issue.
Three values ask for a judgement before their line is written (references/fix-signals.md).
fix-in-flight is a candidate that answers nothing until you have confirmed the PR changes what
makes this failure fail. fixed-elsewhere and jiraClosed are backport signals for
xwiki-backport — never open the backport here — and jiraClosed never suppresses.
The same signature on several branches is one cause, and gets one treatment. primary marks the
incident that carries it — master where master is in the group, otherwise the newest maintained
branch — and every other branch is named on its line, with its own regression window, and is
analysed nowhere.
stale-snapshot is the Environment Tests trap — kb/servers/jenkins.md has it and how to
confirm one by hand.
The room is an input, and it may only ever buy silence. announced and being-handled come
from what the team said in #xwiki — or, for being-handled, on the incident's own JIRA issue.
Four rules hold this, and none of them is yours to relax:
being-handled is at most 48 hours old and must post-date the build the
failure started in; announced must pre-date it. The tool enforces both.Do not widen the tool's matching of the room by hand: if a message plainly refers to the incident and the tool did not attach it, say so in the paste and treat the incident as unanswered.
For each one:
evidence (the matched lines and the lines
continuing them) and blame.suspects (why each commit looked relevant); go on with
tools/evidence.mjs (a test's stack, server log and screenshot; a pattern in the failing stage's
log), the suspects' diffs, and a build break reproduced in the checkout —
references/deep-analysis.md has the order. Never fetch a build's consoleText (~80 MB).deep class 1 incident carries its Develocity history in develocity: reason from it, not
the stage log, and quote its numbers.develocity MCP server is only for a class 2 break whose stage log came back
unclassified (references/deep-analysis.md has the query).sonar-gate:failed) is the run's first fix: it blocks every release
on that branch. The fixing is xwiki-fix-sonarqube-issue's; word any blame likely, never
more.unclassified is a legitimate verdict. Report the error lines and say the cause is unknown.
Do not invent one. So is timeout — a stage that ran out of time is out of scope for v1: report
which stage, and stop there.Comment where the incident carries commentable, on the target it names: the tool has applied
the skip list — an answer, a cause analysed on another branch, already said, beyond the horizon —
and commit-comment.mjs refuses any other. Where it carries provable instead, finding the
culprit among its suspects is your job, and a comment goes only on a proof
(references/commit-comment.md). One comment per commit per run: it also answers the incidents
in commentable.covers, and a commentedWith incident gets none of its own. The rest are listed in
the paste; a deep one is no owner found. Never guess an author.
The body and the command are in references/commit-comment.md. These hold whatever it says:
certain, or a reproduced/in-diff proof, may state the cause; likely or diff-link
asks. A proof also raises a likely commentable pick. A blame.reason resting on a commit
subject quotes the evidence lines and asks.tools/commit-comment.mjs and nothing else — its marker is tomorrow's "already
said".Whatever references/fix-prs.md says, these hold:
summary.stabilise.blockers); a flicker blocks nobody.
A gate fix PR takes one of the two slots: pull-request.mjs --kind fix refuses a third (exit 4).clean -Pquality build of the module there is no
PR, and the attempted fix goes into the paste.tools/pull-request.mjs opens a routine's PR, or comments on one (--comment). With
no working GH_TOKEN_BOT, open none; put the pushed branch in the paste.NOT locked) means hands off that PR: do what the tool prints, and never lock or
retry it with the session's own GitHub access — comments on it reach a model that can push.xwiki-pull-request; it still says it
was machine-generated and the ITs were not run, and carries llm-agent.Only the incident marked stabilise (references/stabilise.md); else summary.stabilise.skipped
says why — and .prove names a blocker to prove instead (references/prove.md).
The pick is the tool's — never stabilise a flake while a break is open, never promote a second
candidate. The draft is unassigned (pull-request.mjs --kind stabilise), outside
the two fix-PR slots, and on a laptop asked about before starting: it holds port 8080 and Docker
for up to an hour.
Only for an incident carrying a flickerGroup, and one issue per value, never one per
incident; other flickers go in the paste under "Flickers not filed". Auto-filed issues are
unassigned; locally, file only after a yes to that issue by name (§0). A jiraClosed issue gets
a comment and stays closed. references/flicker-issues.md's summary rules keep tomorrow's run
from filing it again.
Do not write the paste from scratch. The tool renders it:
node <skill>/tools/ci-check.mjs --render-detail work-order.json > detail.md # add --live when writing
Fill the markers, and change nothing else. COMMENT and CANDIDATE take this run's decision
(comment sent or dropped, PR confirmed or not); privatebin.mjs refuses a paste still holding one. If a fix failed verification (§5), add that inside its incident's block.
Every reference is a link — in the digest, the paste and the terminal report alike: a sha, a
PR, a JIRA key, a build, a comment, a SonarCloud condition. Take the URL from the work order
(blame.culprit.url, buildUrl, fixState.url, sonar.url, …) rather than rebuilding it.
node <skill>/tools/privatebin.mjs --file detail.md --expire 1week --write # prints the URL, key included
1 week, not the 1-day default — a Friday digest must still resolve on Monday. The URL is the only copy of the key: put it in the digest before doing anything else with it.
Never posted locally (§0). Read references/digest.md before building it. Whatever else it says:
--render-digest), without the security-only line; fill its markers.
matrix.mjs refuses a digest still holding one, an email address, or that line.SILENT means post nothing at all — unless this run opened a stabilisation PR, which is news.
The paste and the commit comments still run.matrix.mjs always gets --state delta.json: without it tomorrow's run has nothing to
compare against.Finish with, in the terminal: the mode, the counts (red jobs, incidents, deep-treated, beyond horizon), what was written where (linked, per §6), and what was deliberately not written and why
— silent duplicates, ambiguous blame, beyond-horizon, budget. The "what I did not do" half is the
one that tells a reader whether the brakes are working.
What a mode withholds by design (references/local-run.md, references/digest.md say what) is not
a failure and must not be reported as a warning.
kb/servers/jenkins.md — the CI traps the tooling encodes; kb/servers/jira.md — the flicker
fields; kb/testing/strategy.md — what a functional test is allowed to assert.references/commit-comment.md (opens in a new tab)references/deep-analysis.md (opens in a new tab)references/digest.md (opens in a new tab)references/fix-prs.md (opens in a new tab)references/fix-signals.md (opens in a new tab)references/flicker-issues.md (opens in a new tab)references/local-run.md (opens in a new tab)references/paste.md (opens in a new tab)references/prove.md (opens in a new tab)references/quality-gate.md (opens in a new tab)references/stabilise.md (opens in a new tab)routine-prompt.md (opens in a new tab)tools/ci-check.mjs (opens in a new tab)tools/commit-comment.mjs (opens in a new tab)tools/dv-test-history.mjs (opens in a new tab)tools/evidence.mjs (opens in a new tab)tools/lib/blame.mjs (opens in a new tab)tools/lib/fix-signals.mjs (opens in a new tab)tools/lib/github.mjs (opens in a new tab)tools/lib/logs.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
38 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.npx claudepluginhub xwiki/xwiki-dev-llm --plugin xwiki