[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C732DF3WRCRA8R2QJ1Q4D7":3,"skill-same:01M7C732DF3WRCRA8R2QJ1Q4D7":47},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7C732DF3WRCRA8R2QJ1Q4D7","erc-721",null,"Add an ERC-721 NFT contract to a Scaffold-ETH 2 project. Use when the user wants to: create an NFT collection, deploy an ERC-721, add NFT minting, build an NFT gallery or transfer UI, or work with non-fungible tokens in SE-2.","austintgriffith\u002Fpicowallet","austintgriffith","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2653167?v=4","01M7C72GPV281RWV90R8G7X2T5","Austin Griffith","01M7C72GQBJAE8DMGQTM0JZYY6",35,"MIT","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Ferc-721\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: erc-721\ndescription: \"Add an ERC-721 NFT contract to a Scaffold-ETH 2 project. Use when the user wants to: create an NFT collection, deploy an ERC-721, add NFT minting, build an NFT gallery or transfer UI, or work with non-fungible tokens in SE-2.\"\n---\n\n# ERC-721 NFT Integration for Scaffold-ETH 2\n\n## Prerequisites\n\nCheck if `.\u002Fpackages\u002Fnextjs\u002Fscaffold.config.ts` exists directly in the current working directory (do not search subdirectories). If it doesn't exist, this is not a Scaffold-ETH 2 project. Follow the instructions at https:\u002F\u002Fdocs.scaffoldeth.io\u002FSKILL.md to scaffold it first. If it exists, continue directly with building.\n\nAlso read `.agents\u002Fskills\u002Fopenzeppelin\u002FSKILL.md` since ERC-721 contracts use OpenZeppelin, and that skill has critical guidance on reading the installed source for correct import syntax, override points, and constructor patterns.\n\n## Gotchas\n\nKey pitfalls and gotchas to watch for when working with ERC-721.\n\n### 1. `_safeMint` Reentrancy\n\n`_safeMint` and `safeTransferFrom` invoke `onERC721Received()` on the recipient if it's a contract. This is an external call **after** the token has been minted, creating a reentrancy vector.\n\n**Real exploit (HypeBears, Feb 2022):** State updated after `_safeMint` allowed attacker to re-enter and bypass per-address minting limits.\n\n```solidity\n\u002F\u002F VULNERABLE: state update after _safeMint\nfunction mintNFT() public {\n    require(!addressMinted[msg.sender], \"Already minted\");\n    _safeMint(msg.sender, tokenId);\n    addressMinted[msg.sender] = true;  \u002F\u002F too late\n}\n\n\u002F\u002F SAFE: state update before _safeMint\nfunction mintNFT() public {\n    require(!addressMinted[msg.sender], \"Already minted\");\n    addressMinted[msg.sender] = true;  \u002F\u002F update first\n    _safeMint(msg.sender, tokenId);\n}\n```\n\n### 2. On-Chain SVG Stack-Too-Deep\n\nWhen generating SVG on-chain, the `tokenURI` or `generateSVG` function easily hits Solidity's 16-local-variable stack limit. Split SVG generation into multiple helper functions (e.g., `_svgBackground`, `_svgShapes`, `_svgText`) rather than building the entire SVG in one function.\n\n### 3. Marketplace Metadata `attributes` Array\n\nThe `attributes` array in NFT metadata JSON is not in the ERC-721 EIP but is the de facto standard used by OpenSea, Blur, and every marketplace. Without it, traits won't display:\n\n```json\n{\n  \"name\": \"My NFT #1\",\n  \"description\": \"...\",\n  \"image\": \"data:image\u002Fsvg+xml;base64,...\",\n  \"attributes\": [\n    { \"trait_type\": \"Color\", \"value\": \"Blue\" },\n    { \"trait_type\": \"Rarity\", \"value\": \"Rare\" }\n  ]\n}\n```\n\n### 4. Required Overrides with ERC721Enumerable\n\nWhen combining `ERC721` + `ERC721Enumerable`, both define `_update` and `_increaseBalance`. You must explicitly override them or the contract won't compile:\n\n```solidity\nfunction _update(address to, uint256 tokenId, address auth) internal override(ERC721, ERC721Enumerable) returns (address) {\n    return super._update(to, tokenId, auth);\n}\n\nfunction _increaseBalance(address account, uint128 amount) internal override(ERC721, ERC721Enumerable) {\n    super._increaseBalance(account, amount);\n}\n\nfunction supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {\n    return super.supportsInterface(interfaceId);\n}\n```\n\n### 5. IPFS Base URI Trailing Slash\n\nOpenZeppelin's `tokenURI()` concatenates `_baseURI() + tokenId.toString()`. If the base URI is `ipfs:\u002F\u002FQmCID` without a trailing slash, token 42 becomes `ipfs:\u002F\u002FQmCID42` instead of `ipfs:\u002F\u002FQmCID\u002F42`.\n","# ERC-721 NFT Integration for Scaffold-ETH 2\n\n## Prerequisites\n\nCheck if `.\u002Fpackages\u002Fnextjs\u002Fscaffold.config.ts` exists directly in the current working directory (do not search subdirectories). If it doesn't exist, this is not a Scaffold-ETH 2 project. Follow the instructions at https:\u002F\u002Fdocs.scaffoldeth.io\u002FSKILL.md to scaffold it first. If it exists, continue directly with building.\n\nAlso read `.agents\u002Fskills\u002Fopenzeppelin\u002FSKILL.md` since ERC-721 contracts use OpenZeppelin, and that skill has critical guidance on reading the installed source for correct import syntax, override points, and constructor patterns.\n\n## Gotchas\n\nKey pitfalls and gotchas to watch for when working with ERC-721.\n\n### 1. `_safeMint` Reentrancy\n\n`_safeMint` and `safeTransferFrom` invoke `onERC721Received()` on the recipient if it's a contract. This is an external call **after** the token has been minted, creating a reentrancy vector.\n\n**Real exploit (HypeBears, Feb 2022):** State updated after `_safeMint` allowed attacker to re-enter and bypass per-address minting limits.\n\n```solidity\n\u002F\u002F VULNERABLE: state update after _safeMint\nfunction mintNFT() public {\n    require(!addressMinted[msg.sender], \"Already minted\");\n    _safeMint(msg.sender, tokenId);\n    addressMinted[msg.sender] = true;  \u002F\u002F too late\n}\n\n\u002F\u002F SAFE: state update before _safeMint\nfunction mintNFT() public {\n    require(!addressMinted[msg.sender], \"Already minted\");\n    addressMinted[msg.sender] = true;  \u002F\u002F update first\n    _safeMint(msg.sender, tokenId);\n}\n```\n\n### 2. On-Chain SVG Stack-Too-Deep\n\nWhen generating SVG on-chain, the `tokenURI` or `generateSVG` function easily hits Solidity's 16-local-variable stack limit. Split SVG generation into multiple helper functions (e.g., `_svgBackground`, `_svgShapes`, `_svgText`) rather than building the entire SVG in one function.\n\n### 3. Marketplace Metadata `attributes` Array\n\nThe `attributes` array in NFT metadata JSON is not in the ERC-721 EIP but is the de facto standard used by OpenSea, Blur, and every marketplace. Without it, traits won't display:\n\n```json\n{\n  \"name\": \"My NFT #1\",\n  \"description\": \"...\",\n  \"image\": \"data:image\u002Fsvg+xml;base64,...\",\n  \"attributes\": [\n    { \"trait_type\": \"Color\", \"value\": \"Blue\" },\n    { \"trait_type\": \"Rarity\", \"value\": \"Rare\" }\n  ]\n}\n```\n\n### 4. Required Overrides with ERC721Enumerable\n\nWhen combining `ERC721` + `ERC721Enumerable`, both define `_update` and `_increaseBalance`. You must explicitly override them or the contract won't compile:\n\n```solidity\nfunction _update(address to, uint256 tokenId, address auth) internal override(ERC721, ERC721Enumerable) returns (address) {\n    return super._update(to, tokenId, auth);\n}\n\nfunction _increaseBalance(address account, uint128 amount) internal override(ERC721, ERC721Enumerable) {\n    super._increaseBalance(account, amount);\n}\n\nfunction supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {\n    return super.supportsInterface(interfaceId);\n}\n```\n\n### 5. IPFS Base URI Trailing Slash\n\nOpenZeppelin's `tokenURI()` concatenates `_baseURI() + tokenId.toString()`. If the base URI is `ipfs:\u002F\u002FQmCID` without a trailing slash, token 42 becomes `ipfs:\u002F\u002FQmCID42` instead of `ipfs:\u002F\u002FQmCID\u002F42`.\n",{"name":5,"description":7},"main","91c94e72002a47486354c7cc646feca9be91c066","app\u002F.agents\u002Fskills\u002Ferc-721",6,"https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet","https:\u002F\u002Fgithub.com\u002Faustintgriffith","https:\u002F\u002Faustingriffith.com","👩‍🎤 builder on Ethereum","2026-10-03 09:11:37",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add austintgriffith\u002Fpicowallet --skill erc-721",{"tool":39,"command":40},"bunx","bunx skills add austintgriffith\u002Fpicowallet --skill erc-721",{"tool":42,"command":43},"pnpm","pnpm dlx skills add austintgriffith\u002Fpicowallet --skill erc-721","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Ferc-721\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7C73VW6BP37G6952JZ420ZW","pico-emu","Write and test MicroPython for the Pico wallet (Pico 2 W + Waveshare Pico-LCD-1.3, 240x240 screen, joystick + A\u002FB\u002FX\u002FY) on the virtual wallet in emu\u002F, then put it on the real board. Use for \"build X for the Pico\", \"make a game\u002Fscreen\u002Fanimation for the wallet\", \"try this on the emulator\", or \"put it on the Pico\".","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Femu\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7C73RDP5M6W7AXDQY7HRM9H","x402","Add x402 payment-gated routes to a Scaffold-ETH 2 project. Use when the user wants to: monetize an API with micropayments, add HTTP 402 payment required to routes, gate content behind crypto payments, implement pay-per-call APIs, or integrate the x402 protocol.","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7C73MDMSG0M6B4BG5HBBGM8","subgraph","Integrate The Graph subgraph into a Scaffold-ETH 2 project for indexing blockchain events. Use when the user wants to: index contract events with The Graph, add a subgraph, query onchain data with GraphQL, set up a local graph node, or deploy a subgraph to Subgraph Studio.","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Fsubgraph\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7C73FSQ0W35ZNRN0BTB386C","siwe","Add Sign-In with Ethereum (SIWE) authentication to a Scaffold-ETH 2 project. Use when the user wants to: add wallet-based login, implement SIWE, authenticate users with their Ethereum wallet, add session management with wallet signing, build sign-in with Ethereum, or add Web3 authentication.","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Fsiwe\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7C73A832KZMZ7CV52JAXHY7","ponder","Integrate Ponder into a Scaffold-ETH 2 project for blockchain event indexing. Use when the user wants to: index contract events, add a blockchain backend, set up GraphQL for onchain data, use Ponder with SE-2, or build an indexer for their dApp.","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Fponder\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7C735BZJBCF7WA2MG5DXJHR","openzeppelin","Develop smart contracts using OpenZeppelin Contracts library. Use when the user wants to create or modify Solidity contracts that use OpenZeppelin — including token standards (ERC20, ERC721, ERC1155), access control (Ownable, AccessControl), security primitives (Pausable, ReentrancyGuard), or any OZ extension. Covers library-first integration, pattern discovery from installed source, and version-safe development.","https:\u002F\u002Fgithub.com\u002Faustintgriffith\u002Fpicowallet\u002Fblob\u002Fmain\u002Fapp\u002F.agents\u002Fskills\u002Fopenzeppelin\u002FSKILL.md",[],[]]