BD okx-x402-payment
HTTP 402 Payment Required dispatcher for x402 + MPP. Detects protocol from response headers and routes to the matching protocol playbook: 'WWW-Authenticate: Payment' header → MPP (`protocols/mpp.md`); 'PAYMENT-REQUIRED' header or `x402Version` body field → x402 (`protocols/x402.md`). Returns a ready-to-paste authorization header. MPP covers charge (one-shot) and session (open / voucher / topUp / close) in transaction (TEE-signed EIP-3009) and hash (client-broadcast) modes, with splits, optional initial-voucher prepay, and channel state tracking. x402 covers v1 (`X-PAYMENT` header) and v2 (`PAYMENT-SIGNATURE` header) with TEE or local-key signing. Trigger words (English): '402', 'payment required', 'mpp', 'machine payment', 'pay for access', 'payment-gated', 'WWW-Authenticate: Payment', 'x402', 'x402Version', 'PAYMENT-REQUIRED', 'PAYMENT-SIGNATURE', 'X-PAYMENT', 'open channel', 'voucher', 'session payment', 'close channel', 'topup channel', 'top up channel', 'settle channel', 'settle session', 'refund channel', 'channelId', 'channel_id'. Trigger words (Chinese): '支付通道', '关闭通道', '关闭会话', '关闭支付通道', '充值通道', '续费通道', '结算通道', '结算会话', '关单', '凭证', '会话支付'. Critical sensitivity rule: any user mention of close / topup / settle / voucher / refund near a `channel_id`, `0x...` channel hash, or 'session' / 'channel' context = MPP mid-session operation — load this skill, do NOT search for a separate close/topup tool.
As a process D 46/100 · Unfinished process — weak spots: result and completion, when it triggers, inputs and preconditions
How to improve
- Shorten the description to 1024 characters.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 0
✓ No critical or high findings
Files scanned: 4. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- error
description-longdescription is 1422 chars, limit 1024
Process rating: all ten parameters 46/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Progress reporting. Says nothing while it works
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 4 mutating operations with no state check
- 50Steps. 2 steps
- 60Tools and files. Uses tools (bash, web) that frontmatter does not declare
- 100Failures and branches. 1 branches, has a failure section
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 711 tokens
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 1422: 120–800 characters recommended
- +3No numbered steps or checklist
- +3Output format is not stated: the model decides each time
- +2Single-language instructions
- +4Structure: 5 headings
- +4Has examples (1 code blocks)
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 54.