orcaqubits/agentic-commerce-skills-plugins/ucp-dev-patterns
Claude Code and agent skill by orcaqubits/agentic-commerce-skills-plugins
- community
Checking that the SKILL.md file is still in the repository.
UCP development patterns — capability negotiation algorithms, idempotency implementation, error resolution loops, multi-binding servers, and production architecture. Use when designing the internal architecture of a UCP implementation or solving cross-cutting concerns.
Install
npx vskill@latest install orcaqubits/agentic-commerce-skills-plugins/ucp-dev-patternsSKILL.md
UCP Development Patterns
Before writing code
Fetch live reference: Web-search site:ucp.dev specification reference for the latest data model definitions and enum values. Also check https://ucp.dev/latest/specification/overview/ for architectural guidance.
Pattern: Capability Negotiation
Every request/response pair involves negotiation:
- Platform sends
UCP-Agentheader with its profile URI - Business fetches the platform profile (cache it — don't fetch on every request)
- Business computes the intersection: capabilities both support
- Orphaned extensions are pruned (extensions whose parent capability is not in the intersection)
- Business returns the negotiated
ucpobject
Caching: Cache the platform profile with a TTL (e.g., 5 minutes). Don't re-fetch on every request.
Version compatibility: If platform version > business version, return version_unsupported. If platform version <= business version, process using the platform's version semantics.
Pattern: Idempotency
Every mutating operation uses Idempotency-Key (UUID):
- Hash the key and check your cache/store
- If found: return the cached response (same status code, same body)
- If not found: process the request, cache the response keyed by the idempotency key
- Cache duration: 24+ hours minimum
Storage: Use Redis, database table, or in-memory store depending on scale. Key = idempotency_key, Value = serialized response + status code.
Race condition: If two identical requests arrive simultaneously, use locking (database row lock, Redis SETNX) to ensure only one processes.
Pattern: Agent Error Resolution Loop
The core Platform pattern for driving checkout to completion:
Error resolution heuristics:
missing_shipping_address→ prompt user for address, update checkoutmissing_email→ prompt user for email, update checkoutinvalid_cart_items→ item unavailable, suggest alternatives or removediscount_code_invalid→ inform user, remove code
Pattern: Multi-Binding Server
A single Business server can support REST + MCP + A2A simultaneously:
The key: all bindings share the same core business logic. The binding layer only handles transport-specific concerns (HTTP headers vs JSON-RPC envelope vs A2A message parts).
Pattern: Monetary Calculations
- All amounts are integers in minor currency units (cents). $29.99 =
2999. - Never use floating point for money.
- Totals include typed entries:
items_discount,subtotal,discount,fulfillment,tax,fee,total. - Recalculate all totals on every update (don't trust client-submitted totals).
Pattern: Webhook Reliability
Business (sender):
- Implement exponential backoff: 1s, 2s, 4s, 8s, 16s... up to a max
- Set a max retry count (e.g., 10 attempts over 24 hours)
- Log failed deliveries for manual retry
- Always send the full order entity, not deltas
Platform (receiver):
- Respond 2xx immediately, process async
- Deduplicate using
event_id - Verify
Request-Signaturebefore processing - Handle out-of-order deliveries gracefully (use
created_timeto determine freshness)
Pattern: Testing Strategy
- Unit tests: Test negotiation logic, total calculations, error message generation
- Integration tests: Test each binding independently against your core logic
- Conformance tests: Run the official suite from https://github.com/Universal-Commerce-Protocol/conformance
- Playground validation: Use https://ucp.dev/latest/specification/shopping/playground/ for interactive flow testing
- End-to-end: Test full flows including payment handler integration
Ecosystem References
Always check these for the latest developments before major implementation decisions:
- Official spec repo: https://github.com/Universal-Commerce-Protocol/ucp
- Meeting minutes: https://github.com/Universal-Commerce-Protocol/meeting-minutes (governance decisions)
- Awesome UCP: https://github.com/Upsonic/awesome-ucp (community resources)
- OpenAI ACP comparison: https://github.com/agentic-commerce-protocol/agentic-commerce-protocol (competing protocol — merchants may want to support both)
Security
- Security scanPassed, 95 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-dev-patterns/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-dev-patterns)