测试与安全

cr-review

gitbookio/gitbook-skills

Review GitBook change requests from Claude Code by calling the GitBook REST API directly with curl (no CLI) — the reviewer-side companion to cr-create (the authoring side over the same API). Discover the change requests that need review (filter by who opened them, by space, or across a whole org), get the GitBook app link to review the diff, summarize what actually changed in a CR, then leave comments and optionally submit a review verdict (approve / request changes). Use this whenever someone wants to review docs change requests over the raw API (curl/HTTP), asks "what CRs are open / waiting on me / opened by <person>", "show me the change requests in <space>/<org>", "summarize what changed in this CR", "review this change request", "leave a comment on a CR", or "approve / request changes on a CR". For the authoring side (create a CR, push content, request reviewers, fix comments) over the API, use cr-create instead.

  • 645 次安装
  • 23 星标
  • 收录于

安装命令

npx skills add https://github.com/gitbookio/gitbook-skills --skill cr-review

SKILL.md

GitBook CR Review (direct API)

Review documentation change requests against a GitBook space or org entirely through the GitBook REST API (https://api.gitbook.com/v1, hit with curl), so a reviewer never has to leave Claude Code 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 API). The reviewer flow is: discover → understand → comment → decide.

Because every step is a real HTTP call, never fake an output: if a call returns nothing, says nothing changed, or errors, report exactly that.

Auth and the gbapi helper

Every call is a Bearer-authenticated request to https://api.gitbook.com/v1. The token lives in GITBOOK_TOKEN in the repo-root .env (create one at https://app.gitbook.com/account/developer). Never print the token; never write it to a tracked file. Define this helper once per session and use it for every call below — it fails loudly on any non-2xx and prints the API's error body (curl --fail-with-body, curl ≥ 7.76 / stock on current macOS):