generators

Explain and demonstrate Hoon generator types for Urbit development.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/toplyr-narfur/urbit-skills --skill generators
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generators
Source: https://github.com/toplyr-narfur/urbit-skills/tree/main/skills/generators
Command: npx skills add https://github.com/toplyr-narfur/urbit-skills --skill generators

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on understanding and utilizing Hoon generators, enabling efficient creation of command-line tools, scripts, and utilities within the Urbit ecosystem.

Core Features & Use Cases

  • Generator Types: Covers naked, %say, and %ask generators.
  • Practical Examples: Demonstrates data processing, testing utilities, system queries, and more.
  • Use Case: You need to quickly calculate the sum of two numbers or retrieve the list of running applications on your Urbit ship. This skill shows you how to write a generator for these tasks.

Quick Start

Use the generators skill to learn how to write a naked generator that returns the string 'Hello, World!'.

Frequently Asked Questions about generators

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

FAQPage Schema
What is a Hoon generator and when do I use it in Urbit development?

A Hoon generator is a script type used for command-line tools, one-off computations, and testing utilities in Urbit. You use it to perform tasks like data processing or retrieving system state when you need a quick, executable script.

How do I write a naked generator in Hoon?

To write a naked generator in Hoon, you define a gate that takes an argument and returns a result, such as a simple function that returns 'Hello, World!'. Naked generators are the most basic form for straightforward inputs and outputs.

What is the difference between %say and %ask generators in Hoon?

%say generators allow for structured argument parsing and type checking, while %ask generators handle interactive command-line prompts. You choose %say for predictable CLI tools and %ask for scripts requiring user input during execution.

Can I use Hoon generators to access system state on my Urbit ship?

Yes, you can use Hoon generators to access system state via scries. This allows you to query running applications or retrieve ship data directly from the command line for testing and monitoring purposes.

Do I need any external dependencies to run Hoon generators?

No, you do not need external dependencies to run Hoon generators. They operate natively within the Urbit environment using the Hoon programming language and its standard library.