sickn33/agentic-awesome-skills · error · Error

Negative price

Error message

Negative price

What it means

Error "Negative price" thrown in sickn33/agentic-awesome-skills.

Source

Thrown at skills/kaizen/SKILL.md:97

if (item.price < 0 || item.quantity < 0) {
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

View on GitHub (pinned to 58d857988f)

When it happens

Trigger: Thrown at skills/kaizen/SKILL.md:97 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/db09992da0a1f827. Report an issue: GitHub.