Agent skill

Siwe

by Nethereum in Nethereum/Nethereum

Help users implement Sign-In with Ethereum (EIP-4361) authentication using Nethereum (.NET).

MITAuto-check passedBackend & APIs

Install Siwe

skills CLI
$ npx skills add Nethereum/Nethereum --skill siwe -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Nethereum/Nethereum siwe --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/nethereum-skills/skills/siwe .claude/skills/siwe && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
siwe
GitHub stars
2.3k
Token cost
~1.3k tokens
SKILL.md length
178 words
Files
1
Skills in repo
71
Repo updated
First seen
Licence
MIT

At a glance

Help users implement Sign-In with Ethereum (EIP-4361) authentication using Nethereum (.NET).

  • The user mentions SIWE
  • SKILL.md covers When to Use, Required Packages, Basic SIWE Flow and NFT-Gated Access, plus 7 more sections
  • Calls dotnet
  • Sign-in with Ethereum

What it does

Siwe is an agent skill from Nethereum/Nethereum. Help users implement Sign-In with Ethereum (EIP-4361) authentication using Nethereum (.NET). Use this skill whenever the user mentions SIWE, sign-in with Ethereum, wallet authentication, EIP-4361, wallet login, crypto authentication, NFT-gated access, RECAP capabilities, or EIP-5573. Also use when building Blazor or ASP.NET apps that need Ethereum-based authentication.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Crypto and DeFi analysis and Authentication. It works with Ethereum, .NET, Blazor and ASP.NET Core. The repository describes itself as: Ethereum .Net cross platform integration library. The licence is MIT.

When your agent uses it

  • The user mentions SIWE
  • Sign-in with Ethereum
  • Wallet authentication
  • Crypto authentication

Example prompts

  • “/siwe”

What it can do on your machine

Read from SKILL.md and the folder at commit 229f278. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.nethereum.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Siwe loads about 1.3k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 178 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Nethereum/Nethereum at commit 229f278, republished under its MIT licence (© Nethereum). 178 words, ~1,275 tokens.

