viem — community Project-Remora-Frontend, community, ide skills, Claude Code, Cursor, Windsurf

v2.x

About this Skill

Perfect for Blockchain Agents needing secure Ethereum smart contract interactions and type safety. TypeScript patterns for low-level EVM blockchain interactions using Viem. Use when writing Node scripts, CLI tools, or backend services that read/write to Ethereum or EVM chains. Triggers on contract

pelith pelith
[0]
[0]
Updated: 3/12/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 7/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Locale and body language aligned
Review Score
7/11
Quality Score
44
Canonical Locale
en
Detected Body Locale
en

Perfect for Blockchain Agents needing secure Ethereum smart contract interactions and type safety. TypeScript patterns for low-level EVM blockchain interactions using Viem. Use when writing Node scripts, CLI tools, or backend services that read/write to Ethereum or EVM chains. Triggers on contract

Core Value

Empowers agents to securely interact with Ethereum smart contracts using the Viem TypeScript interface, ensuring correct patterns for contract interactions, client setup, and type safety with libraries like 'viem' and protocols such as HTTP.

Ideal Agent Persona

Perfect for Blockchain Agents needing secure Ethereum smart contract interactions and type safety.

Capabilities Granted for viem

Automating Ethereum smart contract deployments
Generating secure client setups for mainnet and testnet interactions
Debugging type safety issues in Ethereum smart contract integrations

! Prerequisites & Limits

  • Requires TypeScript environment
  • Ethereum blockchain only
  • Private key management required for wallet client setup

Why this page is reference-only

  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is viem?

Perfect for Blockchain Agents needing secure Ethereum smart contract interactions and type safety. TypeScript patterns for low-level EVM blockchain interactions using Viem. Use when writing Node scripts, CLI tools, or backend services that read/write to Ethereum or EVM chains. Triggers on contract

How do I install viem?

Run the command: npx killer-skills add pelith/Project-Remora-Frontend. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for viem?

Key use cases include: Automating Ethereum smart contract deployments, Generating secure client setups for mainnet and testnet interactions, Debugging type safety issues in Ethereum smart contract integrations.

Which IDEs are compatible with viem?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for viem?

Requires TypeScript environment. Ethereum blockchain only. Private key management required for wallet client setup.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add pelith/Project-Remora-Frontend. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use viem immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

viem

Install viem, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Viem Skill

Version: Viem 2.x | Official Docs

Viem is the modern TypeScript interface for Ethereum. This skill ensures correct patterns for contract interactions, client setup, and type safety.

Quick Reference

typescript
1import { createPublicClient, createWalletClient, http } from 'viem' 2import { mainnet } from 'viem/chains' 3import { privateKeyToAccount } from 'viem/accounts'

Critical Patterns

1. Client Setup

Public Client (read-only operations):

typescript
1const publicClient = createPublicClient({ 2 chain: mainnet, 3 transport: http('https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY'), 4})

Wallet Client (write operations):

typescript
1const account = privateKeyToAccount('0x...') 2const walletClient = createWalletClient({ 3 account, 4 chain: mainnet, 5 transport: http('https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY'), 6})

2. ABI Type Safety (CRITICAL)

Always use as const for ABIs to get full type inference:

typescript
1// ✅ CORRECT - Full type safety 2const abi = [ 3 { 4 name: 'balanceOf', 5 type: 'function', 6 stateMutability: 'view', 7 inputs: [{ name: 'owner', type: 'address' }], 8 outputs: [{ name: '', type: 'uint256' }], 9 }, 10] as const 11 12// ❌ WRONG - No type inference 13const abi = [{ name: 'balanceOf', ... }] // Missing `as const`

3. Contract Read Pattern

typescript
1const balance = await publicClient.readContract({ 2 address: '0x...', // Contract address 3 abi, 4 functionName: 'balanceOf', 5 args: ['0x...'], // Args are fully typed when using `as const` 6})

4. Contract Write Pattern (Simulate First!)

Always simulate before writing to catch errors early:

typescript
1// Step 1: Simulate 2const { request } = await publicClient.simulateContract({ 3 account, 4 address: '0x...', 5 abi, 6 functionName: 'transfer', 7 args: ['0x...', 1000000n], // Use BigInt for uint256 8}) 9 10// Step 2: Execute 11const hash = await walletClient.writeContract(request) 12 13// Step 3: Wait for receipt 14const receipt = await publicClient.waitForTransactionReceipt({ hash })

5. Event Watching

typescript
1const unwatch = publicClient.watchContractEvent({ 2 address: '0x...', 3 abi, 4 eventName: 'Transfer', 5 onLogs: (logs) => { 6 for (const log of logs) { 7 console.log(log.args.from, log.args.to, log.args.value) 8 } 9 }, 10}) 11 12// Clean up 13unwatch()

6. Multicall for Batch Reads

typescript
1const results = await publicClient.multicall({ 2 contracts: [ 3 { address: '0x...', abi, functionName: 'balanceOf', args: ['0x...'] }, 4 { address: '0x...', abi, functionName: 'totalSupply' }, 5 ], 6}) 7// results[0].result, results[1].result

Common Mistakes

MistakeFix
Missing as const on ABIAdd as const for type inference
Using Number for amountsUse BigInt literals: 1000000n
Writing without simulateAlways simulateContract first
Hardcoding gasLet viem estimate, or use gas: await publicClient.estimateGas(...)
Not awaiting receiptsUse waitForTransactionReceipt for confirmation

Chain Configuration

typescript
1import { mainnet, polygon, arbitrum, optimism, base } from 'viem/chains' 2 3// Custom chain 4const customChain = { 5 id: 123, 6 name: 'My Chain', 7 nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 }, 8 rpcUrls: { 9 default: { http: ['https://rpc.mychain.com'] }, 10 }, 11}

Error Handling

typescript
1import { BaseError, ContractFunctionRevertedError } from 'viem' 2 3try { 4 await publicClient.simulateContract({ ... }) 5} catch (err) { 6 if (err instanceof BaseError) { 7 const revertError = err.walk(e => e instanceof ContractFunctionRevertedError) 8 if (revertError instanceof ContractFunctionRevertedError) { 9 const errorName = revertError.data?.errorName 10 // Handle specific revert reason 11 } 12 } 13}

References

For detailed patterns, see:

  • references/contract-patterns.md - Advanced contract interaction patterns
  • references/common-errors.md - Error handling and debugging guide
  • Viem Documentation - Official docs
  • Viem GitHub - Source and releases

Related Skills

Looking for an alternative to viem or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Developer