viem

viem is a skill for Claude Code from sablier-labs/plugin-marketplace. It costs 67 tokens per session (1,923 once invoked), scanned A, a copy of viem, MIT.

A TypeScript library for connecting to Ethereum networks and reading or sending blockchain data.

In plain words
What is it for?
Use it to connect to supported chains, read blockchain state, send transactions, work with smart contracts, and convert Ethereum units.
Why use it?
It provides typed building blocks for blockchain connections and operations, reducing mistakes when working with Ethereum data and transactions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the web3 plugin — 4 skills shipped together

Good fit Use it to connect to supported chains, read blockchain state, send transactions, work with smart contracts, and convert Ethereum units.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sablier-labs/plugin-marketplace/viem
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 sablier-labs/plugin-marketplace --skill viem
Clone the repo
git clone --depth 1 https://github.com/sablier-labs/plugin-marketplace

Made for: Claude Code.

Or install web3, the plugin that ships this one along with the rest of its 4 skills.

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 viem

README.md
[![agentmods](https://agentmods.dev/badge/skills/sablier-labs/plugin-marketplace/viem/github.svg)](https://agentmods.dev/skills/sablier-labs/plugin-marketplace/viem)
Your own site
<a href="https://agentmods.dev/skills/sablier-labs/plugin-marketplace/viem"><img src="https://agentmods.dev/badge/skills/sablier-labs/plugin-marketplace/viem/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 viem

Your own site · 80×15
<a href="https://agentmods.dev/skills/sablier-labs/plugin-marketplace/viem"><img src="https://agentmods.dev/badge/skills/sablier-labs/plugin-marketplace/viem.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,923 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 100% copy Near-identical to another mod 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.00067 $0.01923
Opus 5 $0.00034 $0.00962
Sonnet 5 $0.00013 $0.00385
Haiku 4.5 $0.00007 $0.00192

Measured 9d ago against content hash 7e84916860a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

viem 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 9d 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

This is a copy

100% identical to viem — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/web3/skills/viem/SKILL.md · 314 lines

How it starts

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

Viem

Overview

Viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with the blockchain. It focuses on developer experience, stability, bundle size, and performance.

Key features:

  • Automatic type safety and inference
  • Tree-shakable lightweight modules
  • Optimized encoding/parsing
  • Composable APIs

Core Concepts

Concept Description
Clients PublicClient, WalletClient, TestClient - entry points
Transports Connection layer (http, webSocket, custom)
Actions Operations like getBlockNumber, sendTransaction
Chains Chain configurations (mainnet, sepolia, arbitrum, etc.)

Constants

Viem exports useful constants for common values:

import { maxUint256, maxUint128, maxInt256, zeroAddress, zeroHash } from "viem";

// Max values for uint types
maxUint256; // 2n ** 256n - 1n
maxUint128; // 2n ** 128n - 1n

// Zero values
zeroAddress; // 0x0000000000000000000000000000000000000000
zeroHash; // 0x0000000000000000000000000000000000000000000000000000000000000000

Utilities

Unit Conversion

Convert between wei and human-readable values:

import { parseEther, formatEther, parseUnits, formatUnits } from "viem";

// ETH <-> Wei (18 decimals)
parseEther("1"); // 1000000000000000000n
formatEther(1000000000000000000n); // "1"

// Custom decimals (e.g., USDC with 6 decimals)
parseUnits("100", 6); // 100000000n
formatUnits(100000000n, 6); // "100"

ABI Utilities

Parse human-readable ABIs:

import { parseAbi, parseAbiItem } from "viem";

const abi = parseAbi([
  "function balanceOf(address owner) view returns (uint256)",
  "function transfer(address to, uint256 amount) returns (bool)",
  "event Transfer(address indexed from, address indexed to, uint256 amount)",
]);

const item = parseAbiItem("function name() view returns (string)");

Read the full file on GitHub · 314 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. 9d ago First seen · 314 lines · 67 tokens per session scan A 7e84916860a0

Subscribe to this mod's changes

viem is a skill published in the GitHub repository sablier-labs/plugin-marketplace (7 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 1,923 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to viem, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

starknet-js

Use when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions…

starknet-io/starknet.js · 79 tokens

viem-integration

Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.

Uniswap/uniswap-ai · 69 tokens

wallet-cli

Operate the TypeScript TRON wallet CLI for accounts, transfers, staking, governance, contracts, signing, chain queries, and password input with wallet-cli 4.13.0. Refuse wallet passwords in argv and require the supported stdin channel. For Java REPL requests, refuse that entry and offer the TypeScript one-shot CLI…

BofAI/skills · 82 tokens

solana

Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable…

quicknode/solana-finance-claude-plugin · 76 tokens

upgrade-viem

Input: optionally a target viem version. Without one, use the latest release on npm.

evmts/tevm · 0 tokens

bnb-chain-toolkit-guide

Guide to the BNB Chain Toolkit — a modular TypeScript toolkit for building, deploying, and interacting with smart contracts on BNB Chain. Includes BEP-20 token utilities, DeFi integrations, wallet management, and cross-chain bridging. Built for BNB Chain Hackathon by the Sperax team.

nirholas/three.ws · 67 tokens