Download SKILL.mdSave it as .claude/skills/siwe/SKILL.md (or your agent's skills folder).
name
siwe
description
Help users implement Sign-In with Ethereum (EIP-4361) authentication using Nethereum (.NET). Use this skill whenever the user mentions SIWE, sign-in with Ethereum, wallet authentication, EIP-4361, wallet login, crypto authentication, NFT-gated access, RECAP capabilities, or EIP-5573. Also use when building Blazor or ASP.NET apps that need Ethereum-based authentication.
user-invocable
true

SIWE Authentication with Nethereum

When to Use

  • User wants to authenticate users via their Ethereum wallet
  • Building a dApp that needs sign-in functionality
  • Implementing NFT-gated or token-gated access
  • Need to verify a user controls a specific Ethereum address
  • Building REST API authentication with Ethereum wallets
  • Need fine-grained capability authorization (RECAP/EIP-5573)

Required Packages

bash
dotnet add package Nethereum.Siwe

This includes Nethereum.Siwe.Core (message model, parser) automatically.

Basic SIWE Flow

csharp
using Nethereum.Siwe;
using Nethereum.Siwe.Core;

// 1. Create the service
var siweService = new SiweMessageService();

// 2. Build the message
var message = new SiweMessage
{
    Domain = "myapp.com",
    Address = userAddress.ConvertToEthereumChecksumAddress(),
    Statement = "Sign in to MyApp",
    Uri = "https://myapp.com",
    Version = "1",
    ChainId = "1"
};
message.SetIssuedAtNow();
message.SetExpirationTime(DateTime.UtcNow.AddMinutes(30));

// 3. Get the text for the wallet to sign (nonce auto-generated)
string messageToSign = siweService.BuildMessageToSign(message);

// 4. After user signs, verify
var parsed = SiweMessageParser.Parse(messageToSign);
bool valid = await siweService.IsValidMessage(parsed, signature);
// Checks: signature + dates + session nonce + user registration

NFT-Gated Access

csharp
var nftService = new ERC721BalanceEthereumUserService(
    nftContractAddress, rpcUrl);

var siweService = new SiweMessageService(
    new InMemorySessionNonceStorage(),
    nftService);

// IsValidMessage now also checks NFT ownership
bool valid = await siweService.IsValidMessage(parsed, signature);

Smart Contract Wallet Support (ERC-1271)

csharp
var siweService = new SiweMessageService(
    new InMemorySessionNonceStorage(),
    ethereumUserService: null,
    web3ForERC1271Validation: web3);

// Falls back to ERC-1271/ERC-6492 for smart contract wallets
bool valid = await siweService.IsMessageSignatureValid(parsed, signature);

RECAP Capabilities (EIP-5573)

csharp
using Nethereum.Siwe.Core.Recap;

var recapMessage = SiweRecapMsgBuilder.Init(message)
    .AddDefaultActions(new SiweNamespace("eip155"), new HashSet<string> { "sign" })
    .AddTargetActions(new SiweNamespace("https"), "https://api.myapp.com",
        new HashSet<string> { "read", "write" })
    .Build();

// Check permissions after verification
bool canWrite = recapMessage.HasPermissions(
    new SiweNamespace("https"), "https://api.myapp.com", "write");

Custom Session Storage

csharp
public class RedisSessionStorage : ISessionStorage
{
    public void AddOrUpdate(SiweMessage msg) { /* store by nonce */ }
    public SiweMessage GetSiweMessage(SiweMessage msg) { /* lookup by nonce */ }
    public void Remove(SiweMessage msg) { /* delete */ }
    public void Remove(string nonce) { /* delete */ }
}

var siweService = new SiweMessageService(new RedisSessionStorage());

Custom User Validation

csharp
public class MyUserService : IEthereumUserService
{
    public Task<bool> IsUserAddressRegistered(string address)
    {
        // Check database, allowlist, token balance, etc.
        return Task.FromResult(true);
    }
}

REST API Authentication (.NET 5+)

csharp
using Nethereum.Siwe.Authentication;

var loginService = new SiweApiUserLoginService<User>(httpClient);
string messageToSign = await loginService.GenerateNewSiweMessage(address);
var response = await loginService.Authenticate(parsedMessage, signature);
string jwt = response.Jwt;
var user = await loginService.GetUser(jwt);
await loginService.Logout(jwt);

Key Decision Points

ScenarioApproach
Simple EOA sign-innew SiweMessageService() — default, no extras needed
NFT/token gatingPass ERC721BalanceEthereumUserService or custom IEthereumUserService
Smart contract walletsPass web3ForERC1271Validation to constructor
Distributed serversImplement ISessionStorage with Redis/DB
Fine-grained permissionsUse SiweRecapMsgBuilder for RECAP capabilities
Blazor Server authUse NethereumSiweAuthenticatorService from Nethereum.UI
Blazor WASM + APIUse SiweApiUserLoginService<User> with JWT

Important Notes

  • Always use UTC for SetExpirationTime and SetNotBefore
  • BuildMessageToSign generates a fresh nonce each call — don't reuse
  • InMemorySessionNonceStorage doesn't survive restarts — use persistent storage in production
  • Set ChainId to match the user's connected chain

For full documentation, see: https://docs.nethereum.com/docs/protocols/guide-siwe

© Nethereum, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/nethereum-skills/skills/siwe of Nethereum/Nethereum.

Open the folder on GitHubat commit 229f278

Compare with similar skills

Siwe next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Siwe compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Siwe this skillNethereum/Nethereum2.3k—~1.3kAutomated safety check: PassMIT
Aspnet Corefanslead/ReverseProxy.Store1632 repos~1.4kAutomated safety check: PassApache-2.0
Verify Authendpointsmadeyoga/AuthEndpoints121—~2.7kAutomated safety check: PassMIT
Alchemy Agentic Gatewaymoonpay/skills113—~2.1kAutomated safety check: NotesMIT
Dotnet APInovotnyllc/dotnet-artisan233—~1.6kAutomated safety check: PassMIT
Using Dotnetnovotnyllc/dotnet-artisan233—~2.3kAutomated safety check: WarnMIT

Similar skills

  • Aspnet Core

    fanslead/ReverseProxy.Store

    Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development.

    163 GitHub starsUsed in 2 repos~1.4k tokens
    Backend & APIsAuto-check passed
  • Verify Authendpoints

    madeyoga/AuthEndpoints

    Drive the AuthEndpoints HTTP API via the in-repo test host (cookie sessions, Identity bearer, Simple JWT, CSRF, ReAuth).

    121 GitHub stars~2.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • A skill your agent uses when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features.

    113 GitHub stars~2.1k tokensUpdated 27 days ago
    Backend & APIsAuto-check: notes
  • Dotnet API

    novotnyllc/dotnet-artisan

    Builds ASP.NET Core APIs, EF Core data access, gRPC, SignalR, and backend services with middleware, security (OAuth, JWT, OWASP), resilience, messaging, OpenAPI, .NET Aspire, Semantic Kernel…

    233 GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Using Dotnet

    novotnyllc/dotnet-artisan

    Detects .NET intent for any C, ASP.NET Core, EF Core, Blazor, MAUI, Uno Platform, WPF, WinUI, SignalR, gRPC, xUnit, NuGet, or MSBuild request from prompt keywords and repository signals (.sln…

    233 GitHub stars~2.3k tokensUpdated today
    Backend & APIsAuto-check: warnings
  • Dotnet Webapi

    dotnet/skills

    Official

    Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling.

    5.6k GitHub starsUsed in 2 repos~5.5k tokens
    Backend & APIsAuto-check passed

More from Nethereum/Nethereum

All 71 skills in this repo
  • Aa Batching Paymasters

    Nethereum/Nethereum

    Help users batch multiple calls into a single UserOperation and sponsor gas with paymasters using Nethereum Account Abstraction.

    2.3k GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Aa Bundler

    Nethereum/Nethereum

    Help users run an ERC-4337 bundler using Nethereum — set up in-process or standalone bundlers with mempool, validation, reputation, and JSON-RPC server.

    2.3k GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed
  • Abi Encoding

    Nethereum/Nethereum

    Encode and decode Ethereum ABI data with Nethereum. An agent skill from Nethereum/Nethereum.

    2.3k GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Abi Retrieval

    Nethereum/Nethereum

    Fetch contract ABIs from Sourcify, Etherscan, and 4Byte Directory using the composite ABIInfoStorage pattern (.NET/C).

    2.3k GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Account Abstraction

    Nethereum/Nethereum

    Help users implement ERC-4337 Account Abstraction with Nethereum — send UserOperations, use smart accounts, route contract calls through a bundler, enable gasless transactions, or work with AA in…

    2.3k GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed
  • Address Utils

    Nethereum/Nethereum

    Validate and format Ethereum addresses with Nethereum. An agent skill from Nethereum/Nethereum.

    2.3k GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Siwe

What does Siwe do?

Help users implement Sign-In with Ethereum (EIP-4361) authentication using Nethereum (.NET). Siwe is an agent skill from Nethereum/Nethereum.NET).

When should I use Siwe?

Siwe fits situations like: the user mentions SIWE; sign-in with Ethereum; wallet authentication; crypto authentication.

How do I install Siwe in Claude Code?

Run `npx skills add Nethereum/Nethereum --skill siwe -a claude-code`. Or copy the skill folder (plugins/nethereum-skills/skills/siwe in Nethereum/Nethereum) into .claude/skills/siwe in your project. Claude Code loads it when a task matches its description.

How do I install Siwe in Codex?

Run `npx skills add Nethereum/Nethereum --skill siwe -a codex`. Or copy the skill folder (plugins/nethereum-skills/skills/siwe in Nethereum/Nethereum) into .agents/skills/siwe in your project. Codex loads it when a task matches its description.

Can I use Siwe in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Nethereum/Nethereum --skill siwe -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/siwe, .gemini/skills/siwe, .github/skills/siwe and .opencode/skills/siwe in your project.

What does Siwe need to run?

Going by SKILL.md and its folder, Siwe needs the command-line tools its instructions call (dotnet).

Does Siwe access the network?

SKILL.md names 1 domain. As links in the text: docs.nethereum.com. This is read from the text; nothing was executed.

Is Siwe safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Siwe use?

Siwe is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Siwe use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Siwe?

Skills that share tags, products or a category with Siwe: Aspnet Core (fanslead/ReverseProxy.Store, 163 stars), Verify Authendpoints (madeyoga/AuthEndpoints, 121 stars), Alchemy Agentic Gateway (moonpay/skills, 113 stars) and Dotnet API (novotnyllc/dotnet-artisan, 233 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Siwe?

Nethereum (a GitHub organization) maintains it in Nethereum/Nethereum, which has 2,260 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on October 5, 2026.

Source: Nethereum/Nethereum on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.