nginx/kubernetes-ingress/nic-code-review

Claude Code and agent skill by nginx/kubernetes-ingress

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Workflow, guardrails, and output format for reviewing NIC pull requests. Use when reviewing a PR locally (Copilot Chat, Claude, or other agent), when running the pr-review prompt, or when acting as the GitHub Copilot Code Review bot. Delegates codebase-specific detail to the domain skills (nic-structure, nic-add-feature, nic-add-policy, nic-docker-images, nic-ci-pipelines, nic-testing) rather than duplicating them.

Install

npx vskill@latest install nginx/kubernetes-ingress/nic-code-review

SKILL.md

The same SKILL.md was published earlier as nginx/kubernetes-ingress/nic-code-review.

NIC Code Review

This skill defines how to review a NIC PR: the workflow, guardrails, dimension coverage, and output format. It intentionally does not restate the codebase-specific rules that already live in the domain skills -- load the referenced skill for depth on any topic. If you find yourself wanting to add a paragraph of file paths or function names here, add it to the relevant domain skill instead.

When this skill applies

  • Local review inside VS Code / IDE (Copilot Chat, Claude, or any agent)
  • .github/prompts/pr-review.prompt.md invocation
  • GitHub Copilot Code Review bot (reads .github/copilot-instructions.md, which references this skill)
  • Any request phrased as "review this PR", "review the diff", "review my branch"

Review guardrails

  • Comment only at >80% confidence. If unsure, skip.
  • Be concise, actionable, file+line specific. Point at the fix, not the theory.
  • Prefer one strong comment over many weak ones.
  • Do not rewrite the diff for the author, instead suggest the change and let them apply it.
  • Do not compliment, restate the diff, or narrate what the PR does.
  • Never post secrets, tokens, license keys, or any credential value in a review comment.
  • Do not fabricate file paths, symbol names, or line numbers. Always verify before citing.

Verify before flagging

Before writing any comment, you must confirm the claim against actual code or config. Speculation is not review. If you cannot verify it, do not write it.

If the comment claims...You must first...
"X is not tracked / covered / handled by tool Y"Read Y's config (renovate.json, .golangci.yml, Makefile, workflow file). Default managers cover more than you think.
"This library / action does Z on failure / edge case"Read the library docs or source, or find an existing call site in the repo that proves the behaviour.
"This shell / expression / YAML will evaluate as W"Trace it end-to-end. GitHub Actions expression semantics, bash quoting, and YAML type coercion all have non-obvious rules.
"This is a security issue because untrusted input reaches sink S"Identify the actual trust boundary. Inputs from repo-controlled workflows, composite action callers inside the same repo, and matrix values are not "untrusted" in the OWASP sense.
"The generated file / snapshot is wrong"Re-run the generator (make update-codegen, make update-crds, make telemetry-schema, make test-update-snaps) and diff. Comment on the source, not the artifact.
"This will break at runtime"Grep for at least one caller. Read the surrounding function. A missing nil check may already be guarded upstream.
"This NGINX directive does/does not do X"Look it up on <https://nginx.org/en/docs/> (or the NGINX Plus docs for Plus-only directives) before commenting. Quote the directive's context, default, and version.
"This directive is allowed in this context"Check the directive's Context: line in the nginx docs. http, server, location, stream, upstream are not interchangeable, and a wrong-context directive fails nginx -t at reload, not at build time.
"This is not how NIC exposes this feature"Check <https://docs.nginx.com/nginx-ingress-controller/> and the existing annotation / CRD field for the same capability before claiming a new API is redundant or misnamed.

If verification is impractical (e.g. it requires running the CI), drop the finding. Do not file it with a hedge.

Verify against upstream NGINX before reviewing config behaviour

NIC generates NGINX configuration. A review that reasons about NGINX semantics from memory is unreliable -- directive contexts, defaults, and Plus-vs-OSS availability change between versions. Consult the authoritative source, then comment.

What you need to knowAuthoritative source
Does this directive exist? What is its context, syntax and default?<https://nginx.org/en/docs/dirindex.html>
What do these variables resolve to?<https://nginx.org/en/docs/varindex.html>
Is this module available in the OSS build we ship?<https://nginx.org/en/docs/> module page + build/Dockerfile package list
Is this directive / module Plus-only?<https://docs.nginx.com/nginx/admin-guide/> and the nginx-plus template variant
Exact upstream behaviour or edge case not covered by the docs<https://github.com/nginx/nginx> source, or njs docs at <https://nginx.org/en/docs/njs/>
How does NIC already expose this?<https://docs.nginx.com/nginx-ingress-controller/> plus internal/configs/annotations.go and pkg/apis/configuration/v1/types.go
NGINX App Protect WAF / DoS behaviour<https://docs.nginx.com/nginx-app-protect-waf/> and <https://docs.nginx.com/nginx-app-protect-dos/>

