/gitbook:cr-reviewfrom gitbook
Reviews GitBook documentation change requests via the GitBook MCP server. Discovers CRs needing review, summarizes changes, leaves comments, and submits approve/request-changes verdicts.
Ships in gitbook. 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.
None: SKILL.md is the whole skill.
Review documentation change requests against a GitBook space or org entirely through the
GitBook MCP server (https://mcp.gitbook.com/mcp), so a reviewer never has to leave the
agent to find what needs review, understand what changed, and respond. This is the
reviewer-side companion to cr-create (the authoring side over the same operations). The
reviewer flow is: discover → understand → comment → decide.
Because every step is a real API operation, never fake an output: if a call returns nothing, says nothing changed, or errors, report exactly that.
Every action is an operation of the GitBook API, run through the GitBook MCP server with
invoke_operation and the operation ID from the map below (describe_operation shows its
inputs, search finds one by keyword). See cr-create's "Calling GitBook" for how to set the
server up when it isn't connected. The same operations exist in the GitBook REST API
(https://api.gitbook.com/v1), which requires a personal access token; see
https://gitbook.com/docs/developers/gitbook-api.
Every response is JSON — read whole objects. Never match fields by eye across separate lines of output — bind the wrong title↔id and every downstream call runs against the wrong space/CR (a confident "0 comments" from a space that isn't the one you meant). If an operation returns an error, surface it — do not report success.
<org>, <space>, <cr>, <pageId> are the relevant IDs. The REST path is shown for
reference; run each step with the operation ID.
| Step | Operation (REST path) | Notes |
|---|---|---|
| Resolve a person → user ID | listMembersInOrganizationById (GET /orgs/<org>/members), search=<name or email> | match on user.displayName/user.email; the user ID is id (= user.id) |
| List orgs (to get IDs) | listOrganizationsForAuthenticatedUser (GET /orgs), limit=100 | .items[] → id, title |
| List spaces in an org | listSpacesInOrganizationById (GET /orgs/<org>/spaces), limit=100 | .items[] → id, title |
| Discover CRs across an org | listChangeRequestsForOrganization (GET /orgs/<org>/change-requests), optional status, creator, space, site, requestedReviewer, contributor, orderBy | |
| Discover CRs in a single space | listChangeRequestsForSpace (GET /spaces/<space>/change-requests), optional status, creator, requestedReviewer | status is effectively required — omitting it returns an empty list, not everything |
| CR detail | getChangeRequestById (GET /spaces/<space>/change-requests/<cr>) | subject, status, createdBy, comments, urls.app |
| Link to review the diff | use .urls.app straight from the list/get output — never construct a URL | |
| Link to the rendered preview | getSpaceById → .organization, then find the site behind the space, read its urls.published/urls.preview, and append /~/changes/<number>/ | urls.app is only the diff view — see "Surfacing the preview link" in the cr-create skill for the full resolution steps. A bare site URL is not a preview of the CR: without the ~/changes/ segment it renders the site's current content. Reviewers deciding approve/request-changes usually want the rendered result, not just the diff |
| Structural change summary | getChangeRequestChanges (GET /spaces/<space>/change-requests/<cr>/changes) | entries like page_created/page_edited with page.title, page.path. Payload is {changes, more} — read .changes, not .items |
| Per-page prose diff | CR side getPageInChangeRequestById vs base getPageById, both with format=markdown, compared client-side | input to a prose summary only — never paste this as a line-by-line diff; point the user at urls.app for the actual diff |
| Existing comments (context) | listCommentsInChangeRequest (GET /spaces/<space>/change-requests/<cr>/comments), format=markdown, status=all | bodies at body.markdown; poster at postedBy.id; classify human vs gitbook:agent |
| Leave a comment (GATE) | postCommentInChangeRequest (POST /spaces/<space>/change-requests/<cr>/comments) body {"body":{"markdown":"…"}} (opt. "page"/"node") | posts publicly, notifies the author |
| Submit a verdict (GATE) | submitChangeRequestReview (POST /spaces/<space>/change-requests/<cr>/reviews) body {"status":"approved"|"changes-requested"} (opt. "comment":{"markdown":"…"}) | records a real review |
| Existing reviews / your own | getReviewsByChangeRequestId (GET /spaces/<space>/change-requests/<cr>/reviews) |
status on a review submission accepts exactly approved or changes-requested
(verified against the API enum ChangeRequestReviewStatus). This skill does not merge a CR
— merging changes shared state and is out of scope here.
authors notestatus, creator, space, site, requestedReviewer, contributor,
orderBy) are scalar query params and work directly. status takes a single value
(draft/open/archived/merged) — for "any state," union client-side. Omitting status
returns an empty list rather than everything, so always pass one. Default triage
discovery to status=open, but never filter to open when the user asks for the "latest"
or "most recent" CR — a space's newest CR is often a draft.authors filter does work (listCommentsInChangeRequest with authors,
an array). Even so, to split human vs agent you pull all comments and classify on
postedBy.id (a filter narrows, it doesn't classify).authors server-side filter is available (see above).limit, and paginate with the response's next.page cursor passed as
page — it is not an integer offset, so page=1 returns HTTP 400. Do this before
concluding "not found."listOrganizationsForAuthenticatedUser and
listSpacesInOrganizationById give IDs.creator/requestedReviewer take IDs, not
names. Resolve a name/email with listMembersInOrganizationById (search=…) first. That
includes the user themself for "assigned to me": ask for their email if you don't know it.urls.app, not a hand-built URL.urls.app opens the diff GitBook
itself renders (word-level, syntax-aware, split-view where the org has it enabled) — treat it
as the diff of record for the CR. The per-page markdown fetch-and-compare in "Summarizing a
CR" exists only to inform a prose summary of what changed — never paste a raw unified /
line-by-line diff into chat as a substitute for it.urls.app — it lives on
the Site object (urls.preview), not on the change request, so it's easy to forget it
exists. See "Summarizing a CR."limit (and
paginate with the next.page cursor as page, not an integer) and search the full set before
telling the user something doesn't exist.title/subject matches what the user named before
reporting counts or comments — a wrong-ID lookup returns believable, empty results.postCommentInChangeRequest (posts a public comment)submitChangeRequestReview (records an approve / request-changes verdict)
Discovering, summarizing, and reading comments need no gate.creator/requestedReviewer filter. Resolve the name
via listMembersInOrganizationById and, if there's more than one match (or none), show the
candidates and confirm who before filtering. Don't guess from the member list.status=open). A CR list won't include merged/closed items
unless you pass status explicitly — do so when the user wants those too.Run listOrganizationsForAuthenticatedUser (confirms access and gives org IDs), then
listSpacesInOrganizationById for the org you want (space IDs). Raise limit, and paginate with
the next.page cursor as page (not an integer), before concluding "not found."
<org>, <space>, <cr>, <pageId> below are the relevant IDs.
creator / requestedReviewer):
listMembersInOrganizationById with [email protected]. Match on user.displayName /
user.email; the user ID is id.listChangeRequestsForOrganization with status=open,
optionally narrowed with creator=<userId> or space=<space>. For "assigned to me", pass
requestedReviewer=<your user ID>.listChangeRequestsForSpace with status=open.getChangeRequestById
→ number, subject, status, createdBy, comments, urls.app.getChangeRequestChanges → page_created /
page_edited entries with page.title and page.path.getPageInChangeRequestById (CR side) and
getPageById (base side), both with format=markdown; compare the two client-side.listCommentsInChangeRequest with format=markdown
and status=all; classify on postedBy.id.postCommentInChangeRequest with
{"body":{"markdown":"Looks good — one nit on the retry section."}}. Add "page":"<pageId>"
(or "node":"<nodeId>") to anchor the comment.submitChangeRequestReview with {"status":"approved"} or
{"status":"changes-requested"}, optionally with "comment":{"markdown":"…"} in the same body.requestedReviewer=<your user ID>).listMembersInOrganizationById. If the search
returns more than one match — or none — surface the candidates and confirm before filtering.
Never auto-pick.status=open by default) and present a compact table, one row per CR:
number · subject · author (createdBy.displayName) · status · #comments (comments) · last
updated (updatedAt) · the app URL (urls.app).getChangeRequestChanges lists each changed page as
page_created / page_edited (with page.title and page.path) — enough for a "3 pages
edited, 1 new page" overview.getPageInChangeRequestById) and the base-side markdown (getPageById), both with
format=markdown, and compare them as input to a prose summary, not as output. Use the
comparison to describe what changed ("rewrote the intro, added a troubleshooting section")
— don't paste the raw unified / line-by-line diff into chat; GitBook's own diff (urls.app,
see step 3) is the diff of record and is always the better way to actually see the change.
Caveat: a markdown round-trip can re-escape multi-line integration blocks (e.g. a
{% @mermaid/diagram %} block) — don't report such re-escaping as a real authored change;
eyeball multi-line integration blocks before flagging them.urls.app — as the place to actually see the
diff (mention the split-diff view if the org has it enabled); the prose summary from step 2
supplements that link, it doesn't replace it. Also resolve and include the site preview
link (urls.preview on the Site behind this space — see cr-create's "Surfacing the
preview link") when one exists, so the user can see the rendered docs, not just the diff. If
the space isn't attached to a published site, say so rather than silently omitting it.postedBy.id == "gitbook:agent", advisory) separately from human comments.page/node), a specific page ("page":"<pageId>"), or a specific block ("node":"<nodeId>").postCommentInChangeRequest (gate — it's public and notifies the author).id / URL). Don't claim it posted if
the call errored.approved or changes-requested) and whether the user also wants a
summary comment (either post it first via "Leaving a comment," or include "comment":{"markdown":"…"}
in the review body).submitChangeRequestReview with {"status":"<verdict>"} (gate — records a real review and
notifies the author). Report the result verbatim.requested-reviewers list into reviews. So if a CR shows zero requested reviewers, it may
simply mean reviews are already in — check getReviewsByChangeRequestId.cr-create skill for the authoring side (create a CR, push content,
request reviewers, notify Slack, fix/resolve comments) — the MCP setup, the human-vs-agent
comment split, and the markdown round-trip caveat are documented there in more depth.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gitbookio/gitbook-skills --plugin gitbook7 skills in this plugin
/build-integrationBuild, develop, and publish GitBook integrations — apps that run inside GitBook to add custom blocks, react to events, connect external services via OAuth, and extend the editor. Use this skill whenever a task involves the GitBook integrations platform: scaffolding an integration with the GitBook CLI (`gitbook integration new`), writing or editing an integration's code (`createIntegration`, `createComponent`, ContentKit TSX), configuring `gitbook-manifest.yaml` (scopes, blocks, configurations, secrets), building custom editor blocks or link unfurlers, handling GitBook events like `space_content_updated`, setting up an integration's OAuth flow, running `gitbook integration dev`, or publishing an integration (private/unlisted/public, marketplace submission). Trigger this even if the user just says they want to 'build an app for GitBook', 'add a custom block', or 'connect <some tool> to GitBook' without saying the word 'integration'./configure-siteCreate and maintain GitBook documentation sites end-to-end — design structure from source content, scaffold a Git monorepo, set up the GitHub/GitLab remote, drive the GitBook API (REST or MCP) to create the site/sections/spaces, apply branding, and hand off the one UI step (Git Sync) that GitBook does not expose programmatically. Prefer site-level Git Sync (gitbook-docs.yaml mapping every space) over per-space sync unless a space needs its own repo or branch. Use when spinning up a new docs site, restructuring or extending one, linking a site or spaces to Git, changing branding (logo, colors, fonts, header/footer), or programmatically managing spaces, sections, or site-spaces. Defers page authoring to the companion `write-docs` skill./cr-createDrive an end-to-end GitBook docs review flow from the agent through the GitBook MCP server — create a change request, push content (update an existing page AND create a new page), request reviewers, notify Slack, then pull review comments back in, fix them, re-push, and resolve. This is the authoring-side companion to cr-review (the reviewer side over the same operations). Use this whenever someone wants to run a "docs review in GitBook" loop from the terminal/agent, mentions creating a change request via the API, pushing content into a CR, "pull in the latest comments and fix them," requesting review on docs, or showing engineers how to collaborate on GitBook docs from Claude + Slack without leaving the agent./docs-change-radarAutocomplete for a docs change. Name one thing that changed, or point it at a ticket, pull request, thread, pasted context, or an existing docs draft, and it finds everything else in the GitBook site that has to change with it, then makes those edits. Works with the GitBook MCP server and GitHub. Sweeps every page, reusable block, variable, and screenshot the change affects, opens with a TL;DR of the pages affected, proposes each edit in the team's own style guide, drafts one pull request or change request, records follow-ups, requests reviewers, and, on a later run, merges once approved. Use whenever someone asks to document a feature, launch, fix, or change in GitBook, says 'write the docs for this', 'what else does this affect', 'what else needs updating', 'run a docs radar', or 'check for stale docs', or asks for docs from a ticket or thread, even if they name only the obvious page./write-docsWrite, author, edit, and format GitBook documentation pages in Git-synced repos, IDEs, or any text editor. Use whenever a task involves creating or editing a GitBook markdown page, writing or updating a README.md or SUMMARY.md, inserting a hint, tab, stepper, card, or other GitBook block, configuring page frontmatter or layout options, setting up variables or expressions, or formatting content for GitBook outside the GitBook UI./write-openapiAuthor, configure, structure, and troubleshoot OpenAPI/Swagger API reference documentation in GitBook. Use this whenever a task involves a GitBook OpenAPI block or `{% openapi %}` block, adding or updating an OpenAPI/Swagger spec in GitBook (by file or URL, via the API, MCP, CLI, or app UI), generating API reference pages from a spec, configuring the interactive "Test it" runner (auth, servers, CORS, proxy), customizing pages with GitBook `x-*` extensions (icons, titles, navigation hierarchy, code samples, enum descriptions), marking operations experimental/deprecated/hidden, or automating spec updates in CI/CD. Trigger even when the user only mentions GitBook plus OpenAPI, puts an `x-` extension on a spec destined for GitBook, or asks "why isn't my spec loading" or "why doesn't Test it work", without naming this skill.Other plugins' skills for the same job