Nodejs Keccak256
Prevents Ethereum hashing bugs by using Keccak-256 helpers instead of Node's NIST SHA3 sha3-256.
- CCM score
- 77 of 100
- skills.sh installs
- 10.8K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Ethereum Keccak-256 hashing in JavaScript and TypeScript for function selectors, event topics, and EIP-712 type hashes
- Includes ethers, viem, and web3.js examples for storage slots, packed hashing, and address derivation from public keys
- Enforces a rule against
crypto.createHash('sha3-256')in Ethereum contexts, since it silently produces different output - Provides
grepcommands to audit a codebase for direct sha3-256 usage and Keccak call sites
Install
$ npx -y skills add affaan-m/ecc --skill nodejs-keccak256 -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Node.js Keccak-256
Ethereum uses Keccak-256, not the NIST-standardized SHA3 variant exposed by Node's crypto.createHash('sha3-256').
When to Use
- Computing Ethereum function selectors or event topics
- Building EIP-712, signature, Merkle, or storage-slot helpers in JS/TS
- Reviewing any code that hashes Ethereum data with Node crypto directly
How It Works
The two algorithms produce different outputs for the same input, and Node will not warn you.
import crypto from 'crypto';
import { keccak256, toUtf8Bytes } from 'ethers';
const data = 'hello';
const nistSha3 = crypto.createHash('sha3-256').update(data).digest('hex');
const keccak = keccak256(toUtf8Bytes(data)).slice(2);
console.log(nistSha3 === keccak); // false
Examples
ethers v6
import { keccak256, toUtf8Bytes, solidityPackedKeccak256, id } from 'ethers';
const hash = keccak256(new Uint8Array([0x01, 0x02]));
const hash2 = keccak256(toUtf8Bytes('hello'));
const topic = id('Transfer(address,address,uint256)');
const packed = solidityPackedKeccak256(
['address', 'uint256'],
['0x742d35Cc6634C0532925a3b8D4C9B569890FaC1c', 100n],
);
viem
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Web3 & Crypto, Security
- First seen
- Jul 14, 2026
Questions
What does the nodejs-keccak256 skill do?
It prevents Ethereum hashing bugs in JavaScript and TypeScript code. Node's sha3-256 is NIST SHA3, not Ethereum Keccak-256, so using it silently breaks selectors, signatures, storage slots, and address derivation.
When should an agent use the nodejs-keccak256 skill?
Use it when hashing for Ethereum in JavaScript or TypeScript, or when a selector, signature, storage slot, or derived address is wrong. It also covers reviewing code that hashes Ethereum data with Node crypto directly.
How do I install the nodejs-keccak256 skill?
Run npx -y skills add affaan-m/ecc --skill nodejs-keccak256 -y in your project. The skill then tells the agent to use Keccak-aware helpers from ethers, viem, or web3 instead of crypto.createHash('sha3-256').
Which other skills are in the Web3 and Crypto category?
The nodejs-keccak256 skill ranks in the top 50 of the Web3 and Crypto category on Claude Marketplaces. Other skills in that category include solana-dev, binance-agentic-wallet, okx-dex-market, gmgn-market, and gmgn-token.
More from affaan-m/ecc
All 257- Github Ops10.8K
- Customer Billing Ops10.8K
- Lead Intelligence10.8K
- Code Tour10.7K
- Finance Billing Ops10.7K
- Api Connector Builder10.7K
- Openclaw Persona Forge10.7K
- Google Workspace Ops10.7K
- Knowledge Ops10.7K
- Workspace Surface Audit10.7K
- Terminal Ops10.7K
- Gan Style Harness10.7K
- Agent Sort10.7K
- Product Capability10.7K
- Csharp Testing10.7K
- Opensource Pipeline10.7K
- Hipaa Compliance10.7K
- Connections Optimizer10.6K
- Project Flow Ops10.6K
- Research Ops10.6K
- Automation Audit Ops10.6K
- Social Graph Ranker10.6K
- Email Ops10.5K
- Defi Amm Security10.5K
Similar to Nodejs Keccak256
More Web3 & Cryptodefi-amm-securityaffaan-m/ecc10.5K installsSecurity checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulat
evm-token-decimalsaffaan-m/ecc10.4K installsPrevent silent decimal mismatch bugs across EVM chains. Covers runtime decimal lookup, chain-aware caching, bridged-token precision drift, and safe normalizatio
query-address-infobinance/binance-skills-hub9.7K installsSnapshot of a single wallet's token holdings on a specific chain — list of every token currently held with name, symbol, current price, 24h price change, and ho
emblem-portfolio-trackeremblemcompany/agent-skills8.9K installsTrack crypto portfolio across 7 blockchains via EmblemAI. Aggregated balances with USD values, conditional trade P&L, and DeFi position tracking via Nansen. Use
emblem-market-researchemblemcompany/agent-skills8.9K installsCrypto market intelligence via EmblemAI. Trending tokens, on-chain analytics, derivatives data, and smart money tracking from CoinGecko, CoinGlass, Birdeye, and
walletstarchild-ai-agent/official-skills8.9K installsMulti-chain wallet: EVM and Solana balances, transfers, signing, and policy. Use when checking balances, sending tokens, signing typed data, or proposing a wall