[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M783GTB4HQZBTH2QCMWH9Z4M":3,"skill-same:01M783GTB4HQZBTH2QCMWH9Z4M":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M783GTB4HQZBTH2QCMWH9Z4M","pre-trade-check",null,"Measure before you commit a trade: gas row, swap_quote lines (rate, spender, cross-check, value), price impact by a half-size quote, the exit quote, the token screen, and slippage by asset class. Lists what the swap verb already refuses.","theselfruleorg\u002Fpolyrob","theselfruleorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128891129?v=4","01M783D1MFDP1D5ZXSNZMKHARH","01M783D1NEE9ATD39KJYCRR09J",12,"MIT","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fdata\u002Fprompts\u002Fskills\u002Fpre-trade-check\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pre-trade-check\ndescription: 'Measure before you commit a trade: gas row, swap_quote lines (rate, spender, cross-check, value), price impact by a half-size quote, the exit quote, the token screen, and slippage by asset class. Lists what the swap verb already refuses.'\nlicense: MIT\nmetadata:\n  polyrob-when: 'Measuring a trade before you send it'\n  polyrob-priority: '2'\n  polyrob-triggers: '{\"tool_ids\":[\"defi_trade\",\"defi_data\"]}'\n  polyrob-requires: '[\"token-identity\"]'\n  polyrob-version: '4'\n---\n# Pre-Trade Check — measure before you commit\n\nRun this after `token-identity` and before any `defi_trade.swap` with\n`dry_run=false`. Every figure below comes from a verb you can call now; write\neach one down, because the post-trade check compares against them.\n\n## What the code already enforces\n\n- `swap` refuses a quote older than 30 s (\"the quote is stale\").\n- `swap` refuses when the route price DISAGREES with an independent price by more\n  than `DEFI_ROUTE_DRIFT_MAX_PCT` — a thin or seeded pool extracts value that way.\n- `swap` bounds every fill by `slippage_bps` (default `DEFI_MAX_SLIPPAGE_BPS`) and\n  the guard ASSERTS the simulated receipt of `token_out` is at least that floor.\n- An unverified `token_out` above $5 with a route check that did not AGREE is\n  refused, and so is any unpinned Solana buy above $5 (see `token-identity`).\n\nWhat the code does NOT measure is price impact: there is no price-impact field\non `swap_quote` or `swap` yet. You measure it with a second quote (step 3).\n\n## The procedure\n\n1. **Balances first.** `defi_data.portfolio(chain=…)`. Read the native-coin row (`ETH …`, `SOL …`):\n   a number, `UNKNOWN` (the read failed — not zero), or `EMPTY` (a real zero —\n   you cannot pay for the swap or for the exit). Reserve native gas for the\n   WHOLE round trip before you size anything: an ERC-20 entry is approve + swap\n   + revoke, and so is the exit — up to six transactions. A native-in entry\n   saves the entry approve and revoke, never the exit's.\n2. **Quote at your size.** `defi_data.swap_quote(chain=…, token_in=…,\n   token_out=…, amount_in=…)`. Read four lines:\n   - `rate:` and `route:`;\n   - `spender:` — this is what `approve_token` must authorise, NOT the token;\n   - `cross-check:` — `consistent`, `unavailable`, or `⚠ SUSPECT QUOTE` (then\n     re-quote and never use that number as a floor);\n   - `value:` — `unknown` means no indexed price with real liquidity. Do not\n     substitute a remembered rate.\n3. **Measure how fast the price worsens with size.** Quote again at HALF the\n   size. The gap between the full-size and the half-size rate is the\n   INCREMENTAL deterioration of the second half — a lower bound on your price\n   impact, not the total. If even that gap is above your class limit, cut the\n   size: stable↔stable 0.1%, majors 0.5%, long tail 2%. If it is close to the\n   limit, assume the real impact is about double and cut anyway.\n4. **Quote the exit now.** Quote the reverse direction (`token_out` back to the\n   quote asset) at the size you would receive. If the exit has no route, or a\n   far worse rate, you are buying something you may not be able to sell.\n5. **Screen what you buy.** `defi_data.token_info` — honeypot and sell tax, and\n   the check count. A `PARTIAL` or `UNSCREENED` screen is not clean. For a fresh\n   token also read `token_holders` (concentration) and `ohlcv` (the shape of the\n   last day, not a single 24h figure). Both `price` and `ohlcv` are POOL data —\n   `price` comes from the deepest priced pool, `ohlcv` names the one pool it\n   read. Neither is an independent oracle; a seeded pool can move both.\n6. **Set slippage from the asset class**, never unbounded: stables 5–10 bps,\n   majors 30–50 bps, long tail 100–300 bps. Pass it as `slippage_bps`.\n7. **Decide the ticket** with `sizing-and-risk`, and the exit with `exits`,\n   BEFORE you execute. An entry without a declared exit is not ready.\n\nWhat each chain can do (money or read-only, its gas asset): `references\u002Fchains.md`.\n\n## Reading a route\n\nSwaps try Uniswap V3 first where it exists, then a DEX aggregator that reaches\nthe other venues (Aerodrome, the V2 forks, V4 and the rest). A pool being off-V3\nis not a reason a token is unbuyable: quote it. `swap_quote` asks the SAME\nproviders `swap` will, so a clean quote means a reachable trade.\n\n- **A route refusal is still a stop.** Do not improvise a raw contract call.\n- **The refusal names one of two facts.** \"no route … asked: …\" means nothing\n  pools it — a real finding. \"could not complete the route lookup …\n  UNAVAILABLE\" means a provider errored or rate-limited; the lookup did not\n  finish. Never write \"this token is unreachable\" from the second one; retry it.\n- **NO ROUTE on a held position is that token's fact, not a stop.** A rugged or\n  illiquid token returns NO ROUTE on every venue. On a real re-quote, record its\n  value as UNKNOWN with the date (not $0 — a failed lookup is not proof it is\n  worthless), re-quote it at most once a day, stop escalating it, and keep taking\n  new screened entries within the caps. Never pause every entry until each\n  position has an exit route.\n\n## Refuse the trade yourself when\n\n- any figure you need came back unknown and you would be guessing to fill it;\n- the cross-check says `SUSPECT QUOTE` twice;\n- the exit quote has no route;\n- the native-coin row is `EMPTY` or `UNKNOWN`.\n\n## If a tool is missing\n\nFollow `harness-manual`; do the read steps you can, and never work around a\nmissing verb with a raw `call`, a browser dapp or another agent.\n\n## Related\n\n`token-identity`, `trade-execution`, `sizing-and-risk`, `exits`.\n","# Pre-Trade Check — measure before you commit\n\nRun this after `token-identity` and before any `defi_trade.swap` with\n`dry_run=false`. Every figure below comes from a verb you can call now; write\neach one down, because the post-trade check compares against them.\n\n## What the code already enforces\n\n- `swap` refuses a quote older than 30 s (\"the quote is stale\").\n- `swap` refuses when the route price DISAGREES with an independent price by more\n  than `DEFI_ROUTE_DRIFT_MAX_PCT` — a thin or seeded pool extracts value that way.\n- `swap` bounds every fill by `slippage_bps` (default `DEFI_MAX_SLIPPAGE_BPS`) and\n  the guard ASSERTS the simulated receipt of `token_out` is at least that floor.\n- An unverified `token_out` above $5 with a route check that did not AGREE is\n  refused, and so is any unpinned Solana buy above $5 (see `token-identity`).\n\nWhat the code does NOT measure is price impact: there is no price-impact field\non `swap_quote` or `swap` yet. You measure it with a second quote (step 3).\n\n## The procedure\n\n1. **Balances first.** `defi_data.portfolio(chain=…)`. Read the native-coin row (`ETH …`, `SOL …`):\n   a number, `UNKNOWN` (the read failed — not zero), or `EMPTY` (a real zero —\n   you cannot pay for the swap or for the exit). Reserve native gas for the\n   WHOLE round trip before you size anything: an ERC-20 entry is approve + swap\n   + revoke, and so is the exit — up to six transactions. A native-in entry\n   saves the entry approve and revoke, never the exit's.\n2. **Quote at your size.** `defi_data.swap_quote(chain=…, token_in=…,\n   token_out=…, amount_in=…)`. Read four lines:\n   - `rate:` and `route:`;\n   - `spender:` — this is what `approve_token` must authorise, NOT the token;\n   - `cross-check:` — `consistent`, `unavailable`, or `⚠ SUSPECT QUOTE` (then\n     re-quote and never use that number as a floor);\n   - `value:` — `unknown` means no indexed price with real liquidity. Do not\n     substitute a remembered rate.\n3. **Measure how fast the price worsens with size.** Quote again at HALF the\n   size. The gap between the full-size and the half-size rate is the\n   INCREMENTAL deterioration of the second half — a lower bound on your price\n   impact, not the total. If even that gap is above your class limit, cut the\n   size: stable↔stable 0.1%, majors 0.5%, long tail 2%. If it is close to the\n   limit, assume the real impact is about double and cut anyway.\n4. **Quote the exit now.** Quote the reverse direction (`token_out` back to the\n   quote asset) at the size you would receive. If the exit has no route, or a\n   far worse rate, you are buying something you may not be able to sell.\n5. **Screen what you buy.** `defi_data.token_info` — honeypot and sell tax, and\n   the check count. A `PARTIAL` or `UNSCREENED` screen is not clean. For a fresh\n   token also read `token_holders` (concentration) and `ohlcv` (the shape of the\n   last day, not a single 24h figure). Both `price` and `ohlcv` are POOL data —\n   `price` comes from the deepest priced pool, `ohlcv` names the one pool it\n   read. Neither is an independent oracle; a seeded pool can move both.\n6. **Set slippage from the asset class**, never unbounded: stables 5–10 bps,\n   majors 30–50 bps, long tail 100–300 bps. Pass it as `slippage_bps`.\n7. **Decide the ticket** with `sizing-and-risk`, and the exit with `exits`,\n   BEFORE you execute. An entry without a declared exit is not ready.\n\nWhat each chain can do (money or read-only, its gas asset): `references\u002Fchains.md`.\n\n## Reading a route\n\nSwaps try Uniswap V3 first where it exists, then a DEX aggregator that reaches\nthe other venues (Aerodrome, the V2 forks, V4 and the rest). A pool being off-V3\nis not a reason a token is unbuyable: quote it. `swap_quote` asks the SAME\nproviders `swap` will, so a clean quote means a reachable trade.\n\n- **A route refusal is still a stop.** Do not improvise a raw contract call.\n- **The refusal names one of two facts.** \"no route … asked: …\" means nothing\n  pools it — a real finding. \"could not complete the route lookup …\n  UNAVAILABLE\" means a provider errored or rate-limited; the lookup did not\n  finish. Never write \"this token is unreachable\" from the second one; retry it.\n- **NO ROUTE on a held position is that token's fact, not a stop.** A rugged or\n  illiquid token returns NO ROUTE on every venue. On a real re-quote, record its\n  value as UNKNOWN with the date (not $0 — a failed lookup is not proof it is\n  worthless), re-quote it at most once a day, stop escalating it, and keep taking\n  new screened entries within the caps. Never pause every entry until each\n  position has an exit route.\n\n## Refuse the trade yourself when\n\n- any figure you need came back unknown and you would be guessing to fill it;\n- the cross-check says `SUSPECT QUOTE` twice;\n- the exit quote has no route;\n- the native-coin row is `EMPTY` or `UNKNOWN`.\n\n## If a tool is missing\n\nFollow `harness-manual`; do the read steps you can, and never work around a\nmissing verb with a raw `call`, a browser dapp or another agent.\n\n## Related\n\n`token-identity`, `trade-execution`, `sizing-and-risk`, `exits`.\n",{"name":5,"license":14,"metadata":23,"description":7},{"polyrob-when":24,"polyrob-version":25,"polyrob-priority":26,"polyrob-requires":27,"polyrob-triggers":28},"Measuring a trade before you send it","4","2","[\"token-identity\"]","{\"tool_ids\":[\"defi_trade\",\"defi_data\"]}","main","3a595c0e3db5aa91acc53dd80673c4d80e0721d1","data\u002Fprompts\u002Fskills\u002Fpre-trade-check",2,"https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg","https:\u002F\u002Ftheselfrule.org","2026-11-14 16:54:43",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add theselfruleorg\u002Fpolyrob --skill pre-trade-check",{"tool":43,"command":44},"bunx","bunx skills add theselfruleorg\u002Fpolyrob --skill pre-trade-check",{"tool":46,"command":47},"pnpm","pnpm dlx skills add theselfruleorg\u002Fpolyrob --skill pre-trade-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fdata\u002Fprompts\u002Fskills\u002Fpre-trade-check\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fchains.md","REFERENCE","参考文档",1991,"https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fdata\u002Fprompts\u002Fskills\u002Fpre-trade-check\u002Freferences\u002Fchains.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M783NSEPG1S13E7W3GEQMG6J","echo-basics","How to use the echo tool from the echo fixture pack.","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fpacks\u002Fecho\u002Fpolyrob_echo\u002Fskills\u002Fecho-basics\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M783NM911CND5PQCYDHA9GGV","x-engagement","Operate X account communication on the API rail (the captured-browser rail only where the owner chose it)—read inboxes, post\u002Freply, send DMs, set up the account, with the real write gates and completion evidence","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fpacks\u002Fx\u002Fpolyrob_x\u002Fskills\u002Fx-engagement\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M783NGQ43PGVT6F9XQR4ZNP2","social-discovery","Discover public X\u002Fsocial accounts and conversations with AnySite first (anysite_describe, then anysite_api), using native X account reads where they are authoritative and preserving write gates","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fpacks\u002Fx\u002Fpolyrob_x\u002Fskills\u002Fsocial-discovery\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M783NDAEPJT10SD3DNR56H96","polymarket-trading","GATED: place\u002Fcancel Polymarket orders. Owner-only, read-first, >$500 confirmation gate; references crypto-trading-safety","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fpacks\u002Fmarkets\u002Fpolyrob_markets\u002Fskills\u002Fpolymarket-trading\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M783N8GADTQMKKBQT4Z3JJ84","polymarket-portfolio-review","Read the configured Polymarket account's positions and trade history from the public Data API (no address parameter); summarize exposure and P&L","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fpacks\u002Fmarkets\u002Fpolyrob_markets\u002Fskills\u002Fpolymarket-portfolio-review\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M783N5KTTTRRRSM7XY8SY4NF","polymarket-market-research","Read Polymarket markets (discover, details, price as implied probability, orderbook, spread, volume) with no wallet","https:\u002F\u002Fgithub.com\u002Ftheselfruleorg\u002Fpolyrob\u002Fblob\u002Fmain\u002Fpacks\u002Fmarkets\u002Fpolyrob_markets\u002Fskills\u002Fpolymarket-market-research\u002FSKILL.md",[],[]]