nodejs-keccak256

nodejs-keccak256 is a skill for Claude Code, Codex from Jamkris/everything-gemini-code. It costs 51 tokens per session (803 once invoked), scanned A, original, MIT.

A guide for calculating Ethereum's Keccak-256 hash in JavaScript or TypeScript. Ethereum's Keccak-256 is different from Node.js's standard SHA3-256 hash, even though their names look similar.

In plain words
What is it for?
It helps review and implement Ethereum hashing for selectors, event topics, EIP-712 signatures, Merkle data, storage slots, and address derivation.
Why use it?
Using the wrong hash can silently produce incorrect function selectors, event topics, signatures, storage slots, or derived addresses.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps review and implement Ethereum hashing for selectors, event topics, EIP-712 signatures, Merkle data, storage slots, and address derivation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamkris/everything-gemini-code/nodejs-keccak256
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Jamkris/everything-gemini-code --skill nodejs-keccak256
Clone the repo
git clone --depth 1 https://github.com/Jamkris/everything-gemini-code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nodejs-keccak256

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/nodejs-keccak256/github.svg)](https://agentmods.dev/skills/jamkris/everything-gemini-code/nodejs-keccak256)
Your own site
<a href="https://agentmods.dev/skills/jamkris/everything-gemini-code/nodejs-keccak256"><img src="https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/nodejs-keccak256/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nodejs-keccak256

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamkris/everything-gemini-code/nodejs-keccak256"><img src="https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/nodejs-keccak256.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00803
Opus 5.5 $0.00020 $0.00321
Sonnet 5.5 $0.00010 $0.00161
Haiku 4.5 $0.00005 $0.00080

Measured 2mo ago against content hash ad06dd6d6211, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nodejs-keccak256 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/nodejs-keccak256/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

import { keccak256, toBytes } from 'viem';

const hash = keccak256(toBytes('hello'));

web3.js

const hash = web3.utils.keccak256('hello');
const packed = web3.utils.soliditySha3(
  { type: 'address', value: '0x742d35Cc6634C0532925a3b8D4C9B569890FaC1c' },
  { type: 'uint256', value: '100' },
);

Common patterns

import { id, keccak256, AbiCoder } from 'ethers';

const selector = id('transfer(address,uint256)').slice(0, 10);
const typeHash = keccak256(toUtf8Bytes('Transfer(address from,address to,uint256 value)'));

function getMappingSlot(key: string, mappingSlot: number): string {
  return keccak256(
    AbiCoder.defaultAbiCoder().encode(['address', 'uint256'], [key, mappingSlot]),
  );
}

Address from public key

import { keccak256 } from 'ethers';

function pubkeyToAddress(pubkeyBytes: Uint8Array): string {
  const hash = keccak256(pubkeyBytes.slice(1));
  return '0x' + hash.slice(-40);
}

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 103 lines · 51 tokens per session scan A ad06dd6d6211

Subscribe to this mod's changes

nodejs-keccak256 is a skill published in the GitHub repository Jamkris/everything-gemini-code (93 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 803 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

nodejs-keccak256 compared with skills from other repositories

nodejs-keccak256 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nodejs-keccak256Jamkris/everything-gemini-codeSkill935mo agoMITA51Claude Code, Codex
modern-js-runtimesjxoesneon/CielSkill17d agoApache-2.0A20Claude Code, Codex
aws-sst-developmentsickn33/agentic-awesome-skillsSkill49kyesterdayMITA26Claude Code
javascript-typescript-typescript-scaffoldrmyndharis/antigravity-skillsSkill1.9k23d agoMITA42Claude Code
adding-personhog-rpcPostHog/posthogSkill41kyesterdaynoneA88Claude Code, Codex
bnb-chain-toolkit-guidenirholas/three.wsSkill269yesterdayApache-2.0A67Claude Code, Codex
viem-integrationUniswap/uniswap-aiSkill2362d agoMITA69Claude Code