/xwiki:xwiki-doc-convertfrom xwiki
Migrates legacy XWiki documentation pages into the new documentation tree by re-classifying content by Diataxis type, dropping obsolete material, and verifying completeness. Use when converting old pages or resuming an in-progress conversion plan.
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.
The goal is to move all old documentation into the new tree:
Documentation space) and every extension page under
https://extensions.xwiki.org/xwiki/bin/view/Extension/ (the Extensions wiki, a different wiki).Conversion is not a like-for-like rewrite. Treat the legacy page as source material, not as the target structure: extract the still-useful information, update it, drop the obsolete parts, and re-organize it into one or more pages that each follow the new documentation rules.
This skill builds on xwiki-doc-writing (the authoring procedure, review checklist, and live
per-type examples) and on the KB rules in kb/conventions/documentation.md (Diataxis types,
titles/page-names, page-structure fields, style, location, versioning) plus
kb/conventions/documentation-migration.md (what to do with the original page once its
content has moved). Read those for the rules; this skill covers only what is specific to converting.
A conversion is also the case the tools/ scripts of xwiki-doc-writing exist for: several pages
drafted together as data, linted offline, published idempotently, then audited. Start from
xwiki-doc-writing/tools/README.md — hand-rolling REST calls for a whole tree re-earns every trap it
already handles.
A real conversion — a legacy page split into several new ones, each needing freshly captured screenshots, plus the original page's attachments and backlinks — does not fit in one context window. So this skill never converts directly. It first writes a plan to disk, then works through it task after task, keeping the status in that plan so a fresh session can pick it up cold.
Do this before anything else, on every invocation:
pages.py and shots/ — a
<work>/<repo>/<date>-<slug>/ directory under the work directory given in the org-wide
conventions), run python3 docplan.py status. That one call is the orientation: it finds
conversion/PLAN.md, and prints the current task's full brief, the setup answers, the recent
decisions, the open questions and what comes next. Do not read PLAN.md by hand — in chunks
it costs a dozen turns at full context. Ask the developer only if the tool finds no plan and
several conversions are in flight.conversion/PLAN.md and the
first task files — extract, then target-map (layout, standard task set and templates:
references/conversion-plan.md), show the developer the task list,
and stop. Converting nothing is the correct outcome of a planning session.docplan.py start <NN>, execute the task, docplan.py done <NN> "<outcome>",
then go straight on to the next task: docplan.py brief prints its brief alone (the setup and
decisions are already in context). Do not read the other task files or the raw legacy source.target-map — the developer approves the split before any page is drafted;publish — the one task that writes to public xwiki.org;docplan.py status). A task that pushes the context past ~300k on its own: checkpoint it (a
Resumed at: note in the task file), hand off, and split it in PLAN.md — it was a planning bug.
Why these numbers, and not one task per session or a sub-agent per task: the reference's
"Resume protocol".Habits that keep a session small:
docplan.py status instead of reading
the plan in chunks; one script that answers five questions instead of five cat/grep/sed
commands. Exploration is where the turns go, not the writing.docshot.sh reports its own
dimensions and box verdict, and a PNG read into the conversation stays there for every later turn.
Open one only to judge content ("is the right menu open?"), once, not once per attempt.extract task produced it
for; re-reading the legacy page spends the context the plan was meant to save.Nothing reaches xwiki.org until the whole set is ready — why, and the publishing rules, are in
kb/conventions/documentation-migration.md → A migration publishes once, at the end. So the
page-* tasks are preparation tasks — they draft into pages.py, capture screenshots, and lint
offline — and one final publish task puts the whole set live in a single pass, parents before
children. A partially converted tree is never the visible state of the wiki.
The steps below are the content of the conversion; references/conversion-plan.md says which task
owns each one, and holds the PLAN.md / task-file templates and the resume rules. Read it in the
planning session, and in any session that has to re-plan or split a task.
Which task owns which step: 0–1 the planning session · 2 extract · 3–5 target-map ·
6–8 one page-* task per target page, which drafts and lints but does not publish · 9
dedup · 10–11 originals · 12 the single publish task at the end.
Ask the developer the four setup questions from xwiki-doc-writing first (that skill's "Before
writing anything" section owns the credentials-file lookup and the exact questions), and record
the answers in PLAN.md's Setup section — they are asked once per conversion, not once per
session. A conversion needs the local instance even more than fresh authoring does: legacy
screenshots are usually stale or absent, so most of the images on the new pages have to be
re-captured, not moved.
Check for existing Change Requests on the target first, so two people don't refactor the same page in parallel.
Read the legacy page in source mode and save it to conversion/source/ so you capture its real
syntax, links, macros and version
notes (not just the rendered text) — and so the sessions that come after this one, including the
final audit, still have the legacy content after the original page has been stripped. Alongside the
verbatim copy write the inventory: one bullet per atomic piece of material (concept,
prerequisite, procedure, warning, limitation, config detail, example, troubleshooting note, image,
video), tagged with its Diataxis type and audience. Every later task reads the inventory instead of
the raw legacy text. For an e.x.o extension page the page content is empty and
the documentation lives in xobject xproperties — enumerate every xproperty of every xobject and
filter for prose, never just description. installation and compatibility routinely hold
mandatory steps and prerequisites that appear nowhere else, and missing them is invisible later:
the "nothing lost" verification below would compare against your incomplete extraction and pass.
The field-by-field table is in kb/conventions/documentation-migration.md.
Decompose by Diataxis type, working from the inventories rather than the raw legacy text. A legacy page usually mixes types — some explanation, a procedure or two, a configuration reference, maybe a tutorial. Identify each distinct piece and its type and audience. Do not keep the mixed structure.
Split into target pages — one page per How-to, one per Explanation, one per Reference topic, and a separate Tutorial whenever an end-to-end scenario exists. Splitting is preferred over a long mixed page. Merge only when several legacy pages describe a single coherent topic.
Choose the location for each target page in the new tree (most relevant existing
topic/subtopic for its audience and type). Then fill PLAN.md's target map and write one
page-* task per target page, mapping every inventory item to the page that will carry it — an
item mapped to no page is either deliberately dropped as obsolete (say so in the map) or a gap
that the "nothing lost" audit will later fail on.
Rewrite each page with the xwiki-doc-writing flow — correct title/page-name, page-structure
fields, style, and latest-version perspective. The style rules apply to the sentences you carry
over too, not only to the ones you write.
Update while converting — remove obsolete information (a still-bundled deprecated feature
is not obsolete: see kb/conventions/documentation.md); update deprecated terminology, UI
names, and configuration examples; convert version-specific notes to the {{version}} macro and
drop notes for versions no longer supported. Never silently lose still-valid information.
Move the attachments too — and add the visuals the legacy page never had. A legacy page is rarely
illustrated to the new tree's standard, so carrying its images over is the floor, not the goal: the
converted User/Administrator pages want screenshots of the UI they describe (re-captured on the
local instance, since legacy ones show old skins), the Developer pages code examples, and an
Explanation you extracted about design/architecture a PlantUML diagram where the legacy page described the
structure in prose. Don't add a visual that clarifies nothing. Then, by the new
tree's rules — images and videos are content. Re-upload
them under kebab-case, lowercase-extension names, insert images with {{image}} + alt, and
re-encode a video to webm and display it with {{embed}}. When the legacy page embedded a
video or an image, the new page embeds it too: turning an embed into an attach: link is a
silent regression that no check catches. See kb/conventions/documentation.md.
De-duplicate and trim across the pages you produced — splitting one legacy page into several is
exactly what breeds duplication, because each new page wants to restate the context the legacy page
stated once. Do the cross-page comparison and trimming pass from xwiki-doc-writing before
declaring the conversion done, hub prose included. Legacy pages are typically far more verbose than the
new tree allows, and copying their prose across imports that verbosity: keep only what the reader needs
in order to act. A How-to/Tutorial you extracted also gets its result step (legacy procedures
almost never have one), and the hub page you create over the split links the children it introduces in context
rather than re-telling the legacy page's introduction or listing its children bare.
Handle the original page — after the content is moved, follow the guide's
Handle Original Documentation Pages
steps: strip the prose (leaving a link to the new location / adding the "Documentation" button),
then the two steps that outlive the prose and are the ones actually forgotten —
delete the page's leftover attachments and triage and repoint its backlinks. Both
procedures, including how to prove an attachment is safe to delete and which backlinks to leave
alone, are in kb/conventions/documentation-migration.md.
Handle the backlinks of anything you delete — including the pages you created. A conversion
often ends by removing a page: one superseded by the new tree, or one of the new pages you created
earlier in this conversion and then merged, moved or dropped. Every deletion follows
kb/conventions/page-deletion.md (list the backlinks, complete the list with a search, handle them,
then delete), and relocating a page is a rename/move rather than a delete-and-recreate.
Publish, once, at the end — as a single task, after dedup and originals have settled the
set. Save the pages parents before children so no page is ever live without its hub, then run
docpages.py verify, which is the first time xwiki.org's own doc checker sees them: expect a
round of fixes (page-name violations in particular) and re-save. Prefer a Change Request for
the whole set where the tooling can write into one — a conversion is a major change, the new
pages and the original-page edits belong in the same one so a reviewer sees the move whole, and
the pages stay invisible until it is merged. (The minor-change exception in
kb/conventions/documentation.md does not apply to a conversion.) Saving direct instead is a
decision to record in PLAN.md's Setup section, and it does not license publishing early: the set
still goes live in one pass, at the end.
Two consequences for the tasks before it. The offline lint is the only gate a page-* task
has, so anything the live checker would have caught has to be checkable offline — page names
with stop words in them, for one. And a page-* task cannot prove its page renders correctly,
so the publish task reads back what it published rather than assuming the syntax was right.
Refs: Migrate and Refactor Documentation, Handle Original Documentation Pages.
This is the verify task, the last one in the plan. A conversion is only correct if the new pages
preserve the legacy page's meaning and useful content.
Verify against conversion/source/ — the verbatim legacy copy and its inventory, which by now is the
only complete record of what the legacy page said — comparing legacy → new, and report issues with a
severity (Critical / Major / Minor / Suggestion), a location (page + section), the
problem, and a recommendation:
{{deprecated}}.){{version}} macro is used correctly.documentation.md); no procedures inside an Explanation, no conceptual essays
inside a How-to, no configuration tables inside a Tutorial.kb/conventions/page-deletion.md.kb/conventions/documentation.md (reuse the xwiki-doc-writing review checklist,
xwiki-doc-writing/references/review-checklist.md).Do not raise a finding merely because you would have phrased something differently: every finding must be justified by lost information, changed meaning, outdated content, a Diataxis violation, a documentation-guideline violation, or a concrete usability/maintainability problem.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xwiki, documentation-migration, content-refactoring, diataxis
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