Agent Skills: Code Layout

>

UncategorizedID: liuchengxu/dotfiles/code-layout

Install this agent skill to your local

pnpm dlx add-skill https://github.com/liuchengxu/dotfiles/tree/HEAD/agents/skills/code-layout

Skill Files

Browse the full folder contents for code-layout.

Download Skill

Loading file tree…

agents/skills/code-layout/SKILL.md

Skill Metadata

Name
code-layout
Description
>

Code Layout

Variable locality

Define variables as close as possible to their first use. A binding whose value is not consumed until many lines later belongs on the line above its consumer, not at the top of the function.

Group related setup so several bindings feeding the same downstream call sit adjacent and just above it.

Inline single-use values

Inline a single-use value unless naming it earns its keep:

  • the value is used twice or more,
  • naming it makes a long line fit the width, or
  • the expression is complex enough that a name aids comprehension.