Acp Dev Patterns logo

Acp Dev Patterns

Organization
OrcaQubits
acp-dev-patterns

Cross-cutting ACP development patterns — idempotency, error handling, 3D Secure flows, request signing, rate limiting, monitoring, and security best practices. Use when designing architecture or solving production concerns.

Overview

PublisherOrcaQubits
Repositoryagentic-commerce-skills-plugins
Skill nameacp-dev-patterns
Stars
40
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by OrcaQubits on GitHub. Read the source before you install it.

Installation

Install the Acp Dev Patterns AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/acp-agentic-commerce/skills/acp-dev-patterns
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins.git /tmp/agentic-commerce-skills-plugins
mkdir -p .claude/skills
cp -r /tmp/agentic-commerce-skills-plugins/acp-agentic-commerce/skills/acp-dev-patterns .claude/skills/acp-dev-patterns
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Acp Dev Patterns in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Acp Dev Patterns on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Acp Dev Patterns is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ACP Development Patterns

Before writing code

Fetch live docs:

  • Checkout spec: Fetch https://developers.openai.com/commerce/specs/checkout/ for error codes and idempotency rules
  • Production guide: Fetch https://developers.openai.com/commerce/guides/production/ for operational requirements
  • Stripe integration: Web-search site:docs.stripe.com agentic-commerce for PSP-side patterns
  • Changelog: Web-search site:github.com agentic-commerce-protocol CHANGELOG for latest changes

Pattern: Idempotency

Every POST request MUST include Idempotency-Key (UUID v4, max 255 chars).

Server-side implementation:

  • Store key → response mapping for minimum 24 hours
  • Same key + identical body = replay original response, add Idempotent-Replayed: true header
  • Same key + different body = 422 idempotency_conflict
  • Key in flight = 409 idempotency_in_flight with Retry-After header
  • 5xx responses are NOT cached — retries treated as fresh requests

Client-side implementation:

  • Generate UUID v4 for each logical operation
  • Reuse the same key when retrying a failed request
  • Generate a new key for a genuinely new operation
  • Handle 409 by waiting per Retry-After then retrying

Pattern: Error Handling

ACP uses a flat error structure:

{type, code, message, param}
  • type: invalid_request | processing_error | service_unavailable
  • code: Well-known identifier (e.g., idempotency_conflict, invalid_card, rate_limit_exceeded)
  • message: Human-readable description
  • param: JSONPath (RFC 9535) to the offending field

Retry strategy:

  • 429 rate_limit_exceeded — Exponential backoff with jitter
  • 409 idempotency_in_flight — Wait per Retry-After header
  • 5xx — Retry with same idempotency key, exponential backoff
  • 4xx (except 429) — Do not retry, fix the request

Pattern: 3D Secure Authentication

When complete returns authentication_required:

  1. Extract 3DS challenge from the response
  2. Present challenge to the buyer (redirect or modal)
  3. Buyer completes authentication
  4. Call complete again with authentication_result:
    • three_ds_cryptogram
    • electronic_commerce_indicator
    • transaction_id
    • version
  5. Merchant processes the authenticated payment

Handle authentication timeouts and failures gracefully.

Pattern: Request Signing

For request integrity verification:

  • Signature header: Base64-encoded signature over canonical JSON body
  • Timestamp header: RFC 3339 for freshness validation
  • Algorithm: HMAC (Base64-encoded HMAC signature over canonical JSON body)
  • Verification: Reconstruct canonical JSON, verify signature, check timestamp within clock-skew window

Pattern: Webhook Delivery

Merchant → Agent webhook best practices:

  • Sign EVERY event with HMAC-SHA256
  • Include event ID for consumer-side deduplication
  • Implement exponential backoff for failed deliveries
  • Set reasonable timeouts (5-30 seconds)
  • Log delivery attempts and responses
  • Queue events if the webhook endpoint is down
  • Verify the receiving endpoint uses HTTPS

Pattern: API Versioning

  • Always send API-Version: YYYY-MM-DD header
  • Pin to a specific version in your code
  • Test against new versions before upgrading
  • Handle version-specific response shape differences
  • Log the version used for debugging

Pattern: Rate Limiting

  • Implement server-side rate limiting per API key
  • Return 429 with Retry-After header when exceeded
  • Client-side: Honor Retry-After, add jitter to prevent thundering herd
  • Monitor rate limit proximity and alert before hitting limits

Pattern: Monetary Amount Safety

  • ALL amounts as integers in minor currency units
  • $19.99 = 1999 (cents)
  • Never use floating-point for money
  • Validate on input and output
  • Use language-specific money libraries (e.g., decimal in Python, BigInt in JS)

Pattern: Monitoring & Observability

  • Log every checkout operation with session ID and status
  • Track conversion funnel: create → update → complete → order
  • Alert on error rate spikes (especially 5xx)
  • Monitor idempotency key reuse patterns
  • Track payment success/failure rates
  • Dashboard SPT provisioning and consumption
  • Monitor webhook delivery success rates

Pattern: Security Checklist

  • TLS 1.2+ on all endpoints
  • Bearer token rotation strategy
  • No PCI data in logs (redact card numbers, CVCs)
  • IP allowlisting for agent platform connections
  • Request signing for integrity verification
  • HMAC verification on all incoming webhooks
  • Rate limiting to prevent abuse
  • Input validation on all fields
  • CORS configuration (if browser-facing)

Fetch the latest spec and production guide for current error codes, header requirements, and security recommendations before implementing.

Frequently asked questions

What does the Acp Dev Patterns AI skill do?

Cross-cutting ACP development patterns — idempotency, error handling, 3D Secure flows, request signing, rate limiting, monitoring, and security best practices. Use when designing architecture or solving production concerns.

Why use Acp Dev Patterns on TypingMind?

Because you install it once and use it with any model. Acp Dev Patterns is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Acp Dev Patterns in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/acp-agentic-commerce/skills/acp-dev-patterns. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Acp Dev Patterns?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Acp Dev Patterns?

As many as you like. As long as a model supports skills, you can use Acp Dev Patterns with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Acp Dev Patterns AI skill free?

Yes. It is published on GitHub by OrcaQubits under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