# Feature Gated Code

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

- Skill: `kubernetes-sigs-kueue/feature-gated-code` (Agent Skill)
- Install (CLI): `npx get-skill add kubernetes-sigs-kueue/feature-gated-code`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kubernetes-sigs-kueue/feature-gated-code/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: kubernetes-sigs (https://skillmd.com/u/kubernetes-sigs-kueue)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/kubernetes-sigs-kueue/feature-gated-code

---


# 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.

