Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Ucp Dev Patterns

ASecurity

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.

39 stars
0 votes
0 copies
1 views
Added 9/22/2026
ai-agentsrustgotestinggitdatabase

Works with

climcp

Security Analysis

A100/100

Scanned 9/22/2026

$npx -y skills add OrcaQubits/agentic-commerce-skills-plugins --skill ucp-dev-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ucp Dev Patterns?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Ucp Dev Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/orcaqubits-ucp-dev-patterns-cb4d3afc/badge)](https://www.skillsdirectory.com/skills/orcaqubits-ucp-dev-patterns-cb4d3afc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: ucp-dev-patterns
description: >
  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.
---

# 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:

1. Platform sends `UCP-Agent` header with its profile URI
2. Business fetches the platform profile (cache it — don't fetch on every request)
3. Business computes the intersection: capabilities both support
4. Orphaned extensions are pruned (extensions whose parent capability is not in the intersection)
5. Business returns the negotiated `ucp` object

**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):

1. Hash the key and check your cache/store
2. If found: return the cached response (same status code, same body)
3. If not found: process the request, cache the response keyed by the idempotency key
4. 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:

```
1. Create checkout
2. LOOP:
   a. Inspect status
   b. If "incomplete": read messages, resolve recoverable errors, update checkout, goto 2
   c. If "requires_escalation": surface continue_url to user, wait, goto 2
   d. If "ready_for_complete": acquire payment credential, call complete
   e. If "complete_in_progress": payment is being processed, poll/wait, goto 2
   f. If "completed": done — extract order
   g. If "canceled": done — report to user
3. Timeout after N iterations or session expiry
```

**Error resolution heuristics**:
- `missing_shipping_address` → prompt user for address, update checkout
- `missing_email` → prompt user for email, update checkout
- `invalid_cart_items` → item unavailable, suggest alternatives or remove
- `discount_code_invalid` → inform user, remove code

## Pattern: Multi-Binding Server

A single Business server can support REST + MCP + A2A simultaneously:

```
app/
├── core/
│   ├── checkout_service.py    # Shared business logic (binding-agnostic)
│   ├── negotiation.py         # Capability negotiation
│   └── models.py              # UCP data models (from SDK)
├── bindings/
│   ├── rest/
│   │   └── routes.py          # REST endpoints
│   ├── mcp/
│   │   └── tools.py           # MCP tool handlers
│   └── a2a/
│       └── agent.py           # A2A agent message handler
└── discovery.py               # /.well-known/ucp serving all bindings
```

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-Signature` before processing
- Handle out-of-order deliveries gracefully (use `created_time` to determine freshness)

## Pattern: Testing Strategy

1. **Unit tests**: Test negotiation logic, total calculations, error message generation
2. **Integration tests**: Test each binding independently against your core logic
3. **Conformance tests**: Run the official suite from https://github.com/Universal-Commerce-Protocol/conformance
4. **Playground validation**: Use https://ucp.dev/latest/specification/shopping/playground/ for interactive flow testing
5. **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)

Attribution

OrcaQubitsOrcaQubits
View sourceSee grades on GitHubMore from OrcaQubits →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →