tempo-codegen — community tempo-codegen, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for Ethereum-focused AI Agents requiring automated action generation based on precompile contract specifications TypeScript Interface for Ethereum

wevm wevm
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The tempo-codegen skill by wevm is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for Ethereum-focused AI Agents requiring automated action generation based on precompile contract specifications

Core Value

Empowers agents to generate TypeScript interfaces for Ethereum, leveraging precompile contract specs and ensuring consistency across specs and precompiles, utilizing file formats like .ts and protocols specific to Ethereum

Capabilities Granted for tempo-codegen

Generating action sets based on precompile contract specifications
Validating interface consistency between specs and precompiles
Automating TypeScript interface creation for Ethereum contracts

! Prerequisites & Limits

  • Requires access to precompile contract specifications
  • Limited to Ethereum ecosystem
  • Must prefer specs over precompiles in case of inconsistencies
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

tempo-codegen

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

SKILL.md
Readonly

Tempo Code Generation

When generating actions (in src/tempo/actions/), follow these guidelines.

An example of a generated action set can be found in src/tempo/actions/token.ts.

Source of Truth

  • All actions must be based on precompile contract specifications in test/tempo/docs/specs/.
  • It could be likely that some interfaces may be inconsistent between the specs (test/tempo/docs/specs) and the precompiles (test/tempo/crates/contracts/src/precompiles). Always prefer the precompile interfaces over the specs.
  • If the specification is unclear or missing details, prompt the developer for guidance rather than making assumptions

Documentation Requirements

All actions must include comprehensive JSDoc with:

  1. Function description - What the action does
  2. @example block - Complete working example showing:
    • Required imports (createClient, http, action imports)
    • Client setup with chain and transport
    • Action usage with realistic parameters
    • Expected return value handling (if applicable)
  3. @param tags - For each parameter (client, parameters)
  4. @returns tag - Description of the return value

Example:

typescript
1/** 2 * Gets the pool ID for a token pair. 3 * 4 * @example 5 * ```ts 6 * import { createClient, http } from 'viem' 7 * import { tempo } from 'tempo.ts/chains' 8 * import { Actions } from 'tempo.ts/viem' 9 * 10 * const client = createClient({ 11 * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }) 12 * transport: http(), 13 * }) 14 * 15 * const poolId = await Actions.amm.getPoolId(client, { 16 * userToken: '0x...', 17 * validatorToken: '0x...', 18 * }) 19 * ``` 20 * 21 * @param client - Client. 22 * @param parameters - Parameters. 23 * @returns The pool ID. 24 */

Action Types

Read-Only Actions

For view/pure functions that only read state:

  • Use readContract from viem/actions
  • Return type should use ReadContractReturnType
  • Parameters extend ReadParameters

Mutate-Based Actions

For state-changing functions, both variants must be implemented:

1. Standard Async Variant

  • Uses writeContract from viem/actions
  • Returns transaction hash
  • Async operation that doesn't wait for confirmation
typescript
1export async function myAction< 2 chain extends Chain | undefined, 3 account extends Account | undefined, 4>( 5 client: Client<Transport, chain, account>, 6 parameters: myAction.Parameters<chain, account>, 7): Promise<myAction.ReturnValue> { 8 return myAction.inner(writeContract, client, parameters) 9}

2. Sync Variant (*Sync)

  • Named with Sync suffix (e.g., mintSync, burnSync, rebalanceSwapSync)
  • Uses writeContractSync from viem/actions
  • Waits for transaction confirmation
  • Returns both the receipt and extracted event data
  • Must use extractEvent to get return values (not simulateContract)
typescript
1export async function myActionSync< 2 chain extends Chain | undefined, 3 account extends Account | undefined, 4>( 5 client: Client<Transport, chain, account>, 6 parameters: myActionSync.Parameters<chain, account>, 7): Promise<myActionSync.ReturnValue> { 8 const { throwOnReceiptRevert = true, ...rest } = parameters 9 const receipt = await myAction.inner(writeContractSync, client, { 10 ...rest, 11 throwOnReceiptRevert, 12 } as never) 13 const { args } = myAction.extractEvent(receipt.logs) 14 return { 15 ...args, 16 receipt, 17 } as never 18}

Namespace Properties

All actions must include the following components within their namespace:

1. Parameters Type

typescript
1// Read actions 2export type Parameters = ReadParameters & Args 3 4// Write actions 5export type Parameters< 6 chain extends Chain | undefined = Chain | undefined, 7 account extends Account | undefined = Account | undefined, 8> = WriteParameters<chain, account> & Args

2. Args Type

Arguments must be documented with JSDoc.

typescript
1export type Args = { 2 /** JSDoc for each argument */ 3 argName: Type 4}

3. ReturnValue Type

typescript
1// Read actions 2export type ReturnValue = ReadContractReturnType<typeof Abis.myAbi, 'functionName', never> 3 4// Write actions 5export type ReturnValue = WriteContractReturnType

4. ErrorType Type (for write actions)

Write actions must include an ErrorType export. Use BaseErrorType from viem as a placeholder with a TODO comment for future exhaustive error typing:

typescript
1// TODO: exhaustive error type 2export type ErrorType = BaseErrorType

