Agent skill

Light Client

by Nethereum in Nethereum/Nethereum

Help users initialize and manage an Ethereum beacon chain light client for tracking finalized and optimistic headers.

MITAuto-check passedBackend & APIs

Install Light Client

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

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

GitHub CLI
$ gh skill install Nethereum/Nethereum light-client --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/light-client .claude/skills/light-client && 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
light-client
GitHub stars
2.3k
Token cost
~2.4k tokens
SKILL.md length
465 words
Files
1
Skills in repo
71
Repo updated
First seen
Licence
MIT

At a glance

Help users initialize and manage an Ethereum beacon chain light client for tracking finalized and optimistic headers.

  • The user mentions beacon chain
  • SKILL.md covers When to Use This vs Verified…, Required Packages, Chain Configurations and Initialization Pattern, plus 5 more sections
  • Calls dotnet; reaches ethereum-beacon-api.publicnode.com
  • BLS verification

What it does

Light Client is an agent skill from Nethereum/Nethereum. Help users initialize and manage an Ethereum beacon chain light client for tracking finalized and optimistic headers. Use this skill whenever the user mentions beacon chain, light client, sync committee, BLS verification, TrustedHeaderProvider, LightClientService, consensus layer tracking, header staleness, or wants to follow the Ethereum consensus without a full node.

Its SKILL.md is about 2.4k 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. It works with Ethereum. The repository describes itself as: Ethereum .Net cross platform integration library. The licence is MIT.

When your agent uses it

  • The user mentions beacon chain
  • BLS verification
  • TrustedHeaderProvider
  • LightClientService

Example prompts

  • “/light-client”

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

    Hosts in commands or code, which the agent is likely to contact:

    • ethereum-beacon-api.publicnode.com

    Also links to:

    • 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

Light Client loads about 2.4k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 465 words of instructions outside code blocks.

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

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). 465 words, ~2,352 tokens.