Rules for using these sources:

  • Check before you flag, and check before you approve. A generated directive that is syntactically valid but in the wrong context still breaks the reload -- that is a Blocking finding, and it is only findable by reading the docs.
  • When a finding rests on upstream behaviour, cite the source in the bullet so the author can verify it in one click.
  • If the docs and the diff disagree, prefer the docs -- unless the PR description explains a deliberate deviation, in which case drop it.
  • Do not cite a doc page you did not read. Fabricated citations are worse than no citation.
  • Plus-only directives must appear only in nginx-plus.*.tmpl. If one leaks into the OSS template, NGINX OSS fails to start -- always Blocking.

Confidence downgrades

Downgrade or drop a finding when any of these apply:

  • The bug depends on a code path you have not read end-to-end -> drop.
  • The behaviour depends on external tool internals (BuildKit cache, Docker registry retry, Kubernetes API server ordering) -> drop, unless you can cite the docs.
  • The "vulnerability" requires an attacker who already controls the repo / workflow file -> Non-blocking hygiene note at most.
  • The finding is "this could be better" without a concrete failure mode -> drop.

Review workflow

  1. Read the PR title, description, and linked issue. Understand intent before reading the diff.
  2. Check if the PR is part of a stack using gh CLI, gh api, or gh stack (gh extension install github/gh-stack).
  • Interactive / local: If stacked and unspecified, show the stack chain and ask whether to review this PR only (origin/<baseRefName>...<headRefName>) or the full stack (origin/main...<stack-tip>).
  • Unattended / bot: Review this PR only (origin/<baseRefName>...<headRefName>), using sibling PRs in the stack for context and cross-layer completeness checks.
  1. Get the diff. Locally: gh pr diff <n> or git diff origin/<base>...HEAD. In agent context, use the get_changed_files tool (or gh pr diff / git diff origin/<base>...HEAD when stacked).
  2. Classify the change using the table below to pick the right sub-skills.
  3. Read the surrounding code, not just the diff hunks, context often lives in the same file just outside the hunk.
  4. Verify NGINX / NIC semantics upstream for any change that reaches a .tmpl file, an annotation, or a CRD field -- see the source table above.
  5. Walk the review dimensions in order (Security -> Correctness -> Architecture -> Tests -> Build/chart/CI -> Docs and Examples), loading the referenced skills for depth.
  6. Verify claims before commenting. Grep for the symbol, read the referenced file, run make lint/make test if in doubt.
  7. Run the completeness gate below before writing anything.
  8. Produce the review in the Output Format below.
  9. Clean up. Leave no trace of the review -- see below.
Local checkout and cleanup

This section applies only to reviews run on a developer's machine, where a review can leave worktrees, scratch files and pulled images behind. The GitHub Copilot Code Review bot can skip it.

  • Never write to the user's checkout. Run anything that can write files -- make test (go-snaps writes missing snapshots outside CI), make test-update-snaps, make update-codegen, make update-crds, make format -- in a detached throwaway worktree, so the review creates no branch: git fetch origin pull/<n>/head && git worktree add --detach /tmp/pr-<n> FETCH_HEAD for a PR, git worktree add --detach /tmp/pr-head HEAD for the current branch.
  • Pass environment variables per command (GH_PAGER=cat gh pr view <n>); never export them in the shared shell.
  • Delete only what this review created, and ask before removing older leftovers.
  • Do not wipe shared caches as cleanup: no go clean -cache, docker system prune or git gc --prune=now.

When the review is done, remove what it created, then confirm git status --short matches what it showed before the review:

sh
git worktree remove /tmp/pr-<n> # /tmp/pr-head for a current-branch review
rm -f /tmp/<scratch files>
docker rmi <image> # only if it was not present before the review
git worktree list && git status --short

Severity ladder

Two severities, nothing else. No "nit", "minor", "praise", "FYI", "possibly blocking". No overall verdict such as "approve" or "request changes" -- the findings are the review.

SeverityTest it must pass
BlockingVerified, and you can name the trigger, the failure, and the blast radius in one sentence. Coverage gaps are blocking too.
Non-blockingVerified, but the worst case is confusing code or future maintenance

Unverified -> do not write it. There is no third bucket for hunches.

Verified means one of: a call site you read, command output (make test, nginx -t, git diff), or a doc page you opened. Reading the diff is not verification.

Blocking means something breaks for someone: NGINX fails to reload, a credential lands in an image layer, a generated artifact ships stale, a sanitisation guard is missing, or no test proves the new behaviour works. This applies equally to Go code, templates, the chart and workflow files -- a mutable action tag on a job holding id-token: write is as blocking as a Plus-only directive in an OSS template.

Non-blocking means the code works today but will cost someone time later: an error that drops its cause, a workflow condition that re-derives a value already exported as a job output, a missing negative test on a non-security path.

Fixed verdicts

These recur in NIC. The verdict is settled -- do not re-litigate it per PR.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
5,081
Repository forks
2,051
7-day trend score
43

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/nginx/kubernetes-ingress/nic-code-review/badge)](https://verified-skill.com/skills/nginx/kubernetes-ingress/nic-code-review)

Something wrong with this skill or its page? Tell us.