Clash of Coins Universal Skill
Use this as the default skill for any compatible agent (OpenClaw, Claude, Cursor, Codex, and other Agent Skills clients) when the task touches Clash of Coins.
Canonical published path: /skills/clashofcoins-universal/SKILL.md
Compatibility aliases: /skills/SKILL.md, /skills/clashofcoins-universal/skill.md, /skills/clashofcoins-universal, /skills/clashofcoins/SKILL.md, /skills/clashofcoins/skill.md, /skills/clashofcoins
Scope
- Surfaces: sale (
/agentic/*) and shop (/shop/*) - Protocol model: deployment-dependent (
x402,mpp, or mixed) - Role: universal router and discovery-first entrypoint
Functional Coverage (Sale + Shop)
- Root discovery and routing:
GET /GET /openapi.jsonGET /openapi.full.jsonGET /mcp.jsonGET /skills/index.jsonGET /catalog- check top-level
x-bazaarmetadata in OpenAPI for minimal Bazaar-compatible payable hints GET /.well-known/x402(compatibility metadata for enabled x402 resources;404when x402 is disabled)GET /.well-known/mppwhen MPP is enabled
- Sale checkout coverage:
- offers, optional quote, buy, and purchase-status polling on
/agentic/<protocol>/* - request body constraints:
saleId,quantity,beneficiary
- offers, optional quote, buy, and purchase-status polling on
- Shop checkout coverage:
- anonymous + recipient-scoped catalog reads on
/shop/api/shop/items - offers, optional quote, buy, and purchase-status polling on
/shop/<protocol>/* - recipient constraint: exactly one of
nicknameoraddressfor quote/buy
- anonymous + recipient-scoped catalog reads on
- Payment retry coverage:
- x402 paid retry from latest challenge with identical method/body
- MPP paid retry with identical JSON body and canonical
mppxflow
- Agent-wallet coverage (when enabled):
- read live capability/funding route first:
GET /agent-wallet/ - create order (returns exact amount):
POST /agent-wallet/orders - payable funding (default auto sweep + finalize):
POST /agent-wallet/<fundingProtocol>/fund - read order state:
GET /agent-wallet/orders/{orderId} - funding status:
GET /agent-wallet/<fundingProtocol>/purchases/{paymentReference} - funding protocol is runtime/env-driven (
x402ormpp); purchase protocol in order payload can still bex402ormppwhen enabled
- read live capability/funding route first:
- Integration coverage:
- MCP/skills/OpenAPI consistency checks
- scanner/registry validation via reference playbooks
Use This Skill When
- user intent is not yet narrowed to sale or shop
- you need one playbook to browse, route, and execute
- you need to hand off cleanly to specialized skills after routing
Do Not Use This Skill When
- task is explicitly sale-only and already scoped
- task is explicitly shop-only and already scoped
Default Workflow
- Pick one target origin. Do not mix origins in one pass.
- Run discovery snapshot:
node scripts/discover-gateway.mjs --origin <https://...>
- Read
GET /catalogbefore any buy call. - Route by user intent:
- browse/compare products: stay in this skill and follow
references/discovery-and-routing.md - buy presale/NFT lots: follow sale flow in
references/purchase-playbooks.md - buy in-game shop goods: follow shop flow in
references/purchase-playbooks.md - scanner/MCP/OpenAPI integration or validation: use
references/integration-playbook.md
- browse/compare products: stay in this skill and follow
- Validate before execution:
- active protocol exists on this origin
- chosen surface matches the item (
salevsshop) - shop recipient rule is satisfied (exactly one of
nicknameoraddress)
Hard Rules
- Do not mix sale and shop contracts in one purchase attempt.
- Do not treat payment settlement as success before purchase-status/ledger confirmation.
- Do not buy shop items from anonymous offers without recipient-scoped validation.
- Keep unpaid and paid retry payloads identical.
- Do not hardcode payment addresses or token/network constants outside deployment config.
Fast Defaults
- Browse everything:
GET /catalog - Sale buy:
POST /agentic/<protocol>/buy - Shop buy:
POST /shop/<protocol>/buy - Agent-wallet buy flow:
GET /agent-wallet/POST /agent-wallet/ordersPOST /agent-wallet/<fundingProtocol>/fundGET /agent-wallet/orders/{orderId}
- Sale status:
GET /agentic/<protocol>/purchases/{paymentTx} - Shop status:
GET /shop/<protocol>/purchases/{paymentReference}GET /shop/purchase-status/{purchaseId}(user-facing status)
Plan-Validate-Execute Loop
- Plan: choose one origin, one surface, and one protocol from live discovery.
- Validate: run the relevant checklist from references.
- Execute: quote or buy.
- Re-validate: if contract behavior differs, re-read live discovery and adjust.
Agent Wallet Simplified Flow
- Create order with purchase intent.
- Read
GET /agent-wallet/and use returnedfundingProtocol/fundingRouteas source of truth. protocolis optional; gateway can infer a compatible protocol (for example, shop carts prefermppwhen available).
- Read
- Pay the funding route for returned
orderId. - Expect backend to auto-run sweep and finalize.
- Read order; if auto-execution fails, use manual recovery endpoints only as fallback.
Load References On Demand
- Discovery and routing:
references/discovery-and-routing.md - Purchase playbooks:
references/purchase-playbooks.md - Integration/validator flow:
references/integration-playbook.md - Client setup:
references/client-installation.md - Skill eval artifacts:
- quality evals:
evals/evals.json - trigger evals:
evals/trigger-queries.json
- quality evals:
Output Template
### Clash of Coins Handoff
- Origin: <origin>
- Enabled protocols: <x402|mpp|both>
- Surface selected: <sale|shop>
- Why this route: <user intent + catalog evidence>
- Next endpoint: <method + path>
- Payload constraints: <recipient/beneficiary/cart rules>
- Payment retry rule: <PAYMENT-SIGNATURE or Authorization: Payment via mppx>
- Status endpoint: <exact path>
- Risks/gotchas: <if any>