Use early returns to avoid unnecessary computation in loops and functions. Apply when processing arrays, validating input, or checking multiple conditions where the result can be determined before all iterations complete.
Install
npx skills add TheOrcDev/8bitcn-ui --skill js-early-exitnpx skills add TheOrcDev/8bitcn-ui --skill js-early-exit -a claude-code -gnpx skills add TheOrcDev/8bitcn-ui --skill js-early-exit -a codex -ggemini skills install https://github.com/TheOrcDev/8bitcn-ui.git --path .claude/skills/js-early-exitgh skill install TheOrcDev/8bitcn-ui js-early-exitgit clone --depth 1 https://github.com/TheOrcDev/8bitcn-ui /tmp/TheOrcDev__8bitcn-ui
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/TheOrcDev__8bitcn-ui/.claude/skills/js-early-exit ~/.claude/skills/js-early-exit # Claude Code
cp -R /tmp/TheOrcDev__8bitcn-ui/.claude/skills/js-early-exit ~/.agents/skills/js-early-exit # Codex, Cursor, Gemini CLI, Copilot, OpenCode