Skip to content

add the claude review and @claude workflows - #10

Merged
adssib merged 1 commit into
mainfrom
claude-review
Nov 19, 2026
Merged

adssib merged 1 commit into
mainfrom
claude-review

Conversation

@adssib

@adssib adssib commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Adds Claude reviews to the docs repo, modeled on the review we run in our other repos (same action, anthropics/claude-code-action@v1, same token secret CLAUDE_CODE_OAUTH_TOKEN, same model), with a prompt written for these docs and the same fork-safe setup as patch-it-dev/patch-it-plugins#105.

  • .github/workflows/claude-code-review.yml: an automatic review, once per PR (pull_request types opened, ready_for_review, reopened; drafts skipped). The prompt checks:
    • the docs match what the CLI and the Action do: contradictions with the rest of the docs (configuration, CLI and Action guides, API reference) are flagged; behavior claims the PR doesn't back with a link to the client change go under "Needs a maintainer to confirm" (the client repo isn't readable from this repo's token);
    • links resolve: site links like /guides/cli/ match a page under src/content/docs/, anchors match a heading, relative links and images exist;
    • nothing internal (public repo);
    • the plugin table isn't hand-edited (it's synced from patch-it-plugins);
    • the voice (calm, sharp, wry; lowercase patch-it; no emoji or hype), non-blocking.
      It verifies with npm ci and npm run build.
  • .github/workflows/claude.yml: a maintainer mentions @claude (in particular @claude review on a fork's PR) and Claude answers read-only, with the same checklist.
  • README.md: a Reviews section.

No ticket: this is a repo-setup change.

Fork safety (same as patch-it-plugins#105)

Same-repo PR Fork PR
Automatic review Runs once (job if: github.event.pull_request.head.repo.full_name == github.repository) Doesn't start: a fork's run gets no secrets
@claude review (claude.yml) Works Works, only when the commenter's author_association is OWNER, MEMBER or COLLABORATOR; the action then checks write access itself
  • Never pull_request_target.
  • On a fork's PR the action checks out the fork's code to read, after restoring Claude's config (CLAUDE.md, AGENTS.md, .claude/, ...) from the base branch, and denies commands that run repo code for authors without write access (action security docs).
  • claude.yml is read and comment only on top of that: --permission-mode default, allowed Read, Grep, Glob, gh pr view/diff, gh issue view, inline comments; denied Edit, Write, WebFetch, WebSearch, git add/rm/commit/push and the action's commit tools. No issues: opened trigger, no allowed_bots.
  • The automatic review (same-repo PRs only, authors with write access) may run npm ci and npm run build, nothing else.
  • display_report: false and a diagnostics step that prints only blocked tool names: run summaries are public.

The token

Until the token is available the review skips with a notice instead of failing. This repo is public, so it gets the org-wide CLAUDE_CODE_OAUTH_TOKEN; nothing to set here. Needs the Claude GitHub App, already installed org-wide. A PR that edits these workflows can't run them, so they take effect after merge.

Calls I made (please check)

  • Accuracy against the CLI/Action can't be checked directly from here (that repo is private and the action's token is scoped to this repo), so the review flags contradictions within the docs and asks for a link to the client change, listing unbacked claims for a maintainer.
  • External links aren't fetched (no web tools); the review lists the ones it couldn't check.
  • A member with private org membership can show as CONTRIBUTOR and be ignored by @claude here.

Related PRs

🤖 Generated with Claude Code

@adssib
adssib merged commit 894dc9d into main Nov 19, 2026
1 check passed
@adssib
adssib deleted the claude-review branch November 19, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant