| name | pr-review |
| description | Review GitOps Kubernetes PRs or local diffs: YAML format, naming, HelmRelease patterns, SOPS/security, structure, and build validation.
user: "Review this PR" โ six parallel subagents, aggregate under .agents/pr-review/pr-<id>/ user: "Check my app config" โ phase 3 (best practices) subagent user: "Are secrets encrypted?" โ phase 4 (security) subagent user: "Validate before CI" โ phase 6 (validation) subagent user: "Review my local changes" โ PR_ID=local-changes, staged + unstaged diff
Use proactively for K8s app/Flux/HelmRelease changes, infrastructure edits, or pre-commit diff review. |
| compatibility | Requires `git`, `mise`, `flate`, and `shellcheck` for phase 6 (falls back to `kustomize`/`flux` if `flate` is unavailable); optional `gh` for PR metadata. |
PR review
Spawn focused subagents for GitOps Kubernetes PRs. Each phase uses clean context; outputs are isolated per review id.
When to use
- Full PR or local diff review before merge or commit.
- Single phase (security, validation, best practices) on request.
- Pre-CI validation of YAML/Flux/Kustomize changes.
Repository context
- Layout:
kubernetes/apps/<namespace>/<app>/ with ks.yaml + app/
- Charts:
bjw-s/app-template (common); URLs ${SECRET_DOMAIN}; secrets SOPS-only
- Routes: Gateway API
HTTPRoute, parentRef envoy-internal / envoy-external
- Validation:
mise exec -- flate test all (renders Kustomizations + HelmReleases with the real Helm/Kustomize SDKs โ catches Helm template errors kustomize build can't see), mise exec -- shellcheck
Workflow
- Initialize โ Set
PR_ID from URL (2223), branch name, or local-changes for git diff.
- Prepare directory โ
mkdir -p .agents/pr-review/pr-${PR_ID}; for local reviews, capture staged/unstaged diffs (see references/workflow.md).
- Launch phases โ Spawn phases 1โ6 in one message when doing a full review. Prompts: references/phase-prompts.md.
- Aggregate โ Merge phase reports into
pr-review-state.md (template in references/workflow.md).
- Present โ Severity table (Critical / High / Medium / Low), blocking issues, quick wins; link to
.agents/pr-review/pr-${PR_ID}/.
Phase map
| Phase | Focus | Output file |
|---|
| 1 | YAML format | phase-1-yaml-format.md |
| 2 | Naming | phase-2-naming.md |
| 3 | HelmRelease / app patterns | phase-3-best-practices.md |
| 4 | SOPS, domains, securityContext | phase-4-security.md |
| 5 | ks.yaml + app/ structure | phase-5-architecture.md |
| 6 | shellcheck, kustomize, flux | phase-6-validation.md |
Inline quick checklist
For small diffs without subagents:
Progressive disclosure
Format reference: agentskills.io.