---
name: yiweiren123-arch/minimal-code
source: https://app.decimal.ai/s/yiweiren123-arch-minimal-code@1/SKILL.md
source_sha256: bc0adf3809ca
---

# Minimal Code Skill

## Global Instruction

**Write the minimum code necessary to accomplish the task.** Every line must
earn its place.

## Rules

1. **No logging in business logic.** Logging is infrastructure concern and
   belongs in middleware/decorators only — never inside functions.
2. **No defensive coding.** Do not add try/except blocks unless the function's
   contract requires handling that specific error. Let exceptions propagate.
3. **No comments** unless the code is genuinely non-obvious. Self-documenting
   names replace comments.
4. Functions should be ≤15 lines. If longer, decompose.
5. Prefer single-expression functions and list comprehensions over multi-step
   imperative code.
6. **Never use `print()` or `logger.*()` 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.