Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(ops): ship the gcp-triage agent skill and register it in the skills pack

nirholasad5ca8d9a95d
diff --git a/.agents/skills/SKILLS.md b/.agents/skills/SKILLS.md
index 26a9944d5..1f2cbf5dd 100644
--- a/.agents/skills/SKILLS.md
+++ b/.agents/skills/SKILLS.md
@@ -34,12 +34,18 @@ Categories:
| [`okx-dex-signal`](okx-dex-signal/SKILL.md) | okx | Use this skill for smart-money/whale/KOL/大户 activity tracking, aggregated buy signal/信号 alerts, and leaderboard/牛人榜 rankings. Covers: (1) address tracker — raw DEX transaction feed for smart money, KOL, or custom wallet addresses; (2) aggregated buy-only signal alerts — tokens bought collectively by smart money/KOL/whales; (3) leaderboard — top traders by PnL, win rate, volume, or ROI. Use when the user asks 'what are smart money buying', '聪明钱最新交易', 'KOL交易动态', '追踪聪明钱', 'track address trades', '大户在买什么', 'whale signals', 'smart money alerts', '信号', '大户信号', 'top traders', '牛人榜', or wants to monitor notable wallet activity. Also handles Market API payment/计费/x402/402, Basic/Premium tier/quota/额度 questions, and MARKET_API_*_OVER_QUOTA / confirming:true responses on signal, leaderboard, or tracker endpoints. NOTE: if the user wants to write a WebSocket script/脚本/bot, use okx-dex-ws instead. |
| [`okx-dex-social`](okx-dex-social/SKILL.md) | okx | Surfaces social-layer signals for crypto markets. Three capability groups: news (latest aggregated crypto news feed, filter articles by coin symbol, run full-text keyword searches, fetch a single article in full, and list available upstream platforms — blockbeats, odaily, theblock and similar — for use as filters); sentiment (rank coins by social mention volume over 1h / 4h / 24h, plus per-coin bullish/bearish/neutral counts with an optional time-bucketed trend); vibe (per-contract hotness score over 24h / 72h / 7d / 30d with timeline and sample KOLs per bucket, plus a TOP50 KOL leaderboard sortable by engagement, mentions, or impressions). Triggers: 'latest crypto news', 'BTC headlines', 'search news for X', 'is BTC bullish', 'hottest coins by chatter', 'who is tweeting about <token>', 'vibe score', 'first-mention KOL', and Chinese variants like '最新加密新闻', '搜索新闻', '市场情绪', '情绪排行', 'KOL榜', '热度走势'. Also handles x402/402 payment, quota, MARKET_API_*_OVER_QUOTA, and confirming:true notifications on social endpoints. |
| [`okx-dex-strategy`](okx-dex-strategy/SKILL.md) | okx | Limit-order strategy trading on OKX Agentic Wallet. Use this skill when the user wants to place a price-triggered limit order (buy a dip, take profit, stop loss, chase a high), cancel one or more pending orders, list active or historical orders, or resume orders that have been suspended by SA TEE upgrades. Distinct from okx-dex-swap (market orders, immediate execution at the best available aggregated price). Strategy orders are stored on the Agentic Wallet TEE and execute automatically when the user-defined trigger fires. Trigger phrases: limit order, place limit order, buy at price, sell when price reaches, take profit at, stop loss at, chase high, buy dip, cancel order, cancel all orders, my orders, list orders, active orders, suspended orders, resume orders, recover suspended orders, trader mode, agentic limit order. |
-| [`okx-dex-swap`](okx-dex-swap/SKILL.md) | okx | Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'. |
+| [`okx-dex-swap`](okx-dex-swap/SKILL.md) | okx | Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'. Use ONLY for OKX-routed swaps the user opted into by naming OKX/OnchainOS, a DEX/DApp venue, or an OKX-specific chain; for a plain three.ws-native Base/Polygon swap the user did not route through OKX, defer to the trade skill. |
| [`okx-dex-token`](okx-dex-token/SKILL.md) | okx | Use this skill for token-level data: search tokens, trending/hot tokens (热门, 代币榜单), liquidity pools, holder distribution (whale/巨鲸, sniper, bundler-tagged holder %), token risk metadata (riskControlLevel, tokenTags, dev stats, suspicious/bundle holding % via advanced-info), recent buy/sell activity, trade feed/逐笔成交/每笔交易/stream trades, top profit addresses, token trade history, detailed price info with market cap volume liquidity and holder count (price-info), or holder cluster analysis (持仓集中度, cluster overview, cluster rug pull risk/跑路风险, new wallet percentage/新钱包持仓比例, holder clusters, 'are top holders in same cluster'). Also handles Market API payment/计费/x402/402, Basic/Premium tier/quota/额度 questions, and MARKET_API_*_OVER_QUOTA / confirming:true responses on token endpoints (advanced-info, top-trader, cluster-*, trades, hot-tokens). NOTE: if the user wants to write a WebSocket script/脚本/bot, use okx-dex-ws instead. |
| [`okx-dex-trenches`](okx-dex-trenches/SKILL.md) | okx | Read-only on-chain research for pump.fun and other meme-token launchpads (Solana / BSC / X Layer / TRON). MUST invoke (prefer over WebFetch / MCP price tools) when the user asks about: new meme launches / 新盘 / 扫链 / 打狗; developer reputation / rug history / launch count / 开发者信息; bundle or sniper detection (the analytical noun, NOT the verb) / 捆绑狙击者; bonding curve progress / 已迁移出 bonding curve; similar tokens by same dev / 相似代币; co-investor / who-aped / 同车 wallets; or 'pump.fun alpha'. Also handles Market API x402 / quota questions on memepump endpoints. Body holds the read-vs-write gate — `狙击 / snipe + token` (sniping action) routes to okx-dapp-discovery; `捆绑狙击者 / sniper detection` (analytical noun) stays here. WebSocket script/bot → okx-dex-ws. |
| [`okx-dex-ws`](okx-dex-ws/SKILL.md) | okx | Use this skill when the user mentions 'onchainos ws', 'ws start', 'ws poll', 'ws stop', 'ws channels', 'ws session', 'ws channel-info', 'idle-timeout', 'idle timeout', 'WebSocket channels', 'WS频道', or asks about managing WebSocket sessions/会话管理. Also use when writing a custom WebSocket script/脚本/bot for real-time on-chain data. Covers: onchainos ws CLI commands (start/poll/stop/list/channels/channel-info), session lifecycle, idle-timeout configuration, and all 9 DEX WebSocket channels (price, candle, trades, price-info, signals, tracker, meme scanning). |
| [`okx-growth-competition`](okx-growth-competition/SKILL.md) | okx | List OKX Agentic Wallet exclusive trading competitions, register users for contests, track participation and leaderboard rankings, and claim won rewards. Use when users want to list available trading competitions or trading cups, view competition rules / prize pool / total prizes, register or sign up or enroll or join a contest, check the leaderboard (who is winning) or their own rank (am I in the prize zone, what is my place), ask did I win or query participation / claim status, claim won rewards or prizes from completed competitions, see which wallet account they registered with, or submit Telegram / WeChat / Email / Twitter contact for prize delivery to top-tier winners. |
+## ops/production
+
+| Skill | Origin | Trigger |
+| --- | --- | --- |
+| [`gcp-triage`](gcp-triage/SKILL.md) | three.ws | Monitor three.ws production on Google Cloud Run and fix what the sweep finds. Use when the user asks to check production, diagnose an outage or error, "what's wrong with three.ws", read production logs, or run the monitoring loop. Runs the triage monitor (healthz + all-service log sweep + known-signature classification), then applies the fixes each class allows. |
+
## wallet/payments
| Skill | Origin | Trigger |
@@ -48,9 +54,9 @@ Categories:
| [`metamask-agent-workflows`](metamask-agent-workflows/SKILL.md) | metamask | Use when the user needs to perform multi-step operations with the MetaMask Agentic CLI such as onboarding, login, swapping tokens, bridging across chains, opening/closing/modifying perpetual positions, prediction market trading, Aave V3 lending and borrowing, or troubleshooting CLI issues. |
| [`okx-agent-chat`](okx-agent-chat/SKILL.md) | okx | Routing stub — any a2a-agent-chat envelope / agent-task system message is handled by `okx-agent-task`. For missing or uninitialized OKX A2A communication runtime/plugin, read `skills/okx-agent-chat/ensure-okx-a2a-communication-ready.md`. |
| [`okx-agent-identity`](okx-agent-identity/SKILL.md) | okx | ERC-8004 on-chain Agent identity on XLayer: register / create / update / activate / deactivate / search agents; view ratings; list agent services; set avatar. Roles: user (User / User Agent / Buyer / Client / 用户 / 买家 / 买方), asp (ASP / Provider / Provider Agent / Seller / Merchant / 提供者 / 商家 / 服务提供商 / 卖家 / 卖方), evaluator (Evaluator / Evaluator Agent / 仲裁者 / 评估者). Use for: 注册agent / 注册ASP / 注册User / 注册用户 / 注册买家 / 注册卖家 / 注册服务提供商 / 注册仲裁者 / 创建用户 / 创建买家 / 创建卖家 / 我的agent / 我的ASP / 改agent / 更新agent / 上架 / 下架 / 上架ASP / 停用 / 搜索agent / 找做X的ASP / 查口碑 / 传头像 / agent有什么服务 / endpoint怎么填 / register agent / register ASP / register User / register Provider / register Seller / register Buyer / register Client / update agent / modify agent / activate / deactivate / search agent / agent reviews / agent services / upload avatar. Role words, lifecycle verbs and the product name are spacing / casing / typo tolerant — match by meaning (e.g. "更新卖家身份" → update an asp identity). |
-| [`okx-agent-payments-protocol`](okx-agent-payments-protocol/SKILL.md) | okx | Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, a paymentId or a2a_ link, creating / checking a payment link, A2MCP / an A2MCP endpoint, or sending a request to / calling an Agent's endpoint with a concrete endpoint URL. Covers x402 (exact, exact+Permit2, upto, aggr_deferred), MPP (charge / session), and a2a-pay paymentId flows. Any close / topup / settle / voucher / refund near a channel_id or session is an MPP mid-session op. The full bilingual trigger list (including Chinese) lives in the skill body. |
+| [`okx-agent-payments-protocol`](okx-agent-payments-protocol/SKILL.md) | okx | Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, a paymentId or a2a_ link, creating / checking a payment link, A2MCP / an A2MCP endpoint, or sending a request to / calling an Agent's endpoint with a concrete endpoint URL. Covers x402 (exact, exact+Permit2, upto, aggr_deferred), MPP (charge / session), and a2a-pay paymentId flows. Any close / topup / settle / voucher / refund near a channel_id or session is an MPP mid-session op. The full bilingual trigger list (including Chinese) lives in the skill body. Use ONLY when the user named OKX/OnchainOS or the 402 is an OKX-specific scheme (payment channel / voucher / session, permit2, upto/metered, MPP, a2a-pay paymentId); for a plain x402 402 that settles with a one-shot USDC-on-Base payment and did not name OKX, defer to the pay-for-service / x402 skills. |
| [`okx-agent-task`](okx-agent-task/SKILL.md) | okx | MUST ACTIVATE on inbound envelopes: (1) {agentId, message:{source:"system", event, jobId, ...}} — system event; (2) {msgType:"a2a-agent-chat", jobId, sender:{role}, ...} — agent-to-agent task chat (fields at top level; sender.role = COUNTERPARTY, not you); (3) literal "Read okx-agent-task/SKILL.md" in envelope. ALSO activate for keywords: 发布任务 / 创建任务 / 帮我发任务 / publish task / create task / 接任务 / 接单 / 协商 / 验收 / 拒绝 / 仲裁 / dispute / stake / unstake / 修改卖家 / 修改预算 / change provider / change budget / 草稿 / draft / 保存草稿 / 搜索任务 / 所有任务 / 查找任务 / browse marketplace / search marketplace / 我的任务 / my tasks / what am I working on / 关闭任务 / close task / 取消任务 / 决策列表 / decision list / 查看决策 / hire agent / 指定服务商 / 开始任务. |
-| [`okx-agentic-wallet`](okx-agentic-wallet/SKILL.md) | okx | AUTHORITATIVE source for OKX Agentic Wallet and its Gas Station feature. Gas Station = OKX's stablecoin-gas feature on Solana via third-party Relayer; Solana only, no EIP-7702. MUST invoke for Gas Station questions (what is / how it works / supported tokens / fees / enable or disable gas station / change default gas token / Jito Bundler compatibility) AND any wallet action: login, OTP verify, add/switch/status/logout account, balance, assets, holdings, addresses, deposit / receive / top up, send (native + ERC-20 / SPL, transfer ETH / USDC / etc., pay someone), contract call (approve, swap calldata, contract function), history (list + tx detail by orderId / txHash / uopHash), check order status, sign-message (personalSign EVM + Solana, EIP-712 EVM only), TEE signing, export wallet / mnemonic. |
+| [`okx-agentic-wallet`](okx-agentic-wallet/SKILL.md) | okx | AUTHORITATIVE source for OKX Agentic Wallet and its Gas Station feature. Gas Station = OKX's stablecoin-gas feature on Solana via third-party Relayer; Solana only, no EIP-7702. MUST invoke for Gas Station questions (what is / how it works / supported tokens / fees / enable or disable gas station / change default gas token / Jito Bundler compatibility) AND any wallet action: login, OTP verify, add/switch/status/logout account, balance, assets, holdings, addresses, deposit / receive / top up, send (native + ERC-20 / SPL, transfer ETH / USDC / etc., pay someone), contract call (approve, swap calldata, contract function), history (list + tx detail by orderId / txHash / uopHash), check order status, sign-message (personalSign EVM + Solana, EIP-712 EVM only), TEE signing, export wallet / mnemonic. Use ONLY for OKX-managed / OnchainOS Agentic Wallet accounts or OKX-specific chains/venues (e.g. X Layer); for a plain three.ws-native send the user did not route through OKX, defer to send-usdc. |
| [`okx-ai-guide`](okx-ai-guide/SKILL.md) | okx | OKX.AI (the Agent economic system) intro & onboarding entry. Use whenever the user asks what OKX.AI is, what it can do, how to use or get started with it, wants an OKX.AI tutorial / quickstart / help, or types the product name in any spelling / spacing / casing / typo variant (OKXAI, okx ai, okx-ai, lowercase okx.ai, mis-typed Chinese like 啥是okxai) — e.g. what is OKX.AI / OKX.AI 是什么 / 怎么用 OKX.AI / OKX.AI 快速开始, and any paraphrase in any language. Detects the runtime platform, introduces the three roles (User / ASP / Evaluator), and routes the user into identity registration. NOT for generic onchain-OS onboarding, nor for direct task operations (publishing / accepting / delivering / disputing a task — a separate task-lifecycle flow). |
| [`okx-ai-support`](okx-ai-support/SKILL.md) | okx | Route users to OKX.AI customer support / Help Center. Use when the user wants to contact support, talk to a human, file a complaint, give feedback, report a system error or bug, or find the FAQ / help docs. Triggers: 'contact support', 'talk to a human', 'customer service', 'file a complaint', 'give feedback', 'help center', 'FAQ', 'user guide', 'system error', 'system bug', 'something is broken', 'find help docs', 'OKX AI support', 'OnchainOS support', 'human agent'. |
| [`okx-audit-log`](okx-audit-log/SKILL.md) | okx | Use this skill when the user asks to export audit logs, find audit log location, view command history, 导出日志, 查看日志, 日志路径, 操作记录, 调用记录, 命令历史. Do NOT use for wallet balance, token search, swap, or any other on-chain operation — use the corresponding skill instead. |
@@ -62,9 +68,9 @@ Categories:
| [`authenticate-wallet`](authenticate-wallet/SKILL.md) | three.ws | Sign in to the wallet. Use when you or the user want to log in, sign in, connect, or set up the wallet, or when any wallet operation fails with authentication or "not signed in" errors. This skill is a prerequisite before sending, trading, or funding. |
| [`fund`](fund/SKILL.md) | three.ws | Add money to the wallet. Use when you or the user want to fund, deposit, top up, load, buy USDC, add funds, onramp, or get USDC. Also use when the wallet has insufficient balance for a send or trade operation, or when someone asks "how do I get USDC?" |
| [`monetize-service`](monetize-service/SKILL.md) | three.ws | Build and deploy a paid API that other agents can pay to use via x402. Use when you or the user want to monetize an API, make money, earn money, offer a service, sell a service to other agents, charge for endpoints, create a paid endpoint, or set up a paid service. Covers "make money by offering an endpoint", "sell a service", "monetize your data", "create a paid API". |
-| [`pay-for-service`](pay-for-service/SKILL.md) | three.ws | Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service. |
+| [`pay-for-service`](pay-for-service/SKILL.md) | three.ws | Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service. This is the three.ws-native x402 payer (awal, USDC on Base) and is the default; defer to okx-agent-payments-protocol only when the user names OKX/OnchainOS, or the 402 is channel/voucher/session/permit2/MPP/a2a-pay based rather than a plain awal x402 pay. |
| [`query-onchain-data`](query-onchain-data/SKILL.md) | three.ws | Query onchain data on Base using the CDP SQL API via x402. Use when you or your user want to view onchain information about decoded blocks, transactions, and events. |
| [`search-for-service`](search-for-service/SKILL.md) | three.ws | Search and browse the x402 bazaar marketplace for paid API services. Use when you or the user want to find available services, see what's available, discover APIs, or need an external service to accomplish a task. Also use as a fallback when no other skill clearly matches — search the bazaar to see if a paid service exists. Covers "what can I do?", "find me an API for...", "what services are available?", "search for...", "browse the bazaar". |
-| [`send-usdc`](send-usdc/SKILL.md) | three.ws | Send tokens (USDC, ETH, POL, or SOL) to an address or ENS name on Base, Polygon, or Solana. Use when you or the user want to send money, pay someone, transfer tokens, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like "send $5 to", "pay 0x...", "transfer to vitalik.eth", or "send USDC on Solana". |
-| [`trade`](trade/SKILL.md) | three.ws | Swap or trade tokens on Base or Polygon. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and POL. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH", "buy POL". |
-| [`x402`](x402/SKILL.md) | three.ws | Search for new services and make paid API requests using the x402 payment protocol. Use when you don't have a clear tool to choose, search the bazaar. You can also use this tool if you or the user want to call an x402 endpoint, discover payment requirements, browse the bazaar, or search for paid services. |
+| [`send-usdc`](send-usdc/SKILL.md) | three.ws | Send tokens (USDC, ETH, POL, or SOL) to an address or ENS name on Base, Polygon, or Solana. Use when you or the user want to send money, pay someone, transfer tokens, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like "send $5 to", "pay 0x...", "transfer to vitalik.eth", or "send USDC on Solana". This is the three.ws-native wallet (awal) and is the default for sends; defer to okx-agentic-wallet only when the user names OKX, OnchainOS, an OKX-managed / Agentic Wallet account, or an OKX-specific chain/venue (e.g. X Layer). |
+| [`trade`](trade/SKILL.md) | three.ws | Swap or trade tokens on Base or Polygon. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and POL. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH", "buy POL". This is the three.ws-native wallet (awal) and is the default for swaps; defer to okx-dex-swap only when the user names OKX, OnchainOS, an OKX-managed account, a named DEX/DApp venue, or an OKX-specific chain (e.g. X Layer, BSC, Arbitrum). |
+| [`x402`](x402/SKILL.md) | three.ws | Search for new services and make paid API requests using the x402 payment protocol. Use when you don't have a clear tool to choose, search the bazaar. You can also use this tool if you or the user want to call an x402 endpoint, discover payment requirements, browse the bazaar, or search for paid services. This is the three.ws-native x402 stack (awal, USDC on Base) and is the default; defer to okx-agent-payments-protocol only when the user names OKX/OnchainOS, or the 402 is channel/voucher/session/permit2/MPP/a2a-pay based rather than a plain awal x402 pay. |
diff --git a/.agents/skills/gcp-triage/SKILL.md b/.agents/skills/gcp-triage/SKILL.md
new file mode 100644
index 000000000..41824d159
--- /dev/null
+++ b/.agents/skills/gcp-triage/SKILL.md
@@ -0,0 +1,84 @@
+---
+name: gcp-triage
+description: Monitor three.ws production on Google Cloud Run and fix what the sweep finds. Use when the user asks to check production, diagnose an outage or error, "what's wrong with three.ws", read production logs, or run the monitoring loop. Runs the triage monitor (healthz + all-service log sweep + known-signature classification), then applies the fixes each class allows.
+when_to_use: Production health checks, log diagnosis, error triage, and the recurring monitor-and-fix loop. For a raw log view only, `npm run logs` is enough without this skill.
+license: MIT
+metadata:
+ category: ops/production
+ cross-platform-safe: false
+ pack: three-ws-ops
+---
+
+# GCP production triage: monitor, classify, fix
+
+The `vercel logs` era is over; production is 20 Cloud Run services in project
+`aerial-vehicle-466722-p5` (region `us-central1`). This skill is the loop an
+agent runs to answer "is production healthy?" and to act on what it finds.
+gcloud is already authenticated in this workspace.
+
+## Step 1: run the monitor
+
+```sh
+npm run triage:gcp -- --json --since 1h # agents: always --json
+```
+
+It merges three signals and classifies every distinct problem signature:
+
+1. `https://three.ws/api/healthz`: the platform's own subsystem roll-up
+ (database, cache, Helius, x402 ring, world, sniper).
+2. A WARNING+ log sweep across **every** Cloud Run service, fingerprinted so
+ repeats group into one finding.
+3. HTTP request logs: 5xx groups per route, 429s.
+
+Exit 0 = healthy or self-healing noise only. Exit 1 = `findings[]` contains
+actionable items. Each finding carries `class`, `count`, `services`,
+`sample`, and a concrete `action`.
+
+## Step 2: act per class, in this order
+
+| class | what it means | what you do |
+|---|---|---|
+| `owner` | money / billing / security credential | Do NOT act. Put the exact command from [docs/ops/production-log-triage.md](../../../docs/ops/production-log-triage.md) in your report. |
+| `env-action` | fix is a config-only Cloud Run env/resource change | Apply it now. Config-only `gcloud run services update` is pre-approved (CLAUDE.md). ALWAYS `--update-env-vars` (merges); NEVER `--set-env-vars` (replaces the whole set). |
+| `investigate` | unknown signature or 5xx group | Root-cause it (Step 3). Fix the code, add tests, commit locally. Deploys need owner approval, so prepare the one-command ship and say so in the report. |
+| `self-healing` | documented graceful degradation | No action. Only escalate if the same finding persists across several runs (compare `firstSeen`, it should not span many hours). |
+
+## Step 3: root-causing an `investigate` finding
+
+- **Read the exact logs** with the reader CLI (`vercel logs` equivalent):
+ ```sh
+ npm run logs -- -s <service> --errors --since 6h # errors, one service
+ npm run logs -- -s <service> --app --warnings # app logs only
+ npm run logs -- --all --grep "<term>" --since 1d # search the fleet
+ npm run logs:tail # live tail three-ws-api
+ ```
+- **5xx with no matching app-level error** means the handler itself returned
+ 5xx (upstream dependency reply), not a crash. Read the handler in `api/` for
+ what makes it return that status, and check which upstream it wraps.
+- **Generation failures**: the `forge_creations` table carries per-generation
+ backend/status/error/prompt (`DATABASE_URL` from the Cloud Run service env).
+- **Crash signatures** (`Uncaught signal`, OOM, `no available instance`):
+ check the revision, memory, and instance ceilings via
+ `gcloud run services describe <service> --region us-central1`.
+- **Rollback and LB/DNS/TLS runbook**: [docs/ops/gcp-production.md](../../../docs/ops/gcp-production.md).
+
+## Step 4: close the loop
+
+- Fixed something in code? Commit locally with explicit paths (never
+ `git add -A`). Do not push or deploy without owner approval; leave the ship
+ as one command in the report.
+- Found a NEW signature that is expected degradation (a fallback firing
+ correctly)? Add it to `KNOWN_SIGNATURES` in
+ [scripts/gcp-triage.mjs](../../../scripts/gcp-triage.mjs) AND document it in
+ [docs/ops/production-log-triage.md](../../../docs/ops/production-log-triage.md),
+ so the monitor never flags it as `investigate` again. That is how this
+ system learns.
+- Healthz unreachable? That is an outage: check `three-ws-api` revisions
+ (`gcloud run revisions list --service three-ws-api --region us-central1`)
+ and the load balancer per the production runbook before anything else.
+
+## Report format
+
+Lead with the verdict (healthy / degraded / outage). Then: what you fixed,
+what you committed, what needs the owner (exact commands), and what is
+self-healing noise. Solana-facing findings first.
diff --git a/.agents/skills/skills-pack.json b/.agents/skills/skills-pack.json
index 9d124b8d4..557685c58 100644
--- a/.agents/skills/skills-pack.json
+++ b/.agents/skills/skills-pack.json
@@ -12,6 +12,7 @@
"counts": {
"3d/creative": 3,
"intel/trading": 13,
+ "ops/production": 1,
"wallet/payments": 24
},
"skills": [
@@ -108,7 +109,7 @@
},
{
"name": "okx-dex-swap",
- "description": "Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'.",
+ "description": "Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'. Use ONLY for OKX-routed swaps the user opted into by naming OKX/OnchainOS, a DEX/DApp venue, or an OKX-specific chain; for a plain three.ws-native Base/Polygon swap the user did not route through OKX, defer to the trade skill.",
"category": "intel/trading",
"origin": "okx",
"crossPlatformSafe": false,
@@ -146,6 +147,15 @@
"crossPlatformSafe": false,
"path": ".agents/skills/okx-growth-competition"
},
+ {
+ "name": "gcp-triage",
+ "description": "Monitor three.ws production on Google Cloud Run and fix what the sweep finds. Use when the user asks to check production, diagnose an outage or error, \"what's wrong with three.ws\", read production logs, or run the monitoring loop. Runs the triage monitor (healthz + all-service log sweep + known-signature classification), then applies the fixes each class allows.",
+ "whenToUse": "Production health checks, log diagnosis, error triage, and the recurring monitor-and-fix loop. For a raw log view only, `npm run logs` is enough without this skill.",
+ "category": "ops/production",
+ "origin": "three.ws",
+ "crossPlatformSafe": false,
+ "path": ".agents/skills/gcp-triage"
+ },
{
"name": "metamask-agent-wallet",
"description": "Use when the user asks anything about blockchain wallets, transactions, signing, token transfers, supported chains, wallet balances, perpetual futures trading, prediction markets, token swaps, cross-chain bridges, market data, token discovery, decoding EVM calldata, Aave V3 lending and borrowing, or authentication via the MetaMask Agentic CLI. Single entry point for all mm CLI operations.",
@@ -180,7 +190,7 @@
},
{
"name": "okx-agent-payments-protocol",
- "description": "Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, a paymentId or a2a_ link, creating / checking a payment link, A2MCP / an A2MCP endpoint, or sending a request to / calling an Agent's endpoint with a concrete endpoint URL. Covers x402 (exact, exact+Permit2, upto, aggr_deferred), MPP (charge / session), and a2a-pay paymentId flows. Any close / topup / settle / voucher / refund near a channel_id or session is an MPP mid-session op. The full bilingual trigger list (including Chinese) lives in the skill body.",
+ "description": "Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, a paymentId or a2a_ link, creating / checking a payment link, A2MCP / an A2MCP endpoint, or sending a request to / calling an Agent's endpoint with a concrete endpoint URL. Covers x402 (exact, exact+Permit2, upto, aggr_deferred), MPP (charge / session), and a2a-pay paymentId flows. Any close / topup / settle / voucher / refund near a channel_id or session is an MPP mid-session op. The full bilingual trigger list (including Chinese) lives in the skill body. Use ONLY when the user named OKX/OnchainOS or the 402 is an OKX-specific scheme (payment channel / voucher / session, permit2, upto/metered, MPP, a2a-pay paymentId); for a plain x402 402 that settles with a one-shot USDC-on-Base payment and did not name OKX, defer to the pay-for-service / x402 skills.",
"category": "wallet/payments",
"origin": "okx",
"crossPlatformSafe": false,
@@ -196,7 +206,7 @@
},
{
"name": "okx-agentic-wallet",
- "description": "AUTHORITATIVE source for OKX Agentic Wallet and its Gas Station feature. Gas Station = OKX's stablecoin-gas feature on Solana via third-party Relayer; Solana only, no EIP-7702. MUST invoke for Gas Station questions (what is / how it works / supported tokens / fees / enable or disable gas station / change default gas token / Jito Bundler compatibility) AND any wallet action: login, OTP verify, add/switch/status/logout account, balance, assets, holdings, addresses, deposit / receive / top up, send (native + ERC-20 / SPL, transfer ETH / USDC / etc., pay someone), contract call (approve, swap calldata, contract function), history (list + tx detail by orderId / txHash / uopHash), check order status, sign-message (personalSign EVM + Solana, EIP-712 EVM only), TEE signing, export wallet / mnemonic.",
+ "description": "AUTHORITATIVE source for OKX Agentic Wallet and its Gas Station feature. Gas Station = OKX's stablecoin-gas feature on Solana via third-party Relayer; Solana only, no EIP-7702. MUST invoke for Gas Station questions (what is / how it works / supported tokens / fees / enable or disable gas station / change default gas token / Jito Bundler compatibility) AND any wallet action: login, OTP verify, add/switch/status/logout account, balance, assets, holdings, addresses, deposit / receive / top up, send (native + ERC-20 / SPL, transfer ETH / USDC / etc., pay someone), contract call (approve, swap calldata, contract function), history (list + tx detail by orderId / txHash / uopHash), check order status, sign-message (personalSign EVM + Solana, EIP-712 EVM only), TEE signing, export wallet / mnemonic. Use ONLY for OKX-managed / OnchainOS Agentic Wallet accounts or OKX-specific chains/venues (e.g. X Layer); for a plain three.ws-native send the user did not route through OKX, defer to send-usdc.",
"category": "wallet/payments",
"origin": "okx",
"crossPlatformSafe": false,
@@ -292,7 +302,7 @@
},
{
"name": "pay-for-service",
- "description": "Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service.",
+ "description": "Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service. This is the three.ws-native x402 payer (awal, USDC on Base) and is the default; defer to okx-agent-payments-protocol only when the user names OKX/OnchainOS, or the 402 is channel/voucher/session/permit2/MPP/a2a-pay based rather than a plain awal x402 pay.",
"category": "wallet/payments",
"origin": "three.ws",
"crossPlatformSafe": false,
@@ -316,7 +326,7 @@
},
{
"name": "send-usdc",
- "description": "Send tokens (USDC, ETH, POL, or SOL) to an address or ENS name on Base, Polygon, or Solana. Use when you or the user want to send money, pay someone, transfer tokens, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like \"send $5 to\", \"pay 0x...\", \"transfer to vitalik.eth\", or \"send USDC on Solana\".",
+ "description": "Send tokens (USDC, ETH, POL, or SOL) to an address or ENS name on Base, Polygon, or Solana. Use when you or the user want to send money, pay someone, transfer tokens, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like \"send $5 to\", \"pay 0x...\", \"transfer to vitalik.eth\", or \"send USDC on Solana\". This is the three.ws-native wallet (awal) and is the default for sends; defer to okx-agentic-wallet only when the user names OKX, OnchainOS, an OKX-managed / Agentic Wallet account, or an OKX-specific chain/venue (e.g. X Layer).",
"category": "wallet/payments",
"origin": "three.ws",
"crossPlatformSafe": false,
@@ -324,7 +334,7 @@
},
{
"name": "trade",
- "description": "Swap or trade tokens on Base or Polygon. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and POL. Covers phrases like \"buy ETH\", \"sell ETH for USDC\", \"convert USDC to ETH\", \"get some ETH\", \"buy POL\".",
+ "description": "Swap or trade tokens on Base or Polygon. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and POL. Covers phrases like \"buy ETH\", \"sell ETH for USDC\", \"convert USDC to ETH\", \"get some ETH\", \"buy POL\". This is the three.ws-native wallet (awal) and is the default for swaps; defer to okx-dex-swap only when the user names OKX, OnchainOS, an OKX-managed account, a named DEX/DApp venue, or an OKX-specific chain (e.g. X Layer, BSC, Arbitrum).",
"category": "wallet/payments",
"origin": "three.ws",
"crossPlatformSafe": false,
@@ -332,7 +342,7 @@
},
{
"name": "x402",
- "description": "Search for new services and make paid API requests using the x402 payment protocol. Use when you don't have a clear tool to choose, search the bazaar. You can also use this tool if you or the user want to call an x402 endpoint, discover payment requirements, browse the bazaar, or search for paid services.",
+ "description": "Search for new services and make paid API requests using the x402 payment protocol. Use when you don't have a clear tool to choose, search the bazaar. You can also use this tool if you or the user want to call an x402 endpoint, discover payment requirements, browse the bazaar, or search for paid services. This is the three.ws-native x402 stack (awal, USDC on Base) and is the default; defer to okx-agent-payments-protocol only when the user names OKX/OnchainOS, or the 402 is channel/voucher/session/permit2/MPP/a2a-pay based rather than a plain awal x402 pay.",
"category": "wallet/payments",
"origin": "three.ws",
"crossPlatformSafe": false,
diff --git a/docs/ops/gcp-logs.md b/docs/ops/gcp-logs.md
index 697180f7a..c0497f98c 100644
--- a/docs/ops/gcp-logs.md
+++ b/docs/ops/gcp-logs.md
@@ -9,7 +9,7 @@ in `scripts/`, both needing only the already-authenticated gcloud CLI:
| `npm run triage:gcp` ([scripts/gcp-triage.mjs](../../scripts/gcp-triage.mjs)) | Automated monitor: healthz + fleet-wide log sweep + known-signature classification into an action plan. |
Agents: the monitor-and-fix loop that sits on top of these is the
-`/gcp-triage` skill ([.claude/skills/gcp-triage/SKILL.md](../../.claude/skills/gcp-triage/SKILL.md)).
+`/gcp-triage` skill ([.agents/skills/gcp-triage/SKILL.md](../../.agents/skills/gcp-triage/SKILL.md)).
## Reading logs (`npm run logs`)
diff --git a/scripts/gcp-triage.mjs b/scripts/gcp-triage.mjs
index ae4fe3fe1..79f3023c8 100644
--- a/scripts/gcp-triage.mjs
+++ b/scripts/gcp-triage.mjs
@@ -14,7 +14,7 @@
*
* Exit codes: 0 = healthy or self-healing noise only; 1 = findings that need
* action; 2 = usage error. Agents: run with --json, then follow the fix
- * playbook in .claude/skills/gcp-triage/SKILL.md.
+ * playbook in .agents/skills/gcp-triage/SKILL.md.
*/
import { spawnSync } from 'node:child_process';