mariadb-operator-pr-review
Perform a structured maintainer-style PR review for the mariadb-operator repository. Gathers PR context, triages the change, and evaluates correctness, safety, pitfalls, backwards compatibility and code quality against the project conventions documented in AGENTS.md. Use whenever the user mentions a mariadb-operator PR number or URL and wants any kind of judgment on it — "review this PR", "what do you think of #1234", "is this safe to merge", "assess this diff", "take a look at this change" — even if they don't literally say "review".
mariadb-operator · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add mariadb-operator/mariadb-operator --skill mariadb-operator-pr-review技能说明
name: mariadb-operator-pr-review description: > Perform a structured maintainer-style PR review for the mariadb-operator repository. Gathers PR context, triages the change, and evaluates correctness, safety, pitfalls, backwards compatibility and code quality against the project conventions documented in AGENTS.md. Use whenever the user mentions a mariadb-operator PR number or URL and wants any kind of judgment on it — "review this PR", "what do you think of #1234", "is this safe to merge", "assess this diff", "take a look at this change" — even if they don't literally say "review". license: Apache-2.0 metadata: author: mariadb-operator version: "1.0" compatibility: Requires GitHub API access (gh CLI or MCP tools) and the mariadb-operator repository checkout. allowed-tools: Read, Grep, Glob, Bash(git:), Bash(gh:)
mariadb-operator PR Review
You are a maintainer of mariadb-operator performing an initial review of a pull request. Evaluate the PR for correctness, safety, pitfalls, backwards compatibility and code quality, then give an overall assessment.
AGENTS.md is the source of truth
Read AGENTS.md at the repository root before reviewing. It is the authoritative description of this
project's architecture, patterns, gotchas and guardrails. This skill deliberately does not restate those
rules — it tells you how to run a review that checks a diff against them. Throughout, "§ " refers to a
section of AGENTS.md. When a check below says "verify against § X", open that section and compare the diff to it.
GitHub credentials
Whenever this skill calls GitHub — fetching PR context or delivering a review — pick the access method in this order, falling through only when the previous one is unavailable:
- Project-scoped GitHub MCP tools (names like
mcp__github-mariadb-operator__*). These may show up as deferred tools — if so, load their schema withToolSearch(e.g.ToolSearch({query: "select:mcp__github-mariadb-operator__get_file_contents", max_results: 1})) before calling them. ghCLI with the project-specific token, if themariadb-operatorMCP server isn't connected. UseGITHUB_MARIADB_OPERATOR_TOKENexplicitly (GH_TOKEN="$GITHUB_MARIADB_OPERATOR_TOKEN" gh ...) rather than the ambientgh authsession.- Generic GitHub MCP tools (
mcp__github__*), if neither of the above is available. ghCLI with default credentials (plaingh auth, no explicit token) as the last resort, if none of the above work.
Step 0 — Gather context
Given a PR URL or number, collect it via the access method chosen in the GitHub credentials
section (the gh invocations below assume that method — add the GH_TOKEN override or swap in the equivalent
MCP tool as appropriate):
gh pr view <n> --json title,body,author,state,additions,deletions,files,labels,baseRefName
gh pr diff <n> # full unified diff
gh pr view <n> --json reviews,comments # existing review discussion
Then, from the local checkout, pull the surrounding context the diff alone can't show:
- Pre-change versions of touched files in
api/v1alpha1/,internal/controller/,internal/webhook/,pkg/controller/— you need the before to judge behavioral change:git fetch origin <baseRefName> git show origin/<baseRefName>:<path/to/file.go> - Blast radius:
git grepfor callers of any new or changed function signature, and for users of any renamed/removed field or type. - The relevant
docs/<feature>.md(§ Feature Map) — cheaper than reading code to learn intended semantics.
For large PRs, spend attention proportional to risk: read HA/backup/CRD/webhook/builder changes line by line first,
then controllers, then everything else. Diff stats (gh pr diff <n> --name-only) tell you where to start.
Don't read generated files to review their contents (§ Token Savers) — for review, only their presence
or absence in the diff matters: a change to api/v1alpha1/ types with no regenerated artifacts is a quick reject.
Step 1 — Triage
- Classify the PR: feature, bugfix, refactor, docs/examples-only, dependency bump, or generated-files-only.
- Note which subsystems it touches and map them to § Feature Map + the phase list in § Phase-based reconciliation.
- Separate behavioral changes from purely structural ones (renames, formatting, moves).
- Read the existing review discussion fetched in Step 0: don't re-raise settled points, and where earlier feedback asked for a change, check whether later commits actually addressed it.
- Scale the review to the change: a dependabot bump or a docs typo does not need the full five-dimension pass —
say so and move on. Reserve depth for anything touching reconciliation, HA (
pkg/replication,pkg/galera), backup/restore/PITR, CRD schemas, webhooks, orpkg/builder. - Verify facts against the codebase only when a claim is load-bearing for this change — i.e. the change's
correctness or safety depends on it. Do not spot-check environmental invariants (module path, linter versions
and thresholds, whether a documented list matches the code today) — CI owns those, and confirming them adds
no signal to the review. For docs/guidance/tooling PRs (
AGENTS.md, skills, READMEs) the content is claims about the repo: sample only the few a reader would act on and that would cause real harm if wrong; do not exhaustively re-verify every statement.
Quick rejects — if any fire, surface it prominently up front:
- CRD types in
api/v1alpha1/changed, but the regenerated artifacts are missing from the diff (§ Codegen and generated files). - New behavior with no accompanying tests, or none tagged for the PR smoke set (§ Testing).
- RBAC markers added/changed without the manual Helm chart promotion — no CI job catches this (§ Gotchas → Chart RBAC is NOT generated).
- StatefulSet Pod template touched withou