[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72YRF7V8QYN7RA72BC12D2N":3,"skill-same:01M72YRF7V8QYN7RA72BC12D2N":49},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M72YRF7V8QYN7RA72BC12D2N","nodejs-keccak256",null,"Prevent Ethereum hashing bugs in JavaScript and TypeScript. Node's sha3-256 is NIST SHA3, not Ethereum Keccak-256, and silently breaks selectors, signatures, storage slots, and address derivation.","SriramGandhiS\u002FSkills","SriramGandhiS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211849986?v=4","01M72WQCW12BYX71C6WN584TTA","Sriram S","01M72WQCWTJ2RD0ET1X31AF1RC",1,"MIT","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Feverything-claude-code\u002Fskills\u002Fnodejs-keccak256\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: nodejs-keccak256\ndescription: Prevent Ethereum hashing bugs in JavaScript and TypeScript. Node's sha3-256 is NIST SHA3, not Ethereum Keccak-256, and silently breaks selectors, signatures, storage slots, and address derivation.\norigin: ECC direct-port adaptation\nversion: \"1.0.0\"\n---\n\n# Node.js Keccak-256\n\nEthereum uses Keccak-256, not the NIST-standardized SHA3 variant exposed by Node's `crypto.createHash('sha3-256')`.\n\n## When to Use\n\n- Computing Ethereum function selectors or event topics\n- Building EIP-712, signature, Merkle, or storage-slot helpers in JS\u002FTS\n- Reviewing any code that hashes Ethereum data with Node crypto directly\n\n## How It Works\n\nThe two algorithms produce different outputs for the same input, and Node will not warn you.\n\n```javascript\nimport crypto from 'crypto';\nimport { keccak256, toUtf8Bytes } from 'ethers';\n\nconst data = 'hello';\nconst nistSha3 = crypto.createHash('sha3-256').update(data).digest('hex');\nconst keccak = keccak256(toUtf8Bytes(data)).slice(2);\n\nconsole.log(nistSha3 === keccak); \u002F\u002F false\n```\n\n## Examples\n\n### ethers v6\n\n```typescript\nimport { keccak256, toUtf8Bytes, solidityPackedKeccak256, id } from 'ethers';\n\nconst hash = keccak256(new Uint8Array([0x01, 0x02]));\nconst hash2 = keccak256(toUtf8Bytes('hello'));\nconst topic = id('Transfer(address,address,uint256)');\nconst packed = solidityPackedKeccak256(\n  ['address', 'uint256'],\n  ['0x742d35Cc6634C0532925a3b8D4C9B569890FaC1c', 100n],\n);\n```\n\n### viem\n\n```typescript\nimport { keccak256, toBytes } from 'viem';\n\nconst hash = keccak256(toBytes('hello'));\n```\n\n### web3.js\n\n```javascript\nconst hash = web3.utils.keccak256('hello');\nconst packed = web3.utils.soliditySha3(\n  { type: 'address', value: '0x742d35Cc6634C0532925a3b8D4C9B569890FaC1c' },\n  { type: 'uint256', value: '100' },\n);\n```\n\n### Common patterns\n\n```typescript\nimport { id, keccak256, AbiCoder } from 'ethers';\n\nconst selector = id('transfer(address,uint256)').slice(0, 10);\nconst typeHash = keccak256(toUtf8Bytes('Transfer(address from,address to,uint256 value)'));\n\nfunction getMappingSlot(key: string, mappingSlot: number): string {\n  return keccak256(\n    AbiCoder.defaultAbiCoder().encode(['address', 'uint256'], [key, mappingSlot]),\n  );\n}\n```\n\n### Address from public key\n\n```typescript\nimport { keccak256 } from 'ethers';\n\nfunction pubkeyToAddress(pubkeyBytes: Uint8Array): string {\n  const hash = keccak256(pubkeyBytes.slice(1));\n  return '0x' + hash.slice(-40);\n}\n```\n\n### Audit your codebase\n\n```bash\ngrep -rn \"createHash.*sha3\" --include=\"*.ts\" --include=\"*.js\" --exclude-dir=node_modules .\ngrep -rn \"keccak256\" --include=\"*.ts\" --include=\"*.js\" . | grep -v node_modules\n```\n\n## Rule\n\nFor Ethereum contexts, never use `crypto.createHash('sha3-256')`. Use Keccak-aware helpers from `ethers`, `viem`, `web3`, or another explicit Keccak implementation.\n","# Node.js Keccak-256\n\nEthereum uses Keccak-256, not the NIST-standardized SHA3 variant exposed by Node's `crypto.createHash('sha3-256')`.\n\n## When to Use\n\n- Computing Ethereum function selectors or event topics\n- Building EIP-712, signature, Merkle, or storage-slot helpers in JS\u002FTS\n- Reviewing any code that hashes Ethereum data with Node crypto directly\n\n## How It Works\n\nThe two algorithms produce different outputs for the same input, and Node will not warn you.\n\n```javascript\nimport crypto from 'crypto';\nimport { keccak256, toUtf8Bytes } from 'ethers';\n\nconst data = 'hello';\nconst nistSha3 = crypto.createHash('sha3-256').update(data).digest('hex');\nconst keccak = keccak256(toUtf8Bytes(data)).slice(2);\n\nconsole.log(nistSha3 === keccak); \u002F\u002F false\n```\n\n## Examples\n\n### ethers v6\n\n```typescript\nimport { keccak256, toUtf8Bytes, solidityPackedKeccak256, id } from 'ethers';\n\nconst hash = keccak256(new Uint8Array([0x01, 0x02]));\nconst hash2 = keccak256(toUtf8Bytes('hello'));\nconst topic = id('Transfer(address,address,uint256)');\nconst packed = solidityPackedKeccak256(\n  ['address', 'uint256'],\n  ['0x742d35Cc6634C0532925a3b8D4C9B569890FaC1c', 100n],\n);\n```\n\n### viem\n\n```typescript\nimport { keccak256, toBytes } from 'viem';\n\nconst hash = keccak256(toBytes('hello'));\n```\n\n### web3.js\n\n```javascript\nconst hash = web3.utils.keccak256('hello');\nconst packed = web3.utils.soliditySha3(\n  { type: 'address', value: '0x742d35Cc6634C0532925a3b8D4C9B569890FaC1c' },\n  { type: 'uint256', value: '100' },\n);\n```\n\n### Common patterns\n\n```typescript\nimport { id, keccak256, AbiCoder } from 'ethers';\n\nconst selector = id('transfer(address,uint256)').slice(0, 10);\nconst typeHash = keccak256(toUtf8Bytes('Transfer(address from,address to,uint256 value)'));\n\nfunction getMappingSlot(key: string, mappingSlot: number): string {\n  return keccak256(\n    AbiCoder.defaultAbiCoder().encode(['address', 'uint256'], [key, mappingSlot]),\n  );\n}\n```\n\n### Address from public key\n\n```typescript\nimport { keccak256 } from 'ethers';\n\nfunction pubkeyToAddress(pubkeyBytes: Uint8Array): string {\n  const hash = keccak256(pubkeyBytes.slice(1));\n  return '0x' + hash.slice(-40);\n}\n```\n\n### Audit your codebase\n\n```bash\ngrep -rn \"createHash.*sha3\" --include=\"*.ts\" --include=\"*.js\" --exclude-dir=node_modules .\ngrep -rn \"keccak256\" --include=\"*.ts\" --include=\"*.js\" . | grep -v node_modules\n```\n\n## Rule\n\nFor Ethereum contexts, never use `crypto.createHash('sha3-256')`. Use Keccak-aware helpers from `ethers`, `viem`, `web3`, or another explicit Keccak implementation.\n",{"name":5,"origin":24,"version":25,"description":7},"ECC direct-port adaptation","1.0.0","master","d6ca01da0f24a3b0e26e4a8b7b66cbd25d429f5d","everything-claude-code\u002Fskills\u002Fnodejs-keccak256",0,"https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills","https:\u002F\u002Fgithub.com\u002FSriramGandhiS","https:\u002F\u002Fsriram.website\u002F","Curious guy who keeps tinkering until something works","2026-05-20 16:21:34",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SriramGandhiS\u002FSkills --skill nodejs-keccak256",{"tool":41,"command":42},"bunx","bunx skills add SriramGandhiS\u002FSkills --skill nodejs-keccak256",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SriramGandhiS\u002FSkills --skill nodejs-keccak256","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Feverything-claude-code\u002Fskills\u002Fnodejs-keccak256\u002FSKILL.md",true,[],[50,57,62,68,75,82],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M732609EPJWV13PVTX3GT4TM","webgpu-threejs-tsl","Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Fwebgpu-threejs-tsl\u002Fskills\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[],{"skillNo":58,"name":52,"nameZh":6,"description":53,"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},"01M7325XM47AGWB6K6C4VXKE6B","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7325WP6DES69JKC840VMFEP","verification-loop","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Fweb-assets\u002Fdocs\u002Fzh-TW\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7325TFQF1DZTQ6J3WGQQ1VR","tdd-workflow","Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Fweb-assets\u002Fdocs\u002Fzh-TW\u002Fskills\u002Ftdd-workflow\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7325RGV9AY9PK92D2V8KKPW","strategic-compact","Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Fweb-assets\u002Fdocs\u002Fzh-TW\u002Fskills\u002Fstrategic-compact\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7325MZC28SE86E7NMCNEFS4","security-review","Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment\u002Fsensitive features. Provides comprehensive security checklist and patterns.","https:\u002F\u002Fgithub.com\u002FSriramGandhiS\u002FSkills\u002Fblob\u002Fmaster\u002Fweb-assets\u002Fdocs\u002Fzh-TW\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[],[]]