mud-quickstart

Generates C# code and typed services for MUD World contracts and tables in .NET.

2.3k|744|Updated Nov 23, 2015
One-click install
npx skills add https://github.com/Nethereum/Nethereum --skill mud-quickstart
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mud-quickstart
Source: https://github.com/Nethereum/Nethereum/tree/main/plugins/nethereum-skills/skills/mud-quickstart
Command: npx skills add https://github.com/Nethereum/Nethereum --skill mud-quickstart

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building MUD applications in .NET requires manually writing C# bindings for MUD tables, systems, and World contracts, which is error-prone and repetitive. This Skill guides developers through defining tables, generating typed C# code, and interacting with World contracts using Nethereum.

Core Features & Use Cases

  • Code Generation from MUD Config: Generate TableRecord and TableService classes from mud.config.ts using the Nethereum.Generator.Console CLI with generator types like MudTables and MudExtendedService.
  • Typed Table CRUD Operations: Read, write, and delete keyed or singleton table records through generated services such as TableService<TRecord, TKey, TValue>.
  • Namespace Aggregation Pattern: Organize generated systems and tables into namespace classes via NamespaceBase<TResource, TSystems, TTables> for production applications.
  • Use Case: A developer building an on-chain game defines player tables in mud.config.ts, generates C# services, then reads and updates player scores through the typed PlayerTableService against a deployed World contract.

Quick Start

Ask the assistant to generate C# table services from your mud.config.ts and show how to read and write records on your MUD World contract using Nethereum.

Frequently Asked Questions about mud-quickstart

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

FAQPage Schema
How do I generate C# code from a MUD config file?

Define tables in mud.config.ts using defineWorld(), compile contracts with Forge, then create a .nethereum-gen.multisettings file with the MudTables generator type. Run Nethereum.Generator.Console generate from-config to produce TableRecord and TableService classes.

How do I read and write MUD table records in C#?

Use the generated TableService classes with your Web3 instance and World contract address. Call GetTableRecordAsync to read, SetRecordRequestAndWaitForReceiptAsync to write, and DeleteRecordRequestAndWaitForReceiptAsync to delete keyed records.

What NuGet packages are needed for MUD development with Nethereum?

Install Nethereum.Mud and Nethereum.Mud.Contracts for runtime table and World contract interaction. For code generation, install the Nethereum.Generator.Console global tool via dotnet tool install.

Can MUD be used for non-game applications in .NET?

Yes, MUD suits any application with complex structured on-chain state, not just games. The World contract acts as a diamond proxy routing calls to systems, with all state stored in typed tables grouped by namespaces.

What is the difference between MudTables and MudExtendedService generators?

MudTables generates TableRecord and TableService classes from mud.config.ts table definitions. MudExtendedService generates system service wrappers from compiled contract JSON, while ContractDefinition handles standard ABI-to-C# for non-MUD contracts.