# Feature Gated Code

> Feature Gated Code is an Agent Skill for testing & quality published in the kubernetes-sigs/kueue repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Review that new feature-gated behavior has explicit gate checks on all reachable code paths.

- Skill name: `feature-gated-code`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/kubernetes-sigs/kueue/blob/HEAD/cmd/experimental/skills/reviewer/feature-gated-code/SKILL.md
- Repository: kubernetes-sigs/kueue (2,719 GitHub stars when collected)

## SKILL.md

# Skill: Feature-Gated Code Must Check the Gate

**Flag:** New behavior that belongs to a feature gate (e.g., `features.Enabled(features.SomeFeature)`) but a reachable code path is missing the check — either the function has no early return when the gate is off, or a call site branches on other conditions without first checking the gate.

**Ask:** Add an explicit `if !features.Enabled(features.SomeFeature) { return }` short-circuit. Prefer placing it inside the function (so it's enforced for all current and future callers) over guarding every call site individually. If the check must live at the call site, document why.

---

Source: https://www.openparable.com/skill/testing-quality/feature-gated-code (OpenParable). Cite the canonical URL above.
