kube-agents: Command for Claude Code

.claude/commands/pr-preflight.md

pr-preflight is a command for Claude Code from gke-labs/kube-agents. It costs 22 tokens per session (379 once invoked), scanned A, original, Apache-2.0.

A command that runs the required pre-pull-request reviews through separate helper agents. A pull request is a proposed code change waiting for review before it is merged.

In plain words
What is it for?
Preparing a branch for a pull request by resolving the base branch, running applicable review passes concurrently, and reporting their combined results.
Why use it?
It makes sure the defined security and documentation checks are run against the correct, freshly updated base branch before the change is submitted.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

This is gke-labs/kube-agents's own configuration. It tells Claude Code how to work on kube-agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kube-agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gke-labs/kube-agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gke-labs/kube-agents/main/.claude/commands/pr-preflight.md
Clone the repo
git clone --depth 1 https://github.com/gke-labs/kube-agents

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-preflight

README.md
[![agentmods](https://agentmods.dev/badge/commands/gke-labs/kube-agents/pr-preflight/github.svg)](https://agentmods.dev/commands/gke-labs/kube-agents/pr-preflight)
Your own site
<a href="https://agentmods.dev/commands/gke-labs/kube-agents/pr-preflight"><img src="https://agentmods.dev/badge/commands/gke-labs/kube-agents/pr-preflight/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-preflight

Your own site · 80×15
<a href="https://agentmods.dev/commands/gke-labs/kube-agents/pr-preflight"><img src="https://agentmods.dev/badge/commands/gke-labs/kube-agents/pr-preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 379 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00379
Opus 5 $0.00011 $0.00189
Sonnet 5 $0.00004 $0.00076
Haiku 4.5 $0.00002 $0.00038

Measured 9d ago against content hash 50b53cd17203, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pr-preflight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/pr-preflight.md · 27 lines

What it actually says

Run the pre-PR review passes over this branch, against base: $ARGUMENTS (empty means main).

Follow .agents/skills/review-preflight/SKILL.md. It is the procedure; this file only supplies the base ref and the fact that you were asked.

You were asked. Invoking this command is the request to delegate, so spawn the subagents without asking me again — one per applicable pass, all in a single message so they run concurrently. Review nothing yourself: your job is the range, the mechanical gate, the fan-out, and the relay. A pass you run in this context is the one configuration the passes exist to avoid, and I have just removed the only reason to do it.

Resolve the base before anything else, with the recipe in review-preflight §1 — it finds the remote, fetches it, and stops rather than falling back to a base it could not refresh. Substitute the base I named above for its BASE_BRANCH, if I named one, reduced to a branch name as §1 says. Fetch it even if I handed you one that already resolves: I may have typed a branch that has not been refreshed in a week, and §1 says why that is the failure it exists to stop.

Report before you act: the merged disposition list, which passes ran and which you skipped, and anything the passes said they could not cover. Then fix what the passes confirmed, per review-preflight §6 — the reading order is the point, not a freeze. Leave the PR body until after I have read the list.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 27 lines · 22 tokens per session scan A 50b53cd17203

Subscribe to this mod's changes

pr-preflight is a command published in the GitHub repository gke-labs/kube-agents (53 stars, last pushed today), licensed Apache-2.0. It adds 22 tokens to every session and 379 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.