michaeldyrynda/dotfiles/nested-code

Claude Code and agent skill by michaeldyrynda/dotfiles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Apply the BaseCode Nested Code practice — flatten structure using guard clauses, conditional boolean returns, and higher-order functions to bring the primary action to the top level.

Install

npx vskill@latest install michaeldyrynda/dotfiles/nested-code

SKILL.md

BaseCode: Nested Code

Apply the BaseCode Nested Code practice to improve the readability of the code under review. The goal is not shorter code or personal style — it is readability: making the code easier for the next human to read.

Reduce nesting to bring the primary action of a function to the top level. Each nesting level adds mental overhead for the reader.

Empty blocks — remove empty if or else blocks entirely. Invert the condition if needed.

Conditional boolean returns — when an if/else returns true/false directly, replace it with a single return of the condition expression:

// before
if ($x === 0) { return true; } else { return false; }
// after
return $x === 0;

Guard clauses — convert nested if blocks into early returns. Negate the condition and return (or throw) to protect the rest of the function:

// before
if ($item !== null) {
if (!$this->contains($item)) {
$this->items[] = $item;
}
}
// after
if ($item === null || $this->contains($item)) {
return;
}
$this->items[] = $item;

Switch to if — prefer if chains over switch when: there are only 2–3 cases, case blocks contain nested code, or the switch requires type coercion. Keep switch when a clean 1:1 ratio exists between cases and single-line bodies.

Loops — prefer higher-order functions (filter, map, reduce) over manual loops when the intent is accumulation or transformation.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
59
Repository forks
3
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/michaeldyrynda/dotfiles/nested-code/badge)](https://verified-skill.com/skills/michaeldyrynda/dotfiles/nested-code)

Something wrong with this skill or its page? Tell us.