coding-rules

Installation
SKILL.md

Coding rules

These rules apply to any language and any project. Apply them to new code and to code you touch. Do not reshuffle unrelated code only to match them.

Top-level function shows intent and business sequence

  • The top-level function reads like the use case: a short list of business steps in order.
  • Each line calls a step named in domain words. Put the mechanics in a helper.
  • Keep a function at one level of abstraction.
  • Return early on errors, so the happy path stays flat.

Intent functions stay separate from implementation details

  • Intent functions hold business decisions and their order. Keep them pure when you can: no I/O, no hidden state changes.
  • Mechanism functions handle I/O, serialization, retry, logging, concurrency, and framework glue. They make no business decisions.
  • Intent functions call mechanisms. A mechanism never decides a business rule.
  • Name intent functions by domain meaning and mechanisms by their technical job.
  • Do not use vague names: utils, helpers, manager, process, handle, unless the meaning is precise.
  • Test the important decisions and edge cases in the intent functions.
Installs
23
GitHub Stars
2
First Seen
Oct 9, 2026