orcaqubits/agentic-commerce-skills-plugins/ucp-discount
Claude Code and agent skill by orcaqubits/agentic-commerce-skills-plugins
- community
Checking that the SKILL.md file is still in the repository.
Implement the UCP Discount extension — discount code application, validation, allocation tracking, and error handling. Use when adding promo code or discount logic to a UCP checkout.
Install
npx vskill@latest install orcaqubits/agentic-commerce-skills-plugins/ucp-discountSKILL.md
UCP Discount Extension
Before writing code
Fetch live spec: Web-search site:ucp.dev specification discount and fetch the page for the exact discount schema, allocation model, and error codes.
Conceptual Architecture
Extension Relationship
Discount extends dev.ucp.shopping.checkout. Pruned if Checkout capability is absent.
Key Concepts
- Codes: Array of discount code strings submitted by the buyer/agent.
- Applied discounts: Array of successfully applied discounts, each with:
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 items
Allocation Invariant
Sum 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 item
Error Codes
UCP defines standard discount error codes:
discount_code_expireddiscount_code_invaliddiscount_code_already_applieddiscount_code_combination_disalloweddiscount_code_user_not_logged_indiscount_code_user_ineligible
These appear in the messages array with type: "warning" specifically when a discount code is rejected.
Flow
- Platform sends discount codes in the checkout update
- Business validates codes, applies valid ones, returns errors for invalid ones
- Applied discounts affect line item totals and session totals
- Agent resolves discount errors (remove invalid code, inform user of ineligibility, etc.)
Implementation Guidance
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.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ucp-discount/SKILL.md
Popularity
- Repository stars
- 39
- Repository forks
- 18
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/orcaqubits/agentic-commerce-skills-plugins/ucp-discount)