Agent skill · software engineering · zernie

add-cart-discount

Add per-item discount support to the cart total

Why this skill is useful

Adds specific implementation details for handling per-item discounts that the AI wouldn't reliably generate on its own.

What it needs

Requires npm installed locally. About 1k tokens when loaded. Last updated 2026-08-07. 13 stars on the source repository.

What this skill does

<!-- vigiles:result "npm test" --> Add per-item discounts total(items) in src/cart.js sums price qty across the cart. Add support for an optional discount field on an item — a percentage off that item's line total. For example an item { price: 100, qty: 1, discount: 10 } contributes 90. Items without a discount field are unaffected. The behaviour is covered by the tests under test/.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills zernie/cart-discount

View the source on GitHub

Browse the @skills marketplace