nginx/kubernetes-ingress/nic-planning

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.

Task planning and approach strategy for NIC. Use when starting any non-trivial task, reading issues or specs, planning before implementing, or when asked to create a plan for a change.

Install

npx vskill@latest install nginx/kubernetes-ingress/nic-planning

SKILL.md

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

Planning and Task Approach

Before Writing Code

  1. Read the requirement — Understand what's being asked. Check linked issues, specs, or PRs for full context.
  2. Write acceptance criteria — Before implementing, state what "done" looks like in testable terms. What should work? What should be rejected? What must NOT break?
  3. Identify security impact — Does this change:
  • Accept new external/untrusted input? → Requires input validation at the trust boundary
  • Touch credential or secret paths? → Requires human review
  • Generate config from user data? → Must pass through containsDangerousChars()
  • Change RBAC or access control? → Requires security review
  1. Identify affected layers — Determine which architectural layers are touched:
  • Data Model (pkg/apis/configuration/v1/types.go)
  • Validation (pkg/apis/configuration/validation/)
  • Controller (internal/k8s/)
  • Config Generation (internal/configs/)
  • Templates (internal/configs/version1/ or version2/)
  • Process Management (internal/nginx/)
  • Helm Chart (charts/nginx-ingress/)
  1. Check invariants — Review the Key Invariants section in AGENTS.md:
  • Security: containsDangerousChars() on user strings reaching NGINX config
  • Codegen: Never edit zz_generated.deepcopy.go manually
  • Templates: Update BOTH OSS and Plus variants for shared directives; Plus-only directives go in the Plus template only
  • CRD fields: Every new field needs kubebuilder markers + validation + template + tests
  1. Identify test surface — What tests need adding or updating?
  • Unit tests for validation logic
  • Negative tests for input rejection (security)
  • Snapshot tests for template output
  • Helm tests if chart changes
  • Integration tests if behaviour changes
  1. Produce a plan — State your approach before coding. List files to change in order. Include what this change must NOT break.

Layer Impact Checklist

For any change, ask:

  • [ ] Does it accept new external input? → Add validation with containsDangerousChars() or appropriate sanitizer
  • [ ] Does it touch types.go? → Run make update-codegen then make update-crds
  • [ ] Does it add a template directive? → Update BOTH nginx.ingress.tmpl AND nginx-plus.ingress.tmpl (or v2 equivalents) if the directive is shared; Plus-only directives go in the Plus template alone
  • [ ] Does it add a CRD field? → Add kubebuilder markers, validation, template struct, rendering, tests
  • [ ] Does it touch Helm values? → Update values.yaml, values.schema.json, and helmunit tests
  • [ ] Does it affect config generation? → Add a snapshot fixture that exercises the change, then run make test-update-snaps
  • [ ] Does it change telemetry data types? → Run make telemetry-schema
  • [ ] Does user-controlled data reach NGINX config? → Verify sanitization path exists and is tested

Definition of Done

Do not report a task as complete until every applicable box is ticked. These are the steps most often skipped.

ConditionRequired actionVerification
Edited any .tmplSnapshot fixture added and regeneratedgit diff -- '**/__snapshots__/**' is non-empty and shows the new directive
Edited a template struct (version1/config.go, version2/http.go, version2/stream.go)Fixture populates the field, snapshots regeneratedSame as above
Edited pkg/apis/**/types.gomake update-codegen && make update-crdsgit status shows regenerated pkg/**, config/crd/bases, deploy/crds*.yaml, docs/crd/
Edited telemetry Data / NICResourceCountsmake telemetry-schemaNo diff on re-run
Added/changed importsgo mod tidygo.mod / go.sum clean
Edited chart templates or valuestestdata + helmunit casecharts/tests/__snapshots__/ diff is non-empty
Added a pytest markerRegistered in pyproject.tomlSuite runs under --strict-markers
Any of the abovemake test then make lintBoth pass

Snapshot rule: regenerating without adding a fixture produces an empty diff, which is a silent failure, not a success. If make test-update-snaps changes nothing after a template edit, you have not tested the feature.

Scope Assessment

ScopeIndicatorsAction
TrivialTypo, docs, comment fixFix directly, no plan needed
SmallSingle layer, <50 lines, no API changeBrief plan → implement → test
Medium2-3 layers, new field or annotationDetailed plan → implement layer by layer → test each
LargeNew subsystem, new policy type, cross-cuttingWrite plan document → get approval → implement in stages

Common Planning Mistakes

  • Starting implementation before understanding the full scope of affected files
  • Forgetting to update BOTH OSS and Plus templates for a shared directive -- or the inverse, leaking a Plus-only directive into the OSS template
  • Changing types.go without running codegen
  • Adding a VirtualServer feature without checking if Ingress (v1) also needs it
  • Adding Helm values without updating the JSON schema
  • Not checking if the feature already exists as an annotation when adding a CRD field
  • Skipping snapshot regeneration after template changes -- or regenerating without adding a fixture, which silently produces no diff
  • Forgetting make telemetry-schema after touching telemetry data types
  • Assuming a directive exists or behaves a certain way without checking <https://nginx.org/en/docs/> -- verify NGINX semantics before wiring a template
  • Not identifying where untrusted input enters — a new CRD field IS user input that reaches NGINX config
  • Skipping negative tests — only testing the happy path leaves injection vectors undiscovered

Ordering Rules for Multi-Layer Changes

When a change spans multiple layers, implement in this order:

  1. Data model — Define types/fields in types.go
  2. Codegen — make update-codegen && make update-crds
  3. Validation — Add validation rules in pkg/apis/configuration/validation/
  4. Config structs — Add fields to template structs in version1/ or version2/
  5. Config generation — Wire the new field into config builders in internal/configs/
  6. Templates — Add NGINX directives to .tmpl files (OSS + Plus)
  7. Controller — Wire into sync handlers if needed
  8. Helm — Update chart values, schema, templates
  9. Tests — Unit, negative, snapshot (fixture + regenerate), helm, integration
  10. Regenerate — make update-codegen, make update-crds, make telemetry-schema, make test-update-snaps, then make test and make lint

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-planning/badge)](https://verified-skill.com/skills/nginx/kubernetes-ingress/nic-planning)

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