[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GQASTCY532GD5YEZX8VRTA":3,"skill-same:01M6GQASTCY532GD5YEZX8VRTA":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M6GQASTCY532GD5YEZX8VRTA","Solidity",null,"Avoid common Solidity mistakes — reentrancy, gas traps, storage collisions, and security pitfalls.","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fsolidity\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29],"solidity","linux","security","storage","win32","reentrancy","common","gas","pitfalls","darwin","mistakes","2026-11-10 10:12:30",false,"---\nname: Solidity\ndescription: Avoid common Solidity mistakes — reentrancy, gas traps, storage collisions, and security pitfalls.\nmetadata: {\"clawdbot\":{\"emoji\":\"⟠\",\"os\":[\"linux\",\"darwin\",\"win32\"]}}\n---\n\n## Reentrancy\n- External calls before state updates — attacker can re-enter before state changes\n- Checks-Effects-Interactions pattern — validate, update state, THEN external call\n- `ReentrancyGuard` from OpenZeppelin — use `nonReentrant` modifier on vulnerable functions\n- `transfer()` and `send()` have 2300 gas limit — but don't rely on this for security\n\n## Integer Handling\n- Solidity 0.8+ reverts on overflow — but `unchecked {}` blocks bypass this\n- Division truncates toward zero — `5 \u002F 2 = 2`, no decimals\n- Use fixed-point math for precision — multiply before divide, or use libraries\n- `type(uint256).max` for max value — don't hardcode large numbers\n\n## Gas Gotchas\n- Unbounded loops can exceed block gas limit — paginate or limit iterations\n- Storage writes cost 20k gas — memory\u002Fcalldata much cheaper\n- `delete` refunds gas but has limits — refund capped, don't rely on it\n- Reading storage in loop — cache in memory variable first\n\n## Visibility and Access\n- State variables default to `internal` — not `private`, derived contracts see them\n- `private` doesn't mean hidden — all blockchain data is public, just not accessible from other contracts\n- `tx.origin` is original sender — use `msg.sender`, `tx.origin` enables phishing attacks\n- `external` can't be called internally — use `public` or `this.func()` (wastes gas)\n\n## Ether Handling\n- `payable` required to receive ether — non-payable functions reject ether\n- `selfdestruct` sends ether bypassing fallback — contract can receive ether without receive function\n- Check return value of `send()` — returns false on failure, doesn't revert\n- `call{value: x}(\"\")` preferred over `transfer()` — forward all gas, check return value\n\n## Storage vs Memory\n- `storage` persists, `memory` is temporary — storage costs gas, memory doesn't persist\n- Structs\u002Farrays parameter default to `memory` — explicit `storage` to modify state\n- `calldata` for external function inputs — read-only, cheaper than memory\n- Storage layout matters for upgrades — never reorder or remove storage variables\n\n## Upgradeable Contracts\n- Constructors don't run in proxies — use `initialize()` with `initializer` modifier\n- Storage collision between proxy and impl — use EIP-1967 storage slots\n- Never `selfdestruct` implementation — breaks all proxies pointing to it\n- `delegatecall` uses caller's storage — impl contract storage layout must match proxy\n\n## Common Mistakes\n- Block timestamp can be manipulated slightly — don't use for randomness or precise timing\n- `require` for user errors, `assert` for invariants — assert failures indicate bugs\n- String comparison with `==` doesn't work — use `keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))`\n- Events not indexed — first 3 params can be `indexed` for efficient filtering\n","## Reentrancy\n- External calls before state updates — attacker can re-enter before state changes\n- Checks-Effects-Interactions pattern — validate, update state, THEN external call\n- `ReentrancyGuard` from OpenZeppelin — use `nonReentrant` modifier on vulnerable functions\n- `transfer()` and `send()` have 2300 gas limit — but don't rely on this for security\n\n## Integer Handling\n- Solidity 0.8+ reverts on overflow — but `unchecked {}` blocks bypass this\n- Division truncates toward zero — `5 \u002F 2 = 2`, no decimals\n- Use fixed-point math for precision — multiply before divide, or use libraries\n- `type(uint256).max` for max value — don't hardcode large numbers\n\n## Gas Gotchas\n- Unbounded loops can exceed block gas limit — paginate or limit iterations\n- Storage writes cost 20k gas — memory\u002Fcalldata much cheaper\n- `delete` refunds gas but has limits — refund capped, don't rely on it\n- Reading storage in loop — cache in memory variable first\n\n## Visibility and Access\n- State variables default to `internal` — not `private`, derived contracts see them\n- `private` doesn't mean hidden — all blockchain data is public, just not accessible from other contracts\n- `tx.origin` is original sender — use `msg.sender`, `tx.origin` enables phishing attacks\n- `external` can't be called internally — use `public` or `this.func()` (wastes gas)\n\n## Ether Handling\n- `payable` required to receive ether — non-payable functions reject ether\n- `selfdestruct` sends ether bypassing fallback — contract can receive ether without receive function\n- Check return value of `send()` — returns false on failure, doesn't revert\n- `call{value: x}(\"\")` preferred over `transfer()` — forward all gas, check return value\n\n## Storage vs Memory\n- `storage` persists, `memory` is temporary — storage costs gas, memory doesn't persist\n- Structs\u002Farrays parameter default to `memory` — explicit `storage` to modify state\n- `calldata` for external function inputs — read-only, cheaper than memory\n- Storage layout matters for upgrades — never reorder or remove storage variables\n\n## Upgradeable Contracts\n- Constructors don't run in proxies — use `initialize()` with `initializer` modifier\n- Storage collision between proxy and impl — use EIP-1967 storage slots\n- Never `selfdestruct` implementation — breaks all proxies pointing to it\n- `delegatecall` uses caller's storage — impl contract storage layout must match proxy\n\n## Common Mistakes\n- Block timestamp can be manipulated slightly — don't use for randomness or precise timing\n- `require` for user errors, `assert` for invariants — assert failures indicate bugs\n- String comparison with `==` doesn't work — use `keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))`\n- Events not indexed — first 3 params can be `indexed` for efficient filtering\n",{"name":5,"metadata":35,"description":7},{"clawdbot":36},{"os":37,"emoji":38},[20,28,23],"⟠","main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fchains\u002Fsolidity",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-12 02:28:42",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill Solidity",{"tool":54,"command":55},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill Solidity",{"tool":57,"command":58},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill Solidity","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fsolidity\u002FSKILL.md",true,[62,68,72,76],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"_meta.json","REFERENCE","参考文档",127,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fsolidity\u002F_meta.json",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"skill-card.md",1712,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fsolidity\u002Fskill-card.md",{"path":73,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":74,"sourceHtmlUrl":75},"SOURCE.md",246,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fsolidity\u002FSOURCE.md",{"path":77,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":78,"sourceHtmlUrl":79},"TRUST.auto.yaml",2201,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fsolidity\u002FTRUST.auto.yaml",[81,110,133,151,164,174],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":30},"01M712C436EQYE43342Q4E7GG1","recipe-performance","Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold\u002Fwarm\u002Fbackground-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout\u002Fpaint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fwallets\u002Fmetamask-official-recipe-performance\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fwallets\u002Fmetamask-official-recipe-performance\u002FSKILL.md",[],[90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],"performance","recipe performance","recipe","mm","sentry","harness","app","deterministic","recipes","flow","cold","critical","analysis","tasks","react","browser","layout","screen","network","metamask",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":30},"01M70XT2F8A5CQZ81JBP98KSW3","mexc-spot-websocket","MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-websocket\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-websocket\u002FSKILL.md",[],[119,120,121,122,123,124,125,126,127,128,129,130,131,132],"mexc spot websocket","spot","websocket","api","workflows","public","listen","streams","depth","keys","for","api keys","maintenance","protobuf",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":137,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":30},"01M70XT0MBXN3WZY1BKN0CPNKR","mexc-spot-rest","MEXC Spot REST workflows for public data, signed account requests, orders, wallet\u002Fadmin actions, and secure signing without exposing API keys.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-rest\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-rest\u002FSKILL.md",[],[141,120,142,143,144,145,146,130,129,128,147,148,149,124,150,123,122],"mexc spot rest","REST","admin","signing","Wallet","requests","actions","secure","data","orders",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":155,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":30},"01M70XSYSVZ2N0N91XCAR2CAK0","mexc-futures-websocket","MEXC Futures WebSocket workflows for public streams, private account\u002Forder\u002Fposition streams, ping\u002Fpong, subscriptions, and depth maintenance.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-futures-websocket\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-futures-websocket\u002FSKILL.md",[],[159,160,121,161,162,131,129,163,127,126,124,123],"mexc futures websocket","futures","position","ping","subscriptions",{"skillNo":165,"name":166,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":167,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":30},"01M6H0ZWHVE5W04WG2DKQE2SQC","0xklen-version-and-refresh-sanctions-lists","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-version-and-refresh-sanctions-lists\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-version-and-refresh-sanctions-lists\u002FSKILL.md",[],[171,172,173],"refresh","0xklen version and refresh sanctions lists","version",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":178,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":30},"01M6H0Z28Q3R8J0S799GJQWXM3","verify-tests-cover-changed-lines","Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-verify-tests-cover-changed-lines\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-verify-tests-cover-changed-lines\u002FSKILL.md",[],[182,183,184,185,186,187,188,189,190,191,192],"tests","cover","verify tests cover changed lines","verify","coverage","pr","exercise","use","patch","code","share"]