code-generation
Skill by Nethereum
Generates typed C# contract services, DTOs, Unity requests, MUD tables and Blazor pages from Solidity ABIs using Nethereum code generation. It is aimed at developers building C# clients for Ethereum smart contracts.
Install code-generation
Built from the published package, never by AI.
git clone --depth 1 https://github.com/Nethereum/Nethereum /tmp/Nethereum && mkdir -p ~/.claude/skills && cp -r /tmp/Nethereum/plugins/nethereum-skills/skills/code-generation ~/.claude/skills/code-generationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/Nethereum/Nethereum /tmp/Nethereum && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Nethereum/plugins/nethereum-skills/skills/code-generation ~/.gemini/antigravity-cli/skills/code-generationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill explains how to use Nethereum code generation to turn Solidity contracts into C# code. The main workflow compiles contracts with forge build, then runs the Nethereum.Generator.Console tool against a .nethereum-gen.multisettings config file. Generation can also start from ABI and BIN files, from the nethereum-codegen Node.js package, or during an MSBuild build through a NuGet package.
Generated output includes a service class with typed query, transaction and event methods, plus DTOs. Generated files use the .gen.cs suffix and are partial classes, so custom code goes in separate files. The skill suits .NET developers building C# clients for Solidity contracts, including Unity, MUD and Blazor projects.
Written from the project's SKILL.md and checked against it.
What it can do
- Generate from ABIGenerates C# from an ABI and BIN file using the generate from-abi command.
- Generate from Forge outputGenerates C# from forge build artifacts using a multisettings config file.
- Multi-contract configUses .nethereum-gen.multisettings to share types and reference existing structs.
- Generator typesSupports ContractDefinition, UnityRequest, MudTables, MudExtendedService, BlazorPageService and NetStandardLibrary.
- Shared typesShares events, errors and structs across contracts in one generation run.
- MUD generationCreates MUD tables from mud.config.ts and extended MUD services for systems.
- Node.js APIExposes code generation functions through the nethereum-codegen npm package.
- MSBuild integrationGenerates code on dotnet build when ABI and BIN files are placed in a project.
What you need
- .NET SDK for the dotnet tool commands
- Foundry (forge) for the primary Solidity build workflow
- Node.js for the nethereum-codegen package
- PowerShell for the provided generation script
Try asking
- Generate C# services from my Forge build output using .nethereum-gen.multisettings
- Create a Unity contract request class for my ERC20 ABI
- Generate MUD tables in C# from my mud.config.ts file
Good to know
- Generated .gen.cs files should not be edited manually.
- The config file defines how Solidity maps to C# namespaces.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/nethereum-skills/skills/code-generation/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB
Alternatives to code-generation
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
code-generation: common questions
Which generator types does Nethereum code generation support?
The source lists ContractDefinition, UnityRequest, MudTables, MudExtendedService, BlazorPageService and NetStandardLibrary. A single contract can use more than one type in the same config.
Where should custom C# code go?
All generated classes are partial, so custom code should be added in separate files. The source says generated .gen.cs files should not be edited by hand.
How are structs shared between contracts?
Use referencedTypesNamespaces and structReferencedTypes to import existing struct types instead of regenerating them. Use sharedTypes when events or errors repeat across contracts.
How do I install code-generation?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is code-generation free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is code-generation safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to code-generation?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
