SuperAPI AI Directory

code-style

Coding & development

View repository

Updated 10-15 20:10

About this skill

Code Style

This skill keeps code explicit, linear, and honest about state, failure, ownership, and side effects. Its directives favor enforceable invariants, narrow boundaries, simple abstractions, and sans-I/O decision logic.

Treat each directive as a language-agnostic semantic requirement. Adapt its TypeScript example to the target language's native syntax, type system, resource-management mechanisms, and compiler checks.

Effective Strategies for Clear, Correct Code

Follow the guidelines below. Read each linked reference that applies before writing or reviewing code.

  1. Express control flow so that the permitted state and successful path are easy to read.
  2. Make valid state explicit and enforce it throughout the system.
  3. Keep failure, ownership, and information at their decision-owning boundaries.
  4. Keep abstractions and public contracts intentional.