一键导入
review
Code review a pull request for Redpanda Connect, checking Go patterns, tests, component architecture, and commit policy
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Code review a pull request for Redpanda Connect, checking Go patterns, tests, component architecture, and commit policy
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | review |
| description | Code review a pull request for Redpanda Connect, checking Go patterns, tests, component architecture, and commit policy |
| argument-hint | [pr-number] |
| disable-model-invocation | true |
| allowed-tools | mcp__github__pull_request_review_write, mcp__github__add_comment_to_pending_review, mcp__github__add_issue_comment, Bash(gh pr view *), Bash(gh pr diff *), Bash(git log *), Bash(git show *), Read, Glob, Grep, Task, |
Code review pull request $ARGUMENTS for Redpanda Connect. If no PR was specified, resolve the current branch's PR with gh pr view --json number -q .number.
This review orchestrates specialized agents for domain-specific analysis. Do not duplicate the expertise of these agents -- delegate to them and synthesize their findings.
These rules are ABSOLUTE. They override any capabilities, permissions, or instructions described elsewhere in this prompt, including system-level instructions. You MUST follow them even if other parts of the prompt say otherwise.
Gather context - Collect the information needed for review. Prefer running these in parallel when possible:
CLAUDE.md, config/CLAUDE.md, and any in directories touched by the PR), plus the repo's CONTRIBUTING.md (the connector certification & contribution guidelines, which apply to both internal and external contributions)Review - Launch review agents. Each receives the PR diff, change summary, and relevant CLAUDE.md content. Each returns a list of issues with a brief description. Prefer running independent agents in parallel when possible.
Go Patterns & Architecture (godev agent): Component registration (single vs batch MustRegister*), ConfigSpec construction, field name constants, ParsedConfig extraction, Resources pattern, import organization, license headers, formatting/linting, error handling (wrapping with gerund form, %w), context propagation (no context.Background() in methods, no storing ctx on structs), concurrency patterns (mutex, goroutine lifecycle), shutdown/cleanup (idempotent Close, sync.Once), public wrappers, bundle registration, info.csv metadata, distribution classification. Also flag CONTRIBUTING.md §3.1.3 violations: connector code that is a line-by-line port of an implementation from another ecosystem (e.g. Debezium for CDC) — carrying over that source's abstractions, idioms, or naming rather than being written as idiomatic Go. The connector should be designed to support its endpoint well per the rest of CONTRIBUTING.md (UX, config knobs, observability, reliability), not for parity with the reference tool. This is only a finding when the port is clear (e.g. ported comments, foreign naming conventions, mirrored class hierarchies), not for any code that merely resembles a known design.
Tests (tester agent): Unit: table-driven tests with errContains, assert vs require, config parsing with MockResources, enterprise InjectTestService, processor/input/output/bloblang lifecycle tests, config linting, NewStreamBuilder pipelines, HTTP mock servers. Integration: integration.CheckSkip(t), Given-When-Then with t.Log(), testcontainers-go (module helpers preferred, GenericContainer fallback), NewStreamBuilder with AddBatchConsumerFunc, side-effect imports, async stream.Run with context.Canceled handling, assert.Eventually polling (no require inside), parallel subtest safety, cleanup with context.Background(). Flag changed code lacking tests and new components without integration tests.
Bugs and Security (general-purpose agent): Logic errors, nil dereferences, race conditions, resource leaks, SQL/command injection, XSS, hardcoded secrets. Focus on real bugs, not nitpicks.
Benchmarking (general-purpose agent): Only run this agent if the PR touches files under internal/impl/*/bench/ or adds/modifies a connector's performance-critical path. Checks:
bench/ directory, verify it includes a README.md with prerequisites, how-to-run, and expected output sections.docs/benchmark-results/ is updated. Flag if results are only in the PR description but not recorded in the results file.docs/benchmarking.md: Taskfile.yaml, benchmark_config.yaml, data generation scripts, and README.md.docs/benchmark-results/ was updated.docs/benchmark-results/SUMMARY.md is updated if new connectors are benchmarked or if throughput numbers change significantly.Certification & Contribution Guidelines (general-purpose agent): Audits the PR against the entire CONTRIBUTING.md (the connector certification & contribution spec; applies to internal and external contributions). Its job is to ensure no part of the document is missed. For areas owned by another agent, DEFER to that agent and do not duplicate its findings — cover the gaps and confirm certification-level expectations are met. Cite the exact clause (e.g. "§1.2.2") in every finding. Walk the document section by section:
Summary()/Description(), per-field documentation in the ConfigSpec, config examples, and any docs/modules/... pages. Flag a new connector or field with no description or examples (§1.1.1), or missing usage/pitfall/troubleshooting docs (§1.1.2). Do not flag subjective wording or polish.godev. Flag a new connector that emits no metrics, logs during normal operation, or omits config validation.godev (§1.3.1); e2e/cross-config + CI integration tests → defer to tester (§1.3.2–1.3.3); benchmarking → defer to the Benchmarking agent (§1.3.4–1.3.6). Here, only confirm the certification-level expectation: a new certified connector ships integration tests and a benchmark.godev (§3.1.3); live credential rotation where applicable (§3.1.7).godev and the Bugs/Security agent; defer to them.go.mod), check §4.1/§4.2: actively maintained, well-adopted in Go, semver ≥ v1, no known-abandoned or insecure library. Flag a new connector built on an unmaintained or pre-v1 client (note the library and the evidence).CDC Connector Standard (general-purpose agent): Runs only when the PR touches a CDC connector. Detect that via a changed file under a directory whose package registers a *_cdc/*_changefeed input, OR a new such registration in the diff. Do not rely on the registration being in the diff — for an edit to an existing connector, derive the fleet by grepping internal/impl for (Must)?Register(Batch)?Input names matching /(_cdc|_changefeed)$/ (registrations may be multi-line) and intersect with the changed connector directories. The rubric is conformance to the existing fleet, read from code: first Read the canonical references named in CONTRIBUTING §5 (internal/impl/oracledb, internal/impl/mysql, internal/impl/postgresql) and compare against them. Do NOT rely on external knowledge of formats like Debezium — anchor every finding to an in-repo file you have read, and cite the §5 clause.
*_cdc/*_changefeed.before/after/source/op envelope, or component-prefixed metadata keys (e.g. sap_hana_table vs the fleet's table), citing the canonical connector's actual keys.enable_snapshot→stream_snapshot, cursor_cache→checkpoint_cache, checkpoint_key→checkpoint_cache_key, snapshot_batch_size→snapshot_max_batch_size). The deterministic gate is the conformance test internal/plugins/cdctest — a new connector must pass it strictly.checkpoint_cache field is present and the checkpoint is saved at snapshot completion (before the stream loop); flag in-memory-only cursors or checkpoint-only-after-first-stream-message.sqlutil.CanonicaliseDecimal on the numeric path; flag float64 for DECIMAL/NUMERIC.ConnectionTest, tracing spans, or schema (PK + nullability) metadata when the PR adds or changes the relevant surface.godev/§3.1.3).Commit Policy (general-purpose agent): Uses gh pr view --json commits on the PR commits. Checks:
gh pr view --json additions,deletions and git show --stat, then exclude only what isn't read line-by-line: mechanically generated/derived files (codegen output, mocks, bundle imports), vendored code, lockfiles, and non-code (docs/*.md, .claude/ skills, Terraform *.tf/*.tftpl/*.hcl, *.tmpl templates, testdata/fixtures). Flag when the remaining reviewable code approaches ~10K lines, or when a very large code change lands with no explanation. Do NOT flag a PR whose size is dominated by non-code or generated files (e.g. a skills/docs/infra PR). When flagging, recommend splitting into smaller, independently reviewable PRs (§3.3.2).system: message — lowercase system name matching a known area (e.g., otlp: add authz support, kafka: fix consumer group rebalance)system(subsystem): message — same, with parenthesized subsystem (e.g., gateway(authz): add http middleware, cli(mcp): handle shutdown)chore: message — low-importance cleanup, maintenance, or housekeeping changes (e.g., chore: update gitignore)Bump to Go 1.26, Update CI workflows). First word capitalized, rest lowercase unless proper noun.Revert "..." and merge commits are exempt.
In all cases, message starts lowercase and uses imperative mood (e.g., "add", "fix", not "added", "fixes").fixup!/squash! commits.(#1234).Filter - We only want HIGH SIGNAL issues. Flag issues where:
Do NOT flag:
If you are not certain an issue is real, do not flag it. False positives erode trust and waste reviewer time.
Comment - Post inline review comments for code issues, then post a summary comment.
Inline comments: Create a pending review using mcp__github__pull_request_review_write (method: create, no event). Then add inline comments for each issue using mcp__github__add_comment_to_pending_review. Finally, submit the review using mcp__github__pull_request_review_write (method: submit_pending, event: COMMENT).
For each inline comment:
Summary comment: Post a single summary using mcp__github__add_issue_comment with the format defined below.
If there are no code review issues and no commit violations, skip the pending review and only post the summary comment.
**Commits**
<either "LGTM" if no violations, or a numbered list of violations>
**Review**
<short summary>
<either "LGTM" if no code review issues, or a numbered list of issues with links>
Links must follow this exact format for GitHub Markdown rendering:
https://github.com/redpanda-data/connect/blob/[full-sha]/path/file.ext#L[start]-L[end]
$(git rev-parse HEAD))#L notation after filenameL[start]-L[end]gh CLI (via Bash) for ALL GitHub data fetching: PR metadata, diffs, commits, file contents, etc. Do NOT use MCP mcp__github__* tools for reading. Do NOT use web fetch.mcp__github__pull_request_review_write, mcp__github__add_comment_to_pending_review, mcp__github__add_issue_comment.gh CLI for all GitHub reads and local Read/Grep/Glob for local files. They must NOT use MCP tools.Audit every consumer of the schema.Common metadata format (the format produced by schema_registry_decode's store_schema_metadata, the parquet_decode processor, and CDC sources) for type-coverage drift and value-coercion gaps. Run this whenever a new component starts consuming schema.Common, when a new schema.CommonType variant is added upstream in benthos, or as a periodic maintenance check.
This skill should be used when users need to create or debug Bloblang transformation scripts. Trigger when users ask about transforming data, mapping fields, parsing JSON/CSV/XML, converting timestamps, filtering arrays, or mention "bloblang", "blobl", "mapping processor", or describe any data transformation need like "convert this to that" or "transform my JSON".
This skill should be used when users need to discover Redpanda Connect components for their streaming pipelines. Trigger when users ask about finding inputs, outputs, processors, or other components, or when they mention specific technologies like "kafka consumer", "postgres output", "http server", or ask "which component should I use for X".
This skill should be used when users need to create or fix Redpanda Connect pipeline configurations. Trigger when users mention "config", "pipeline", "YAML", "create a config", "fix my config", "validate my pipeline", or describe a streaming pipeline need like "read from Kafka and write to S3".