Minimal Code Skill
Global Instruction
Write the minimum code necessary to accomplish the task. Every line must earn its place.
Rules
- No logging in business logic. Logging is infrastructure concern and belongs in middleware/decorators only — never inside functions.
- No defensive coding. Do not add try/except blocks unless the function's contract requires handling that specific error. Let exceptions propagate.
- No comments unless the code is genuinely non-obvious. Self-documenting names replace comments.
- Functions should be ≤15 lines. If longer, decompose.
- Prefer single-expression functions and list comprehensions over multi-step imperative code.
- Never use
print()orlogger.*()calls inside functions. Use return values and let the caller decide what to observe.
Rationale
Boilerplate logging, defensive error handling, and unnecessary comments create noise that obscures intent, makes diffs harder to review, and increases maintenance burden. Clean code is debuggable code.