OpenParable
Skip to content
← Back to skills

Feature Gated Code

Testing & Quality
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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/kubernetes-sigs/kueue/blob/HEAD/cmd/experimental/skills/reviewer/feature-gated-code/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/feature-gated-code, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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.