[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECXK7RS75NH5S8C2EWPRTV":3,"skill-same:01M7ECXK7RS75NH5S8C2EWPRTV":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M7ECXK7RS75NH5S8C2EWPRTV","x402-pay-per-call",null,"jonahthan433\u002FCortexOS","jonahthan433","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211465495?v=4","01M7ECH9HPHGA89DCXHHJBTS3C","jonah.ai","01M7ECH9JCEM45DZMWPT7148S1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fmlops\u002Fx402-pay-per-call\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# x402-pay-per-call\n\n# x402 Pay-Per-Call Gateway\n\nClass of work: AI inference\u002Fdata APIs that charge agents per call in USDC on Base mainnet via the x402 protocol, settled through Coinbase's CDP facilitator.\n\n## When this applies\n- CortexCloud `api.cortexcloud.org` (Python\u002FFastAPI on CT105 `:8000`) or the TS gateway (`~\u002Fcortexcloud-gateway` on hermes).\n- Tasks: \"verify the API earns\", \"register on x402scan\", \"fix 402 challenge\", \"prove settlement works\", \"make USDC today\".\n\n## Architecture (CortexCloud)\n- **Python API (live, production):** CT105 LXC `192.168.1.15`, reached via `pct exec 105` through ninyi (SSH key `~\u002F.ssh\u002Fhermes_ninyi`). App `\u002Fopt\u002FCortexCloudAPI`, systemd `cortexcloud.service` (restart = `pct exec 105 -- systemctl restart cortexcloud`). Cloudflare tunnel → `api.cortexcloud.org`. This is the REAL settlement path.\n- **TS gateway (rebuild, separate):** `~\u002Fcortexcloud-gateway` on hermes host. `verifyPayment` is a **placeholder** (Bazaar audit FAIL) — real settlement lives in the Python API. Don't confuse the two.\n- **Money path:** buyer sends `X-PAYMENT` header (base64 JSON PaymentPayload) → middleware calls CDP `\u002Fverify` then `\u002Fsettle` → USDC lands at merchant wallet. **Live settlement wallet = `WALLET_ADDRESS` in `\u002Fopt\u002FCortexCloudAPI\u002F.env` on CT105** (read-only check via `scripts\u002Fbase_balance.py`). Note: the earlier skill note naming `0xE816…` is a stale\u002Fother wallet — trust `.env` for the live one.\n- **PAYER NEEDS NO ETH GAS — only a signing key.** The CDP facilitator (not the payer wallet) executes the on-chain USDC transfer during `\u002Fsettle`. The client's only job is to sign the EIP-3009\u002FEIP-712 authorization (`payment-signature` header) with the payer's private key. So \"wallet has 0 ETH\" is NOT a blocker for a paid round-trip — the missing piece is always the payer's **private key**, never gas. (Verified against `app\u002Fmiddleware\u002Fx402.py` settle path; user corrected this assumption twice.)\n- **Server wallet-key inventory (CT105 + hermes host) lives in `references\u002Fwallet-keys.md`** — file → derived address. **`test_buyer.key` (CT `\u002Froot\u002Fbzcheck\u002F`) == `~\u002F.cortexcloud\u002F.session` (host) == the funded buyer `0xCed8…374A` (~7.31 USDC).** An earlier note claiming `0x0c0ddf…420f` and \"no key\" was STALE — a 2026-08-07 real paid round-trip signed with it and recovered `0xC0…374A`. This key is the payer for paid tests.\n- **Sole payout wallet (since 2026-08-08):** `WALLET_ADDRESS` = `0x5A0353Bc…88eA143` in `\u002Fopt\u002FCortexCloudAPI\u002F.env` + systemd `Environment=`; the old `0xab55B638…018008` and `WALLET_ADDRESS_2` are RETIRED (removed from both). **Do NOT emit duplicate `accepts[]` entries with the same payTo** — x402scan L3 validation rejects duplicate payment options (proven 2026-08-12: a `WALLET_ADDRESS_2 or WALLET_ADDRESS` fallback made the second entry identical to the first, and the listing dropped to \"1 resource up\"). Emit a second entry ONLY when a distinct second wallet is actually set. **Wallet-swap trap: systemd `Environment=` OVERRIDES pydantic's `.env`** — a swap needs BOTH edited + `daemon-reload` + restart, then verify live `accepts[].payTo`, the MPP log `recipient=` line, regenerated openapi, and one real paid call's on-chain Transfer `to` (full procedure in `cortexcloud-platform` skill). MCP payTo is separate: `CORTEXCLOUD_PAYTO` env in the mcp service (default already the same address).\n\n## KEY TECHNIQUE — prove settlement auth is LIVE without a real payment\nYou can't send real USDC to test (needs funded wallet + on-chain tx). Instead probe the CDP facilitator with a **malformed** payload:\n- POST `{X402_FACILITATOR_URL}\u002Fverify` with the app's signed JWT headers + a bogus `paymentPayload`.\n- **HTTP 400** with structured `\"paymentPayload is invalid\"` = auth JWT was ACCEPTED → settlement path is live. ✅\n- **HTTP 401** = auth failed → CDP key id\u002Fsecret wrong\u002Fexpired. ❌\n- A bare `curl` with no auth also returns 401 — that proves nothing about the app. Must use the app's headers.\n- See `scripts\u002Fverify_facilitator.py` (run inside CT105) and `references\u002Fcdp-facilitator-verification.md`.\n\n## REAL paid round-trip (the definitive proof — spend ~$0.005, don't fake it)\nWhen the user wants to prove settlement actually lands (\"run paid tests\"), do a REAL `@x402\u002Ffetch` payment, then read on-chain balances. Reuse `~\u002Fcortexcloud-mcp\u002Fproxy` (esbuild-bundled TS, deps installed). Buyer key = `test_buyer.key` staged to host tmp (see wallet-keys ref).\n- **Target the right wallet with `paymentRequirementsSelector`.** The `@x402` client DEFAULT selects `accepts[0]` (the ORIGINAL wallet). To pay the SECOND\u002Fnew wallet pass `new x402Client((_v, accepts) => accepts.find(a => a.payTo?.toLowerCase() === NEW.toLowerCase()))`. Constructor signature is `x402Client(selector)`. `wrapFetchWithPayment(fetch, client)` (NOT `(fetch, {account, client})`).\n- Force the model + tiny max_tokens, then confirm on-chain: read both payer and target `balanceOf` on Base USDC via public RPC (web3). Success = target up exactly `0.005000`, payer down.\n- **Debug tip — see what the client sends:** monkeypatch `globalThis.fetch` and read the `Request.headers` via `.entries()` (the wrapper passes a `Request` object, not separate init — a plain `Object.entries(headers)` returns nothing). Decode `payment-signature` header (base64 JSON): `{x402Version, accepted, payload:{authorization{from,to,value,validAfter,validBefore,nonce}, signature}}`.\n- **viem `privateKeyToAccount` REQUIRES a `0x`-prefixed hex key.** Raw 64-hex key files (e.g. `test_buyer.key`) fail with `invalid private key, expected hex or 32 bytes, got string`. Prefix: `pk = raw.startsWith(\"0x\") ? raw : \"0x\" + raw`. (Shell-quoting raw keys into `node -e` also mangles them — write the test to a `.mjs` file and scp\u002Fpush it instead.)\n- **Get the settlement tx HASH via `eth_getLogs` on the public Base RPC** (`https:\u002F\u002Fmainnet.base.org`). BaseScan V1 API is deprecated (\"You are using a deprecated V1 endpoint\"), Etherscan V2 requires a paid plan for chain 8453. Filter: address = USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, Transfer topic `0xddf252ad…523b3ef`, args `{from: payer, to: payTo}`, scan back ~1200 blocks (~40 min at 2s\u002Fblock). Confirms amount + block + txHash for the report.\n\n## Pitfalls — in-process payverify (payverify.py) that silently SWALLOWED every real payment\nSection-1 hardening added a local EIP-712 proof verify BEFORE the CDP \u002Fsettle round-trip. It was never exercised by a real `@x402` client until this session, and TWO bugs rejected every real payment with 402. Fixes (all in `app\u002Fmiddleware\u002Fpayverify.py`):\n- **Signature is a SIBLING of authorization.** `@x402` v2 returns `payload:{authorization{...}, signature}` — NOT `authorization.signature`. `verify_proof` computed `auth = payload.payload.authorization` and read `auth.signature` → always `\"missing signature\"`. Attach: `if not auth.get(\"signature\") and (payload.get(\"payload\") or {}).get(\"signature\"): auth[\"signature\"] = payload[\"payload\"][\"signature\"]`.\n- **Wrong EIP-712 `primaryType` name.** The client signs `primaryType: \"TransferWithAuthorization\"`; the verifier declared the struct as `\"TransferAuthorization\"`. The EIP-712 type hash encodes the type NAME, so recovery always failed → `\"signature does not match payer\"`. Rename `_AUTH_TYPES` key AND the `primaryType` to `TransferWithAuthorization` (exactly as the `@x402\u002Fevm\u002Fclient` `authorizationTypes` does). Do NOT \"fix\" the client — mirror the real one.\n- Chain of 402 errors while debugging a paid call: `\"missing signature\"` = sig not found in auth (sibling issue); `\"signature does not match payer\"` = type-name mismatch; `\"recipient mismatch\"` = payTo not in {WALLET_ADDRESS, WALLET_ADDRESS_2}. Old fixes to `request._receive`\u002Fbody re-inject were for the TS gateway, unrelated to these.\n\n## x402scan registration (agent-runnable via web form, NO SIWX)\n- Discovery\u002Faudit CLI: `npx -y @agentcash\u002Fdiscovery@latest discover \"https:\u002F\u002Fapi.cortexcloud.org\"` — reads `\u002Fopenapi.json`, validates 402 v2 challenges, lists routes. `check \"https:\u002F\u002Fapi.cortexcloud.org\u002F\u003Cpath>\"` audits one endpoint (works as of 2026-08; use it to isolate a single route's status). **`check` on the ORIGIN URL (`check https:\u002F\u002Forigin`) returns \"Not found — no spec data for this endpoint\" even for REGISTERED origins — it's registry-side; always pass a full endpoint path.** Zero critical errors = clean; L2\u002FL3 warnings are advisory.\n- **Resource \"up\u002Fdown\" on the dashboard = L3 spec validation, NOT endpoint uptime.** Proven 2026-08-12: every endpoint returned correct codes (200\u002F402\u002F204\u002F404) yet the listing showed \"1 resource up\" out of 15. The scanner's checker (`@agentcash\u002Fdiscovery`) infers per-route auth mode from the OPENAPI SPEC: an operation with neither a security scheme nor `x-payment-info` nor `security: []` gets `L2\u002FL3_AUTH_MODE_MISSING` and fails. Required declarations:\n  - Paid route (`\u002Fv1\u002Foptimize`): `\"x-payment-info\"` → authMode `paid`.\n  - Every FREE route: `\"security\": []` → authMode `unprotected`. (Empty array, not missing.)\n  - `info.contact` (email+url) and `info.x-guidance` (a short guidance string) on the root info object.\n  - With these, `discover` prints routes as `POST \u002Fv1\u002Foptimize  paid 0.05 USD [x402, mpp]` and every free route as `unprotected`.\n- **Run the validator LOCALLY instead of waiting for the dashboard crawl.** `npm pack @agentcash\u002Fdiscovery@\u003Cversion>` → `tar xzf` → `npm install` in the extracted dir → `node bin\u002Fdiscovery.js https:\u002F\u002Forigin` (optionally with `?cb=$(date +%s)` cache-buster). Prints every route + authMode + all L2\u002FL3\u002FL4 warnings. The validator source is readable (`dist\u002Findex.js`): key functions `inferAuthMode`, `resolvePaymentInfo`, `extractSchemas2` (v2 bazaar schema must be `extensions.bazaar.schema.properties.input.properties.{body|queryParams}` and `.output.properties.example`), `isUsableStatus` (402 or 2xx). Read it before debugging a probe rejection.\n- **Structured `x-payment-info` beats legacy flat.** The flat format (`pricingMode\u002Fprice\u002FminPrice\u002FmaxPrice`) triggers `L2_PAYMENT_INFO_LEGACY` (advisory only). Structured:\n  ```json\n  \"x-payment-info\": {\n    \"price\": {\"mode\": \"dynamic\", \"currency\": \"USD\", \"min\": \"0.05\", \"max\": \"1.503\"},\n    \"protocols\": [{\"x402\": {\"network\": \"eip155:8453\", \"asset\": \"USDC\"}},\n                  {\"mpp\": {\"method\": \"tempo\", \"intent\": \"charge\", \"currency\": \"USD\"}}]\n  }\n  ```\n  `mode` is `fixed` (with `amount`) or `dynamic` (with `min`\u002F`max`); currency ISO-4217.\n- **openapi.json is loaded into MEMORY at app startup** (`application.openapi = lambda: _OPENAPI_SPEC` in main.py). Patching the file has NO effect until `systemctl restart cortexcloud.service`. Verify against localhost first (`http:\u002F\u002F127.0.0.1:8000\u002Fopenapi.json` via `pct exec`), then the public edge with a cache-buster.\n- **Register-page probe \"No valid x402 response found\" on a route = its v2 challenge failed deep validation.** Hit 2026-08-08: numeric `accepts[].amount` (`20000`) failed the schema (`amount` must be a **string** `\"20000\"`); `discover` stayed green (it reads the spec, not the runtime header). Fix = `str(required)` in the middleware challenge; the register page re-probes live and the button flips to \"Add API (N resources)\". The AgentCash package's own schema is in `node_modules\u002F@agentcash\u002Fdiscovery\u002Fdist\u002Fcli.js` (`PaymentRequirementsV2Schema.amount: z.string().min(1)`) — read it before debugging a probe rejection.\n- **Registration: agent does it in the browser** at `https:\u002F\u002Fwww.x402scan.com\u002Fresources\u002Fregister` — type the bare origin, wait for the live endpoint crawl, click \"Add API (N resources)\". No wallet connect, no SIWX signature (as of 2026-08). Merchant page = `tryponcho.com\u002Fm\u002Fapi.cortexcloud.org`.\n- **Spec correctness gates the crawl count.** Per-op `security` controls which routes are probed for 402: `[{x402:[]}]` = paid (probe); `[]` = free\u002Flegacy (excluded); a free route carrying `x-payment-info` still fails → drop the block entirely. The OpenAPI generator must be **idempotent on `security`** (`op.pop(\"security\",None)` before re-apply) or stale keys compound errors.\n- **MPP (Tempo) is LIVE since 2026-08-08** — mppscan registration succeeded (14 resources, same merchant page). Dual-protocol 402: `payment-required` header (x402) AND `WWW-Authenticate: Payment id=…, realm=\"api.cortexcloud.org\", method=\"tempo\", intent=\"charge\"` (MPP), `x-payment-protocol: \"x402, mpp\"`. Server-side implementation = **pympp** (official Python SDK), NOT the Node router:\n  - `pip install \"pympp[tempo]\"` **plus `aiosqlite` explicitly** — the extra does NOT pull aiosqlite; without it MPP init fails with `No module named 'aiosqlite'` (caught + logged as \"MPP disabled\").\n  - **No operator private key is ever needed server-side** (contrary to merchants.md's `MPP_OPERATOR_KEY` — that's the Node router). pympp verifies credentials on-chain via Tempo RPC; `recipient` is just the address (`settings.WALLET_ADDRESS`); clients pay their own gas. Nothing secret to store beyond `MPP_SECRET_KEY`.\n  - `MPP_SECRET_KEY` = `openssl rand -hex 32`, persisted in `\u002Fetc\u002Fsystemd\u002Fsystem\u002Fcortexcloud.service.d\u002Fmpp.conf` (rotating invalidates outstanding challenges). `realm=` MUST be the public origin (`api.cortexcloud.org`) — auto-detect picks `localhost`.\n  - Wiring: lazy singleton `_get_mpp()` in `app\u002Fmiddleware\u002Fx402.py`; `Mpp.create(method=tempo(currency=\"0x20C000000000000000000000b9537d11c60E8b50\", intents={\"charge\": ChargeIntent()}, recipient=…), realm=…, secret_key=…, store=await SQLiteStore.create(\"mpp-store.sqlite\"))`. Credential path: `Authorization` header present → `mpp.charge(authorization=…, amount=price.lstrip(\"$\"))`; Challenge → 402+WWW-Authenticate; `(credential, receipt)` → record Payment, proceed. OpenAPI protocols: `[{\"x402\": {}}, {\"mpp\": {\"method\": \"tempo\", \"intent\": \"charge\", \"currency\": \"\u003Ctempo usdc>\"}}]`.\n  - `mpp-store.sqlite` (replay protection) is gitignored.\n- After registering, verify the listing crawls the paid endpoints (title = \"CortexCloud API • Poncho\").\n- Full mechanics in `references\u002Fx402scan-registration.md` (form walkthrough, security-declaration rules, mppscan).\n\n## Pitfalls\n- **Changing a mode's price touches TWO price sources + derived refs.** Customer price = `MODE_PRICE_USD` in `app\u002Fx402\u002Fpricing.py` (drives challenge amount via `price_for_mode`\u002F`usd_to_usdc_atomic`); the solver's own `*_PRICE_USD` (e.g. `CLASSICAL_PRICE_USD` in `app\u002Fsolvers\u002Fclassical.py`) is the PROVIDER-COST side of the benchmark margin ledger (`margin = price_usd - provider_cost`). For local solvers set it to `0.0` so margin = full customer price. Also update `ROUTE_PRICING` string, middleware `OUTPUT_EXAMPLES`, `examples\u002Fagents.json` pricing refs, README\u002Flanding price table, and the test asserting atomic amount (`tests\u002Ftest_api.py`), then regenerate `openapi.json` + restart. Verify with one real paid call: challenge amount, on-chain Transfer value, ledger `margin_usd`. (2026-08-08: classical $0.02 → $0.05.)\n- **Cloudflare caches stale 404 for `\u002Ffavicon.ico`** (~4h). A \"favicon missing\" warning may be a stale cache, not a real gap. Verify with cache-buster `?v=2`; can't purge without a CF token with Cache Purge perm.\n- **CDP headers are built inline**, not a module-level helper: `from cdp.x402.x402 import create_cdp_auth_headers; create_cdp_auth_headers(key_id, key_secret)()`. You cannot `from app.middleware.x402 import _cdp_headers` — that symbol doesn't exist at module level.\n- **x402 v2 challenge must include `extensions.bazaar.schema`** (input\u002Foutput) or discovery validator flags `SCHEMA_INPUT_MISSING`. `accepts[].amount` is an atomic-amount STRING (e.g. `\"5000\"`), not `maxAmountRequired`. Network = `eip155:8453` (Base mainnet), asset `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` (USDC).\n- **Cloudflare\u002FTLS-terminating-proxy trap (breaks REAL prod payments, not just smoke):** behind Cloudflare, `request.url.scheme` inside the middleware is `http` even though the public URL is `https`. The x402 challenge `resource.url` then comes out `http:\u002F\u002F…` and the CDP facilitator rejects it (`^https:\u002F\u002F.*$` regex on `\u002Fvalidate` + `\u002Fsettle`). Fix in `_resource_url`: `scheme = request.headers.get(\"x-forwarded-proto\", request.url.scheme)`. After the fix the public `https:\u002F\u002Fapi.cortexcloud.org\u002F...` challenge is https natively — that's the real smoke target (no cloudflared tunnel needed for prod). The `X402_RESOURCE_BASE` env is a fallback only; the proxied-request path is what prod hits.\n- **systemd `Environment=` overrides pydantic `.env`.** For the CT105 `cortexcloud.service`, prod flags (AI_ENABLED, X402_RESOURCE_BASE, INTERNAL_TOKEN) live in the drop-in `\u002Fetc\u002Fsystemd\u002Fsystem\u002Fcortexcloud.service.d\u002Fmpp.conf`, NOT `.env`. Editing `.env` for a prod flag is a no-op — add to drop-in, `daemon-reload`, restart.\n- **`\u002Finternal\u002Fmetrics` 500s with `func.interval(\"24 hours\")`** — SQLAlchemy's `func.interval()` renders `interval($1::VARCHAR)` which Postgres rejects (syntax error near `$3`). Use `text(\"interval '24 hours'\")` literally instead. This endpoint is disabled (503) unless `INTERNAL_TOKEN` is set; enable it in the drop-in to verify AI revenue\u002Fmargin aggregates after a paid run.\n- **`info.contact.email` is required for ownership\u002Fmerchant-page** (x402scan `OPENAPI_CONTACT_MISSING`). Set it to the user's real contact (user chose `ampwerajonathan50@gmail.com` for now) — a stale domain email on the page is the \"fake data\" class the user bans.\n- **A stale\u002Fincorrect `security` proofreading pass before registration saves a cycle.** One bad generator run pushed the probe error count 3→34; the fix was making `security` idempotent and clearing `x-payment-info` off free routes. Verify the spec at the public edge (Chrome UA) before re-crawling.\n- **L3_INPUT_SCHEMA_MISSING on genuinely-parameterless GETs is NOT a critical failure.** Paid GETs like `defillama\u002Fchains`, `crypto\u002Flist`, `fx\u002Flist` return full datasets with zero query params — `parameters: []` is the honest schema. `discover`\u002F`check` still emit L3_INPUT_SCHEMA_MISSING for them; do NOT fabricate a fake `limit`\u002Foptional param the upstream ignores (that's the \"fake data\" class the user bans). Leave `parameters: []`; L3 is advisory, not blocking — silence it only by adding a real honored param to the handler, not by lying in the spec.\n\n## Money-path hardening: settle LAST, after every rejection the endpoint would raise\nThe x402 middleware settles BEFORE FastAPI's input-validation middleware runs —\na malformed paid body got CHARGED (proven: a 422-destined request settled $0.05).\nGuard order in the middleware, all BEFORE the settle call (both x402 and MPP\nbranches — guard once before `if not payment_signature:`):\n1. **Body-shape validation** → 422 (mirror the endpoint's required fields:\n   `problem` dict, `n` int, `data` dict, `problem_type` in allowed set).\n2. **Mode whitelist** → 422 (`auto|classical|hybrid|quantum`; unknown mode would\n   otherwise charge then fail).\n3. **Solver availability** → 409 `{\"error\":\"no available solver for requested\n   mode\",\"mode\":...}` (e.g. quantum with all QPUs offline). Charge-then-fail on\n   an unavailable backend is the same bug as charge-then-422.\nPrice\u002Famount checks (effective price, margin guard) also run pre-settle. Live\nproof pattern: attempt the paid flow with a bad body → expect 422 and a ledger\nrow count UNCHANGED; with an unavailable mode → 409 and ledger unchanged.\n\n## Test isolation: pytest must never touch the production DB\nA session-scoped conftest `_clean_tables` fixture TRUNCATING\n`x402_payments`\u002F`benchmarks`\u002F`opt_jobs` on the LIVE database wiped real settled\npayments. Rules for the conftest:\n- Point at a dedicated scratch DB (`cortexcloud_test`, created once via\n  `createdb`): set `os.environ[\"DATABASE_URL\"]` **before importing any app\n  module** (engine binds at import), and **read the DB password from the app's\n  `.env`** (pytest doesn't export it — the env-var fallback silently connects\n  with the wrong password and every test errors).\n- `_create_test_tables` must `import app.models` FIRST (Base.metadata is empty\n  until model modules import → create_all creates nothing).\n- Prove isolation with a sentinel row in PROD before a test run; assert it\n  survives (not just \"test DB has rows\").\n- `docker exec` needs `-i` to pass heredoc stdin.\n\n## Quantum backend discovery: exclude AHS-only devices\nBraket discovery filtering `deviceType == \"QPU\"` + ONLINE accepts QuEra Aquila\n(AHS\u002Fanalog only) — a paid QUBO job on it fails after charging. Filter on\n`deviceCapabilities` containing any of `jaqcd | annealing | openqasm`; AHS-only\ndevices can't run the QUBO IR. Availability then honestly reports \"no ONLINE QPU\"\ninstead of routing money into a guaranteed failure.\n\n## Honest ceiling on \"make money today\"\nCold x402scan discovery traffic is thin — organic agent calls in one day are unlikely. Realistic same-day revenue = register on x402scan AND route your own agent workloads through your own API (you're the most likely buyer). Dogfooding the paid loop proves it end-to-end.\n\n## Support files\n- `references\u002Fcdp-facilitator-verification.md` — facilitator endpoint, auth model, the probe, result reading, real e2e self-test.\n- `references\u002Fx402scan-registration.md` — discover\u002Fcheck CLI, clean-state example, SIWX registration steps, discovery-spec gotchas.\n- `references\u002Fendpoint-battery.md` — test ALL endpoints: stale-openapi trap, Cloudflare 530 flake, origin test, expected status map (200\u002F402\u002F401\u002F503), bash `local code body` gotcha.\n- `references\u002Fwallet-keys.md` — key-file inventory (both machines) + how to safely find a payer key by address.\n- `scripts\u002Fverify_facilitator.py` — re-runnable auth-liveness probe for CT105.\n- `scripts\u002Fbase_balance.py` — read ETH + USDC (Base) balance of the live `WALLET_ADDRESS` via public RPC (no keys). Run from Hermes host; pass an address arg to check any wallet.\n- `scripts\u002Fscan_keys.py` — sweep a dir for raw 64-hex keys, derive+print only addresses (never key material). Run on CT venv python.\n",{},"main","38b32c99e7ed0b8e215d638e92cfa452c1ec3079","skills\u002Fimported\u002Fmlops\u002Fx402-pay-per-call","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS","https:\u002F\u002Fgithub.com\u002Fjonahthan433","AI Consultant","2026-10-24 05:13:39",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add jonahthan433\u002FCortexOS --skill x402-pay-per-call",{"tool":35,"command":36},"bunx","bunx skills add jonahthan433\u002FCortexOS --skill x402-pay-per-call",{"tool":38,"command":39},"pnpm","pnpm dlx skills add jonahthan433\u002FCortexOS --skill x402-pay-per-call","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fmlops\u002Fx402-pay-per-call\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"skill.json","REFERENCE","参考文档",596,"https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fmlops\u002Fx402-pay-per-call\u002Fskill.json",[50,56,62,68,74,80],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7EDQZDQX3Q8Y7GCQX6KN9V7","opportunity-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fsales\u002Fopportunity-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7EDQYA0V9Y99VKBREJJ3MRT","morning-intel","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fmorning-intel\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EDQVX1JVY0B6PDHKKGM19G","decision-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fdecision-brief\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7EDQV1GENZAC2SZSD8KZ3GM","weekly-review","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fweekly-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7EDQT2KETJ1Y3CGVN9EKW2J","system-health","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fsystem-health\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EDQQN2JK3XPWMS1M4T0F3K","backup-restore","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fbackup-restore\u002FSKILL.md",[],[]]