ucp-discount — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ucp-discount (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
中文摘要:在 UCP checkout session 上应用/核对折扣码,并读取 totals 里的折扣行。用户有优惠码、 或商家有促销要在成单前减免时用。对应能力dev.ucp.shopping.discount;折扣以totals中type:"discount"的条目体现。
Discounts are part of the checkout session — applied via PUT /checkout-sessions/{id} and reflected in totals. 折扣是 session 的一部分,通过 PUT 应用、在 totals 体现。
Capability dev.ucp.shopping.discount. A successful discount appears in the session totals array as an entry with type: "discount" (a negative amount), and the total entry recomputes accordingly. Invalid codes return a messages entry (severity: recoverable) rather than failing the whole session.
Apply (on the session via PUT): include the code in the discount field the merchant's schema declares (commonly a discounts / promo_codes array — confirm against the merchant's schema URL in its UCP profile). 具体字段名以商家 profile 的 schema 为准。
Result — `totals[]` entry:
{ "type": "discount", "display_text": "SAVE10", "amount": -2380 } // negative, minor unitsAnd the recomputed total:
{ "type": "total", "display_text": "Total", "amount": 25942 }recoverable message; tell the user.type:"discount" line and the new type:"total"; confirm the reduction.complete. The AP2 mandate binds to thepost-discount total.
recoverable message; don't claim a discount that didn't apply.totals.bound to a pre-discount amount.
schema.Subtotal €238, user enters "SAVE10".
PUT session with full body + SAVE10.totals gains {type:"discount", display_text:"SAVE10", amount:-2380}.total recomputed (e.g. 25942 incl. tax). Show "−€23.80, total €259.42", then completewith a PaymentMandate bound to 25942.
ucp-checkout-session~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.