tempo-codegen

Generate Tempo action code from precompile specifications with JSDoc and namespaces.

3.5k|1.5k|Updated Jul 22, 2022
One-click install
npx skills add https://github.com/wevm/viem --skill tempo-codegen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tempo-codegen
Source: https://github.com/wevm/viem/tree/main/.agents/skills/tempo-codegen
Command: npx skills add https://github.com/wevm/viem --skill tempo-codegen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tempo codegen automates the generation of Tempo action code from precompile specifications, eliminating boilerplate and ensuring consistent interfaces across actions.

Core Features & Use Cases

  • Spec-driven action generation: Creates read and mutate actions from test/tempo/docs/specs/ and corresponding precompiles.
  • Documentation-driven: Enforces comprehensive JSDoc and example blocks in generated actions.
  • Standardized namespace structure: Produces Parameters, Args, ReturnValue, call, extractEvent, and inner helpers for all actions.
  • Quick Start friendly: Allows immediate generation from specs to src/tempo/actions/ with a single command.

Quick Start

Run the tempo-codegen tool to generate action sets from test/tempo/docs/specs/ into src/tempo/actions/.

Frequently Asked Questions about tempo-codegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript actions from precompile specifications?

To generate TypeScript actions from precompile specifications, use tempo-codegen to read specs from test/tempo/docs/specs/ and output complete action files into src/tempo/actions/. It creates read and write actions with standardized Parameters, Args, and ReturnValue structures.

What is the best way to auto-generate JSDoc and examples for contract actions?

Auto-generating JSDoc and examples for contract actions is handled by tempo-codegen, which enforces comprehensive documentation blocks and example usage directly within the generated code. This ensures every action has consistent frontmatter metadata and structured helper utilities.

Does Tempo codegen work with viem precompiles?

Yes, Tempo codegen works with viem precompiles by generating action code directly from those specifications. It targets precompile specs to create complete read and write actions with structured namespaces, call functions, and extractEvent utilities.

How do I structure Tempo actions with consistent namespaces and helpers?

Structuring Tempo actions with consistent namespaces is automated by tempo-codegen, producing standardized Parameters, Args, ReturnValue, call, extractEvent, and inner helper utilities for every action. This eliminates boilerplate and ensures uniform interfaces across all generated files.

Can I generate both read and write actions from a single precompile spec?

Yes, you can generate both read and mutate actions from a single precompile spec using tempo-codegen. It reads specifications from test/tempo/docs/specs/ and outputs complete action sets with full JSDoc, examples, and structured metadata into src/tempo/actions/.

Why does my Tempo codegen output lack JSDoc and frontmatter metadata?

If your Tempo codegen output lacks JSDoc and frontmatter metadata, ensure your precompile specifications in test/tempo/docs/specs/ are complete. The tool enforces comprehensive documentation, frontmatter, and structured Parameters, Args, and ReturnValue definitions for all generated actions.