Issue Writer
NVIDIA/container-canary
Draft and revise concise, human-focused GitHub issues for pytest-kind-ng.
Testing conventions for the NGINX Ingress Controller repo: Go table-driven tests, mandatory snapshot regeneration, Helm tests and Python pytest integration tests.
$ npx skills add nginx/kubernetes-ingress --skill nic-testing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nginx/kubernetes-ingress nic-testing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/nic-testing .claude/skills/nic-testing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "nic-testing" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testing into .claude/skills/nic-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-testing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nginx/kubernetes-ingress --skill nic-testing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nginx/kubernetes-ingress nic-testing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/nic-testing .agents/skills/nic-testing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "nic-testing" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testing into .agents/skills/nic-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-testing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nginx/kubernetes-ingress --skill nic-testing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nginx/kubernetes-ingress nic-testing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/nic-testing .cursor/skills/nic-testing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "nic-testing" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testing into .cursor/skills/nic-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-testing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nginx/kubernetes-ingress.git --path .github/skills/nic-testing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nginx/kubernetes-ingress --skill nic-testing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nginx/kubernetes-ingress nic-testing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/nic-testing .gemini/skills/nic-testing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "nic-testing" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testing into .gemini/skills/nic-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-testing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nginx/kubernetes-ingress nic-testingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nginx/kubernetes-ingress --skill nic-testing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/nic-testing .github/skills/nic-testing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "nic-testing" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testing into .github/skills/nic-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-testing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nginx/kubernetes-ingress --skill nic-testing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nginx/kubernetes-ingress nic-testing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/nic-testing .opencode/skills/nic-testing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "nic-testing" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-testing into .opencode/skills/nic-testing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-testing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
nic-testingTesting conventions for the NGINX Ingress Controller repo: Go table-driven tests, mandatory snapshot regeneration, Helm tests and Python pytest integration tests.
NIC's tests are driven through make targets, and the skill says to prefer them over raw go test. make test runs all Go tests with the aws and helmunit tags and shuffling, make test-update-snaps regenerates golden files, and the table also lists make lint, make format, make cover and make lint-python for isort and black. Helm tests compile only with the helmunit build tag, which make test already includes.
Snapshot tests are called a hard gate. Three packages hold golden files: version1 for Ingress templates, version2 for VirtualServer, VirtualServerRoute and TransportServer templates, and charts/tests for rendered Helm manifests. A trigger table says what to do when a template, a template struct field, config generation or a Helm chart file changes. The required order is to add or extend a test case first, then run make test-update-snaps, then inspect what actually changed.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f6d0615. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makegitgoFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
NIC Testing Patterns loads about 2.8k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 1,061 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nginx/kubernetes-ingress at commit f6d0615, republished under its Apache-2.0 licence (© nginx). 1,061 words, ~2,802 tokens.
.claude/skills/nic-testing/SKILL.md (or your agent's skills folder).| Command | Purpose |
|---|---|
make test | Run all Go tests (-tags=aws,helmunit -shuffle=on ./...) |
make test-update-snaps | Regenerate snapshot golden files (UPDATE_SNAPS=always) |
make lint | golangci-lint via Docker, diff against origin/main |
make format | goimports + gofumpt |
make cover | Generate test coverage report |
make lint-python | Python test formatting: isort + black |
Always use make test over raw go test. Run make test-update-snaps when template output changes.
Note: Helm tests use the //go:build helmunit build tag -- they are only compiled and run when -tags=helmunit is passed (included in make test).
This is the single most frequently missed step. Treat it as a hard gate, not an optional cleanup.
| Package | Golden files | Covers |
|---|---|---|
internal/configs/version1 | internal/configs/version1/__snapshots__/ | Ingress templates (nginx.tmpl, nginx.ingress.tmpl, and Plus variants) |
internal/configs/version2 | internal/configs/version2/__snapshots__/ | VirtualServer / VSR / TransportServer templates (OSS + Plus) |
charts/tests | charts/tests/__snapshots__/ | Rendered Helm manifests (terratest, helmunit build tag) |
| Change | Snapshot action required |
|---|---|
Any *.tmpl file | Regenerate and add a case that exercises the new directive |
Template struct field (version1/config.go, version2/http.go, version2/stream.go) | Add the field to the fixture used by the snapshot test, then regenerate |
Config generation (internal/configs/*.go) that changes rendered output | Regenerate; confirm the diff matches the intended output |
charts/nginx-ingress/templates/**, values.yaml, _helpers.tpl | Add charts/tests/testdata/<feature>.yaml + a helmunit_test.go case, then regenerate |
| Deleting or renaming a snapshot test | Regenerate -- snaps.Clean prunes the obsolete entry from the golden file |
Add or extend a test case first. Regenerating alone only re-records existing fixtures. If no fixture sets your new field, the golden file will never contain your directive and the feature ships untested.
Run make test-update-snaps.
Inspect what actually changed:
git status --short internal/configs/version1/__snapshots__ \
internal/configs/version2/__snapshots__ charts/tests/__snapshots__
git diff -- '**/__snapshots__/**'Read the diff and confirm your directive is present in the golden output for every edition that supports it. An empty diff after a .tmpl change means no fixture exercises the new branch -- go back to step 1.
Run make test to confirm the suite is green against the regenerated files.
Commit the __snapshots__ changes in the same commit as the template change.
OSS and Plus templates are separate files with separate golden entries, so decide up front which editions the feature targets:
| Feature | Expected snapshot diff |
|---|---|
| Supported by both editions | Both the OSS and Plus golden files change |
Plus-only (health checks, OIDC, WAF, zone_sync, NGINX Plus API) | Only the Plus golden file changes -- the directive must never appear in OSS output |
| OSS-only | Only the OSS golden file changes |
A one-sided diff is a bug only when the feature is supposed to be shared. Never add a Plus-only directive to an OSS snapshot to "fix" a one-sided diff -- that means the directive leaked into the OSS template and NGINX OSS will fail to start.
.tmpl I edited has at least one snapshot case that renders the new directive.git diff on __snapshots__ is non-empty and reviewed line by line.make test passes without UPDATE_SNAPS.func TestValidateMyPolicy(t *testing.T) {
t.Parallel()
tests := []struct {
policy *v1.Policy
isPlus bool
msg string
}{
{ /* valid case */ },
{ /* edge case */ },
}
for _, test := range tests {
err := ValidatePolicy(test.policy, test.isPlus, false, false)
if err != nil {
t.Errorf("ValidatePolicy returned error %v for case: %s", err, test.msg)
}
}
}Two conventions are in use -- both are acceptable:
Policy/transport tests (policy_test.go, transportserver_test.go):
TestValidate<Thing>_PassesOnValidInputTestValidate<Thing>_FailsOnInvalidInputVirtualServer/general tests (virtualserver_test.go and most other files):
TestValidate<Thing> (valid input, often with subtests)TestValidate<Thing>Fails (invalid input)TestGenerate<Feature>Every package that uses snaps.MatchSnapshot needs exactly one TestMain that prunes stale snapshots. It lives in a single file per package (version1/template_test.go, version2/templates_test.go, charts/tests/helmunit_test.go) -- do not add a second one when you create a new test file in an existing package:
func TestMain(m *testing.M) {
snaps.Clean(m, snaps.CleanOpts{Sort: true})
}Example snapshot test:
func TestVirtualServerForNginx(t *testing.T) {
t.Parallel()
executor := newTmplExecutorNGINX(t)
data, err := executor.ExecuteVirtualServerTemplate(&virtualServerCfg)
require.NoError(t, err)
snaps.MatchSnapshot(t, string(data))
}t.Parallel() at the startt.Helper() in helper functionsgithub.com/google/go-cmp/cmp for deep struct comparisongithub.com/gkampitakis/go-snaps/snaps for snapshot testsLocation: charts/tests/
helmunit_test.go -- Helm snapshot tests using terratest + go-snapstestdata/ -- values.yaml overrides per test scenarioAdd a test values file in charts/tests/testdata/<feature>.yaml and a corresponding test case in helmunit_test.go.
Location: tests/suite/
pytest runs with --strict-markers (pyproject.toml, [tool.pytest.ini_options] addopts). Any new @pytest.mark.<name> must be added to the markers list in pyproject.toml at the repository root or the whole suite errors out. If the marker should run in CI, also add it to the relevant smoke matrix in .github/data/matrix-smoke-*.json.
@pytest.mark.policies
@pytest.mark.policies_myfeature
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
[({"type": "complete", "extra_args": [...]},
{"example": "virtual-server", "app_type": "simple"})],
indirect=True,
)
class TestMyFeaturePolicies:
def test_basic_functionality(self, kube_apis, crd_ingress_controller,
virtual_server_setup, test_namespace):
# 1. Create policy from YAML
pol_name = create_policy_from_yaml(
kube_apis.custom_objects, yaml_src, test_namespace
)
wait_before_test()
# 2. Patch VS to reference policy
patch_virtual_server_from_yaml(...)
# 3. Assert HTTP responses
resp = requests.get(url, headers={"host": vs_host})
assert resp.status_code == 200
assert "Expected-Header" in resp.headers
# 4. Cleanup
delete_policy(kube_apis.custom_objects, pol_name, test_namespace)
patch_virtual_server_from_yaml(...) # restore originalkube_apis, crd_ingress_controller, virtual_server_setup, test_namespacetests/suite/fixtures/ (setup/teardown lifecycle)tests/suite/utils/ (create_policy_from_yaml, patch_virtual_server_from_yaml, delete_policy, wait_before_test)test_<feature>_policies_vs.py -- VirtualServer policy teststest_<feature>_policies_vsr.py -- VirtualServerRoute policy teststest_<feature>_policies_ingress.py -- Ingress policy testsStore YAML manifests in tests/data/<feature>/.
The verify-codegen job in ci.yml re-runs each generator and diffs a specific path. Run the matching target and commit the result:
| You changed | Run | Path CI diffs |
|---|---|---|
pkg/apis/**/types.go | make update-codegen | pkg/** |
pkg/apis/** kubebuilder markers | make update-crds | config/crd/bases only |
Telemetry Data / NICResourceCounts in internal/telemetry/exporter.go | make telemetry-schema | internal/telemetry |
| Any import / dependency | go mod tidy | go.mod, go.sum |
Any .tmpl or template struct | make test-update-snaps | not checked by verify-codegen -- fails in unit-tests instead |
The checks are path-scoped, not repository-wide. make update-crds also rewrites deploy/crds*.yaml and docs/crd/, but CI never diffs those paths -- forgetting to commit them produces a green build and stale published CRD bundles. Verify them yourself with git status after regenerating.
charts/nginx-ingress/crds is a symlink to config/crd/bases/ -- never edit it directly.
make test-update-snaps after changing any .tmpl file -- snapshot tests will fail otherwisego test -- use make test which includes required build tags (aws, helmunit)__snapshots__/ directories -- commit the regenerated files with the change that caused themTestMain with snaps.Clean(m, snaps.CleanOpts{Sort: true}) is per package, not per file -- adding a second one to the same package breaks the buildpyproject.toml -- --strict-markers is enabledindirect=True parametrize for IC + VS setup -- do not remove this© nginx, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .github/skills/nic-testing of nginx/kubernetes-ingress.
Open the folder on GitHubat commit f6d0615
NIC Testing Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| NIC Testing Patterns this skillnginx/kubernetes-ingress | 5.1k | — | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Issue WriterNVIDIA/container-canary | 309 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Backend Testingbiersoeckli/QuickStack | 361 | — | ~670 | Automated safety check: Pass | GPL-3.0 | |
| Discover Testingrand/cc-polymath | 181 | — | ~513 | Automated safety check: Pass | MIT | |
| Chart Testsastronomer/astronomer | 491 | — | ~3.2k | Automated safety check: Pass | Custom licence | |
| Benchflow Experiment Reviewbenchflow-ai/benchflow | 353 | — | ~4k | Automated safety check: Pass | Apache-2.0 |
NVIDIA/container-canary
Draft and revise concise, human-focused GitHub issues for pytest-kind-ng.
biersoeckli/QuickStack
Create and review QuickStack backend unit and integration tests using the project's Vitest, Prisma, SQLite, and k3s conventions.
rand/cc-polymath
Automatically discover testing skills when working with unit testing, integration testing, e2e testing, TDD, test coverage, mocking, pytest, Jest, or test automation.
astronomer/astronomer
A skill your agent uses when writing, editing, reviewing, or running Helm chart tests for the Astronomer APC repository.
benchflow-ai/benchflow
Review Benchflow or SkillsBench task-run trajectories and integration-test Benchflow code changes.
Aedelon/claude-code-blueprint
Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.
nginx/kubernetes-ingress
Gives step-by-step checklists for adding Ingress annotations, VirtualServer fields and Helm values to the NGINX Kubernetes Ingress Controller, with common gotchas.
nginx/kubernetes-ingress
Step-by-step checklist for adding a new Policy CRD type to the NGINX Ingress Controller, from the Go types and validation to config generation and templates.
nginx/kubernetes-ingress
Explains how the NGINX Ingress Controller's GitHub Actions workflows, reusable workflows, build matrices and release pipeline fit together across two repositories.
nginx/kubernetes-ingress
Explains the multi-stage Dockerfile, the 25 image variant combinations, and the Makefile targets for building NGINX Ingress Controller images.
nginx/kubernetes-ingress
Maps the NGINX Kubernetes Ingress Controller codebase: repository layout, architectural layers, layer-crossing rules and which files are generated.
nginx/kubernetes-ingress
Troubleshooting patterns for the NGINX Ingress Controller: reload failures, custom resources that have no effect, controller panics and snapshot test failures.
Works with
Categories
Testing conventions for the NGINX Ingress Controller repo: Go table-driven tests, mandatory snapshot regeneration, Helm tests and Python pytest integration tests. NIC's tests are driven through make targets, and the skill says to prefer them over raw go test. make test runs all Go tests with the aws and helmunit tags and shuffling, make test-update-snaps regenerates golden files, and the table also lists make lint, make format, make cover and make lint-python for isort and black.
NIC Testing Patterns fits situations like: writing Go unit or table-driven tests for the NGINX Ingress Controller; changing an nginx template and updating its snapshot golden files; adding Helm chart tests for new chart values; writing pytest integration tests for the Ingress Controller.
Run `npx skills add nginx/kubernetes-ingress --skill nic-testing -a claude-code`. Or copy the skill folder (.github/skills/nic-testing in nginx/kubernetes-ingress) into .claude/skills/nic-testing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nginx/kubernetes-ingress --skill nic-testing -a codex`. Or copy the skill folder (.github/skills/nic-testing in nginx/kubernetes-ingress) into .agents/skills/nic-testing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nginx/kubernetes-ingress --skill nic-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nic-testing, .gemini/skills/nic-testing, .github/skills/nic-testing and .opencode/skills/nic-testing in your project.
Going by SKILL.md and its folder, NIC Testing Patterns needs the command-line tools its instructions call (make, git and go). Our summary lists: Go toolchain and make; Docker, for make lint; Python with pytest, for the integration tests.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
NIC Testing Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with NIC Testing Patterns: Issue Writer (NVIDIA/container-canary, 309 stars), Backend Testing (biersoeckli/QuickStack, 361 stars), Discover Testing (rand/cc-polymath, 181 stars) and Chart Tests (astronomer/astronomer, 491 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nginx (a GitHub organization) maintains it in nginx/kubernetes-ingress, which has 5,082 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.
Source: nginx/kubernetes-ingress on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.