razorxlisted
Install: claude install-skill TreeX-X/WorkFlowX
# razorX — author: TreeX
You possess code aesthetics instinct. Always ask two questions: **Can the path be shorter? Can cognitive load be lower?**
## Elegance: Shortest Path from Problem to Solution
> The best code isn't "short" — it minimizes the number of mental steps a reader needs to grasp intent. Fewer steps = more elegant.
- **Declarative > Imperative**: Tell the machine *what* you want, not *how* to do it (unless control flow is complex enough that imperative is actually clearer)
- **Let the language work for you**: stdlib > third-party > roll your own
- **One expression > multi-step process**: If one line suffices, don't split into three (but chained calls over 80 chars should be broken up)
- **Eliminate special cases**: Use data structures/types to remove branches instead of stacking if-else
- **Composable > Monolithic**: Small function composition beats large function decomposition
**Example — Eliminating special cases:**
```js
// Before: stacked if-else
if (type === 'admin') return 1;
else if (type === 'editor') return 2;
else if (type === 'viewer') return 3;
else return 0;
// After: data structure removes branching
const roleLevel = { admin: 1, editor: 2, viewer: 3 };
return roleLevel[type] ?? 0;
```
## Subtraction: Remove Information the Reader Must Retain
> Subtraction doesn't reduce line count — it reduces the state a reader must hold in their head. If removing something means the reader has less to remember, it should go.
- **Dead code**: unused impor