Download SKILL.mdSave it as .claude/skills/light-client/SKILL.md (or your agent's skills folder).
name
light-client
description
Help users initialize and manage an Ethereum beacon chain light client for tracking finalized and optimistic headers. Use this skill whenever the user mentions beacon chain, light client, sync committee, BLS verification, TrustedHeaderProvider, LightClientService, consensus layer tracking, header staleness, or wants to follow the Ethereum consensus without a full node.
user-invocable
true

Beacon Chain Light Client — Nethereum.Consensus.LightClient

The Nethereum light client tracks the Ethereum beacon chain by verifying sync committee BLS aggregate signatures rather than downloading every block. It provides trusted finalized and optimistic execution-layer headers that can be used for state proof verification without running a full node.

When to Use This vs Verified State

  • Use this skill when the user needs to initialize, configure, update, or manage the light client itself -- sync committee tracking, BLS verification, header freshness, state persistence, or multi-chain config.
  • Use the verified-state skill when the user wants to verify account balances, nonces, storage, or contract code using eth_getProof against a trusted header. The verified-state skill consumes ITrustedHeaderProvider but does not manage the light client lifecycle.

Required Packages

bash
dotnet add package Nethereum.Beaconchain              # Beacon API client
dotnet add package Nethereum.Consensus.LightClient     # Light client service, store, config
dotnet add package Nethereum.Signer.Bls.Herumi         # BLS12-381 signature verification (native)

Chain Configurations

ChainChain IDGenesis Validators Root
Mainnet10x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95
Sepolia111551110xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078
Holesky170000x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1

The CurrentForkVersion changes with each consensus hard fork. Fetch it dynamically from the beacon API rather than hardcoding it.

Initialization Pattern

csharp
using Nethereum.Beaconchain;
using Nethereum.Beaconchain.LightClient;
using Nethereum.Consensus.LightClient;
using Nethereum.Consensus.Ssz;
using Nethereum.Hex.HexConvertors.Extensions;
using Nethereum.Signer.Bls;
using Nethereum.Signer.Bls.Herumi;

// 1. Connect to a Beacon API endpoint
var beaconClient = new BeaconApiClient("https://ethereum-beacon-api.publicnode.com");

// 2. Fetch the weak subjectivity root from the latest finality update
var response = await beaconClient.LightClient.GetFinalityUpdateAsync();
var finalityUpdate = LightClientResponseMapper.ToDomain(response);
var weakSubjectivityRoot = finalityUpdate.FinalizedHeader.Beacon.HashTreeRoot();

// 3. Configure for mainnet
var config = new LightClientConfig
{
    GenesisValidatorsRoot = "0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95".HexToByteArray(),
    CurrentForkVersion = "0x06000000".HexToByteArray(),
    SlotsPerEpoch = 32,
    SecondsPerSlot = 12,
    WeakSubjectivityRoot = weakSubjectivityRoot
};

// 4. Initialize BLS verification
var nativeBls = new NativeBls(new HerumiNativeBindings());
await nativeBls.InitializeAsync();

// 5. Create and initialize the light client
var store = new InMemoryLightClientStore();
var lightClient = new LightClientService(beaconClient.LightClient, nativeBls, config, store);
await lightClient.InitializeAsync();

// 6. Inspect initial state
var state = lightClient.GetState();
Console.WriteLine("Finalized slot: " + state.FinalizedSlot);
Console.WriteLine("Block number: " + state.FinalizedExecutionPayload.BlockNumber);
Console.WriteLine("Block hash: " + state.FinalizedExecutionPayload.BlockHash.ToHex(true));

Update Lifecycle

After initialization, the light client needs periodic updates to track the chain.

UpdateAsync -- Sync Committee Period Catch-Up

Processes up to 4 sync committee period updates at a time. Call at startup or after the client has been offline for more than one period (~27 hours).

csharp
var updated = await lightClient.UpdateAsync();
var state = lightClient.GetState();
Console.WriteLine("Current period: " + state.CurrentPeriod);
Console.WriteLine("Finalized slot: " + state.FinalizedSlot);
UpdateFinalityAsync -- Latest Finalized Header

Advances the finalized header without changing the sync committee. Call every few minutes.

csharp
var finalityUpdated = await lightClient.UpdateFinalityAsync();
var state = lightClient.GetState();
Console.WriteLine("Finalized block: " + state.FinalizedExecutionPayload.BlockNumber);
UpdateOptimisticAsync -- Near-Head Header

Fetches the most recent optimistic header, typically seconds behind the chain head. Call every 12 seconds (once per slot) if near-head data is needed.

csharp
var optimisticUpdated = await lightClient.UpdateOptimisticAsync();
var state = lightClient.GetState();
Console.WriteLine("Optimistic block: " + state.OptimisticExecutionPayload.BlockNumber);

TrustedHeaderProvider

Wraps LightClientService and exposes ITrustedHeaderProvider, the interface consumed by VerifiedStateService for state proof verification.

csharp
var trustedProvider = new TrustedHeaderProvider(lightClient);

var finalizedHeader = trustedProvider.GetLatestFinalized();
Console.WriteLine("Finalized block: " + finalizedHeader.BlockNumber);
Console.WriteLine("State root: " + finalizedHeader.StateRoot.ToHex(true));

var optimisticHeader = trustedProvider.GetLatestOptimistic();
Console.WriteLine("Optimistic block: " + optimisticHeader.BlockNumber);

// Historical block hash lookup (up to 256 recent blocks)
var blockHash = trustedProvider.GetBlockHash(finalizedHeader.BlockNumber);
Staleness Detection

Monitor header freshness and react when headers become stale.

csharp
trustedProvider.FinalizedStalenessThreshold = TimeSpan.FromMinutes(30);
trustedProvider.OptimisticStalenessThreshold = TimeSpan.FromMinutes(5);

trustedProvider.StaleHeaderDetected += (sender, args) =>
{
    Console.WriteLine(args.HeaderType + " header is stale");
    Console.WriteLine("Age: " + args.Age.TotalMinutes + " minutes");
};

// Optionally throw instead of returning stale headers
trustedProvider.ThrowOnStaleHeader = true;
try
{
    var header = trustedProvider.GetLatestFinalized();
}
catch (StaleHeaderException ex)
{
    Console.WriteLine("Header age: " + ex.Age.TotalMinutes + " minutes");
}
Show full SKILL.md (189 more words)Show less

State Persistence (ILightClientStore)

The ILightClientStore interface controls how light client state is persisted across restarts. InMemoryLightClientStore is provided for testing. For production, implement a persistent store to avoid re-bootstrapping.

csharp
public interface ILightClientStore
{
    Task<LightClientState?> LoadAsync();
    Task SaveAsync(LightClientState state);
}

File-based example:

csharp
public class FileLightClientStore : ILightClientStore
{
    private readonly string _filePath;

    public FileLightClientStore(string filePath)
    {
        _filePath = filePath;
    }

    public async Task<LightClientState?> LoadAsync()
    {
        if (!File.Exists(_filePath))
            return null;
        var json = await File.ReadAllTextAsync(_filePath);
        return JsonSerializer.Deserialize<LightClientState>(json);
    }

    public async Task SaveAsync(LightClientState state)
    {
        var json = JsonSerializer.Serialize(state);
        await File.WriteAllTextAsync(_filePath, json);
    }
}

// Usage
var store = new FileLightClientStore("light-client-state.json");
var lightClient = new LightClientService(beaconClient.LightClient, nativeBls, config, store);
await lightClient.InitializeAsync(); // Loads saved state if available

Key Classes

ClassPurpose
LightClientServiceCore service: bootstrap, update, state management
LightClientConfigChain config: genesis root, fork version, slots/epoch
LightClientStateFull state: finalized/optimistic headers, sync committees, block hash history
InMemoryLightClientStoreIn-memory ILightClientStore for testing
TrustedHeaderProviderSimplified ITrustedHeaderProvider wrapper with staleness detection
TrustedExecutionHeaderBlockHash, BlockNumber, StateRoot, ReceiptsRoot, Timestamp
BeaconApiClientBeacon chain REST API client
LightClientResponseMapperMaps API responses to domain objects
NativeBlsBLS12-381 signature verification via Herumi

Common Gotchas

  • Staleness after inactivity: If offline for more than one sync committee period (~27 hours), call UpdateAsync before finality/optimistic updates.
  • Native library loading: HerumiNativeBindings loads a platform-specific native binary (bls_eth.dll/libbls_eth.so/libbls_eth.dylib). Ensure it is in the output directory.
  • Fork version changes: CurrentForkVersion changes with each hard fork. Fetch dynamically from the beacon API state fork endpoint.
  • Archive node for proofs: State proof verification via eth_getProof requires the execution node to have state at the block referenced by the light client header. Pruned nodes may not have it.

For full documentation, see: https://docs.nethereum.com/docs/consensus-light-client/guide-light-client

© 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/light-client of Nethereum/Nethereum.

Open the folder on GitHubat commit 229f278

Compare with similar skills

Light Client 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.

Light Client compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Light Client this skillNethereum/Nethereum2.3k—~2.4kAutomated safety check: PassMIT
NEAR Intents Swap Integrationinternet-court/internet-court-skill6.4k2 repos~939Automated safety check: PassCustom licence
Deposit QrSuperior-Trade/superior-skills2141 repos~1.1kAutomated safety check: PassMIT
Explorer Contract Verificationsablier-labs/evm-monorepo353—~1.9kAutomated safety check: PassCustom licence
Developing Smart ContractsLFDT-Lineth/lineth-monorepo126—~1.4kAutomated safety check: PassAGPL-3.0
Squash BugbotLFDT-Lineth/lineth-monorepo126—~3.3kAutomated safety check: PassApache-2.0

Similar skills

  • NEAR Intents Swap Integration

    internet-court/internet-court-skill

    Builds cross-chain token swaps and bridge flows with the NEAR Intents 1Click API: quotes, deposit addresses, per-chain deposits and status polling.

    6.4k GitHub starsUsed in 2 repos~939 tokens
    Backend & APIsAuto-check passed
  • Deposit Qr

    Superior-Trade/superior-skills

    A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…

    214 GitHub starsUsed in 1 repo~1.1k tokens
    Backend & APIsAuto-check passed
  • Explorer Contract Verification

    sablier-labs/evm-monorepo

    Verify smart contracts on Etherscan, Routescan, and Blockscout block explorers.

    353 GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Developing Smart Contracts

    LFDT-Lineth/lineth-monorepo

    Solidity smart contract development guidelines for Lineth blockchain.

    126 GitHub stars~1.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Squash Bugbot

    LFDT-Lineth/lineth-monorepo

    Triage unresolved bot review comments on a GitHub PR. An agent skill from LFDT-Lineth/lineth-monorepo.

    126 GitHub stars~3.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Ops Indexer Query

    boundless-xyz/boundless

    Internal — for Boundless team members only. An agent skill from boundless-xyz/boundless.

    193 GitHub stars~3.5k tokensUpdated 1 mo ago
    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

Works with

Categories

Questions about Light Client

What does Light Client do?

Help users initialize and manage an Ethereum beacon chain light client for tracking finalized and optimistic headers. Light Client is an agent skill from Nethereum/Nethereum. Help users initialize and manage an Ethereum beacon chain light client for tracking finalized and optimistic headers.

When should I use Light Client?

Light Client fits situations like: the user mentions beacon chain; BLS verification; trustedHeaderProvider; lightClientService.

How do I install Light Client in Claude Code?

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

How do I install Light Client in Codex?

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

Can I use Light Client 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 light-client -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/light-client, .gemini/skills/light-client, .github/skills/light-client and .opencode/skills/light-client in your project.

What does Light Client need to run?

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

Does Light Client access the network?

SKILL.md names 2 domains. In commands or code: ethereum-beacon-api.publicnode.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.nethereum.com. This is read from the text; nothing was executed.

Is Light Client 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 Light Client use?

Light Client 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 Light Client use?

About 2.4k tokens (SKILL.md is roughly 9.4k 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 Light Client?

Skills that share tags, products or a category with Light Client: NEAR Intents Swap Integration (internet-court/internet-court-skill, 6.4k stars), Deposit Qr (Superior-Trade/superior-skills, 214 stars), Explorer Contract Verification (sablier-labs/evm-monorepo, 353 stars) and Developing Smart Contracts (LFDT-Lineth/lineth-monorepo, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Light Client?

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.