LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

nodejs-keccak256

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.

189,255stars29,267forksUpdated 5/24/2026
Web DevelopmentCode Review#keccak256#cryptography#ethereum#code-review#typescript#javascript

Security Assessment

Safe(100/100)
Security Score100/100

About nodejs-keccak256

The `nodejs-keccak256` skill addresses a subtle but critical issue in Ethereum development using JavaScript and TypeScript. While Node.js provides a `sha3-256` hash function via its crypto module, this implements the NIST-standardized SHA3 algorithm rather than Ethereum's Keccak-256 variant. This difference can silently break core Ethereum functionality, including function selectors, event topics, storage slots, signatures, and address derivations, potentially introducing subtle bugs that are difficult to debug. `nodejs-keccak256` ensures developers can generate correct Keccak-256 hashes, avoiding compatibility issues and providing a reliable foundation for Ethereum applications in Node.js environments.

The skill provides direct compatibility with popular JavaScript and TypeScript Ethereum libraries such as `ethers`, `viem`, and `web3.js`. It offers a straightforward API to compute Keccak-256 hashes for strings, byte arrays, and packed Solidity data types. Developers can derive Ethereum addresses from public keys, calculate type hashes for EIP-712 and storage slot mappings, and safely produce function selectors or event topics. It also emphasizes best practices for code auditing, ensuring any improper usage of Node's `sha3-256` can be detected and corrected. Through practical examples, the skill demonstrates seamless integration in real-world Ethereum development scenarios.

Target users include blockchain developers, auditors, and engineers working on Ethereum smart contracts or decentralized applications (dApps) in JavaScript or TypeScript. It is particularly valuable when building or reviewing cryptographic functionality, including signature verification, Merkle proofs, and storage mapping. By providing a consistent Keccak-256 hashing approach, the skill helps developers prevent hard-to-detect Ethereum-specific bugs, improve code reliability, and ensure interoperability across Ethereum libraries and tooling.

FAQ

Why shouldn't I use Node's crypto.createHash('sha3-256') for Ethereum?

Node's implementation follows the NIST SHA3 standard, which produces different outputs from Ethereum's Keccak-256. Using it can silently break function selectors, event topics, storage slots, and address derivation.

Which libraries are compatible with nodejs-keccak256?

The skill works seamlessly with `ethers`, `viem`, and `web3.js`, providing Keccak-256 hash functions for strings, byte arrays, and Solidity packed data.

Can I use this skill for signature and address derivation?

Yes. It supports deriving Ethereum addresses from public keys and calculating type hashes for signatures, ensuring correctness in EIP-712 and other cryptographic computations.

Does this skill require TypeScript or is JavaScript supported?

Both JavaScript and TypeScript are supported. The examples include usage in JS and TS environments with standard library imports.

How can I audit my code to ensure correct hashing?

You can search your codebase for uses of `createHash('sha3-256')` and replace them with Keccak-aware functions from `ethers`, `viem`, or `web3.js`. The skill provides command-line grep examples for this purpose.

Install nodejs-keccak256

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

affaan-m/everything-claude-code

Related Skills

tigris-security-access-control

3

rebuttal-writing

362

building-blocks

189

docs-search

189