5. call Function

Required for all actions - enables composition with other viem actions:

typescript
1/** 2 * Defines a call to the `functionName` function. 3 * 4 * Can be passed as a parameter to: 5 * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call 6 * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call 7 * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls 8 * 9 * @example 10 * ```ts 11 * import { createClient, http, walletActions } from 'viem' 12 * import { tempo } from 'tempo.ts/chains' 13 * import { Actions } from 'tempo.ts/viem' 14 * 15 * const client = createClient({ 16 * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' }) 17 * transport: http(), 18 * }).extend(walletActions) 19 * 20 * const hash = await client.sendTransaction({ 21 * calls: [actions.amm.myAction.call({ arg1, arg2 })], 22 * }) 23 * ``` 24 * 25 * @param args - Arguments. 26 * @returns The call. 27 */ 28export function call(args: Args) { 29 return defineCall({ 30 address: Addresses.contractName, 31 abi: Abis.contractName, 32 args: [/* transformed args */], 33 functionName: 'functionName', 34 }) 35}

The call function enables these use cases:

  • sendCalls - Batch multiple calls in one transaction
  • sendTransaction with calls - Send transaction with multiple operations
  • multicall - Execute multiple calls in parallel
  • estimateContractGas - Estimate gas costs
  • simulateContract - Simulate execution

6. extractEvent Function (for mutate-based actions)

Required for all actions that emit events:

typescript
1/** 2 * Extracts the `EventName` event from logs. 3 * 4 * @param logs - The logs. 5 * @returns The `EventName` event. 6 */ 7export function extractEvent(logs: Log[]) { 8 const [log] = parseEventLogs({ 9 abi: Abis.contractName, 10 logs, 11 eventName: 'EventName', 12 strict: true, 13 }) 14 if (!log) throw new Error('`EventName` event not found.') 15 return log 16}

7. inner Function (for write actions)

typescript
1/** @internal */ 2export async function inner< 3 action extends typeof writeContract | typeof writeContractSync, 4 chain extends Chain | undefined, 5 account extends Account | undefined, 6>( 7 action: action, 8 client: Client<Transport, chain, account>, 9 parameters: Parameters<chain, account>, 10): Promise<ReturnType<action>> { 11 const { arg1, arg2, ...rest } = parameters 12 const call = myAction.call({ arg1, arg2 }) 13 return (await action(client, { 14 ...rest, 15 ...call, 16 } as never)) as never 17}

Namespace Structure

Organize actions using namespace pattern:

typescript
1export async function myAction(...) { ... } 2 3export namespace myAction { 4 export type Parameters = ... 5 export type Args = ... 6 export type ReturnValue = ... 7 8 export async function inner(...) { ... } // for write actions 9 export function call(args: Args) { ... } 10 export function extractEvent(logs: Log[]) { ... } // for mutate actions 11}

Decision-Making

When encountering situations that require judgment:

  • Specification ambiguities: Prompt developer for clarification
  • Missing contract details: Request ABI or specification update
  • Event structure uncertainty: Ask for event definition
  • Parameter transformations: Confirm expected input/output formats
  • Edge cases: Discuss handling strategy with developer

Naming Conventions

  • Action names should match contract function names (in camelCase)
  • Sync variants use Sync suffix (e.g., myActionSync)
  • Event names in extractEvent should match contract event names exactly
  • Namespace components should be exported within the action's namespace

Testing

Tests should be co-located with actions in *action-name*.test.ts files. Reference contract tests in test/tempo/crates/precompiles/ for expected behavior.

See src/tempo/actions/token.test.ts for a comprehensive example of test patterns and structure.

Test Structure

Organize tests by action name with a default test case and behavior-specific tests:

typescript
1describe('actionName', () => { 2 test('default', async () => { 3 // Test the primary/happy path scenario 4 const { receipt, ...result } = await Actions.namespace.actionSync(client, { 5 param1: value1, 6 param2: value2, 7 }) 8 9 expect(receipt).toBeDefined() 10 expect(result).toMatchInlineSnapshot(`...`) 11 }) 12 13 test('behavior: specific edge case', async () => { 14 // Test specific behaviors, edge cases, or variations 15 }) 16 17 test('behavior: error conditions', async () => { 18 // Test error handling 19 await expect( 20 actions.namespace.actionSync(client, { ... }) 21 ).rejects.toThrow() 22 }) 23}) 24 25describe.todo('unimplementedAction')

FAQ & Installation Steps

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

? Frequently Asked Questions

What is tempo-codegen?

Ideal for Ethereum-focused AI Agents requiring automated action generation based on precompile contract specifications TypeScript Interface for Ethereum

How do I install tempo-codegen?

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

What are the use cases for tempo-codegen?

Key use cases include: Generating action sets based on precompile contract specifications, Validating interface consistency between specs and precompiles, Automating TypeScript interface creation for Ethereum contracts.

Which IDEs are compatible with tempo-codegen?

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 tempo-codegen?

Requires access to precompile contract specifications. Limited to Ethereum ecosystem. Must prefer specs over precompiles in case of inconsistencies.

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 wevm/viem. 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 tempo-codegen immediately in the current project.

Related Skills

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

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI