From ucp-agentic-commerce
Implements UCP discount extension for checkouts: validates promo codes, applies discounts with allocations to line items, tracks totals, handles errors like expired/invalid codes.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin ucp-agentic-commerceThis skill is limited to using the following tools:
**Fetch live spec**: Web-search `site:ucp.dev specification discount` and fetch the page for the exact discount schema, allocation model, and error codes.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
Fetch live spec: Web-search site:ucp.dev specification discount and fetch the page for the exact discount schema, allocation model, and error codes.
Discount extends dev.ucp.shopping.checkout. Pruned if Checkout capability is absent.
code: The code that was appliedtitle: Display nameamount: Total discount amount (minor currency units)automatic: Whether it was auto-applied (not from a code)method: "each" (per-item) or "across" (spread across all applicable items)priority: Order of application when multiple discounts interactallocations: Array showing exactly how the discount is distributed across line itemsSum of allocations[].amount MUST equal applied_discount.amount. This ensures the discount is fully accounted for.
Each allocation has:
path: JSONPath pointing to the line item (e.g., $.line_items[0])amount: Portion of discount applied to that itemUCP defines standard discount error codes:
discount_code_expireddiscount_code_invaliddiscount_code_already_applieddiscount_code_combination_disalloweddiscount_code_user_not_logged_indiscount_code_user_ineligibleThese appear in the messages array with type: "warning" specifically when a discount code is rejected.
Fetch the exact schema from the live spec before implementing. Pay attention to how discounts interact with fulfillment costs and tax calculations — the spec defines the ordering.