sickn33/agentic-awesome-skills · error · Error
Negative quantity
Error message
Negative quantity
What it means
Error "Negative quantity" thrown in sickn33/agentic-awesome-skills.
Source
Thrown at skills/kaizen/SKILL.md:98
throw new Error('Price and quantity must be non-negative');
}
return total + (item.price \* item.quantity);
}, 0);
};
````
Each step is complete, tested, and working
</Good>
<Bad>
```typescript
// Trying to do everything at once
const calculateTotal = (items: Item[]): number => {
// Validate, optimize, add features, handle edge cases all together
if (!items?.length) return 0;
const validItems = items.filter(item => {
if (item.price < 0) throw new Error('Negative price');
if (item.quantity < 0) throw new Error('Negative quantity');
return item.quantity > 0; // Also filtering zero quantities
});
// Plus caching, plus logging, plus currency conversion...
return validItems.reduce(...); // Too many concerns at once
};
````
Overwhelming, error-prone, hard to verify
</Bad>
#### In Practice
**When implementing features:**
1. Start with simplest version that works
2. Add one improvement (error handling, validation, etc.)
3. Test and verify
4. Repeat if time permitsView on GitHub (pinned to 58d857988f)
When it happens
Trigger: Thrown at skills/kaizen/SKILL.md:98 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sickn33/agentic-awesome-skills@58d857988f (2026-08-26).
Data as JSON: /api/errors/6043db7477b21da4.
Report an issue: GitHub.