Agent skill

Query Blocks

by Nethereum in Nethereum/Nethereum

Query Ethereum blocks, transactions, receipts, balances, and nonces using Nethereum (.NET).

MITAuto-check passedBackend & APIs

Install Query Blocks

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

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

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

At a glance

Query Ethereum blocks, transactions, receipts, balances, and nonces using Nethereum (.NET).

  • The user asks about getting block data
  • SKILL.md covers Connect, Account Balance, Balance at Specific Block and Block Number, plus 10 more sections
  • Reaches mainnet.infura.io
  • Reading transactions

What it does

Query Blocks is an agent skill from Nethereum/Nethereum. Query Ethereum blocks, transactions, receipts, balances, and nonces using Nethereum (.NET). Use this skill whenever the user asks about getting block data, reading transactions, checking balances, fetching receipts, getting nonces, querying on-chain state, decoding event logs from receipts, detecting contracts, or reading ERC20 token balances with C or .NET.

Its SKILL.md is about 1.1k 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 Smart contracts. It works with Ethereum, .NET and C#. The repository describes itself as: Ethereum .Net cross platform integration library. The licence is MIT.

When your agent uses it

  • The user asks about getting block data
  • Reading transactions
  • Checking balances
  • Fetching receipts

Example prompts

  • “/query-blocks”

Requirements

  • A credential in YOUR_KEY

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    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:

    • mainnet.infura.io

    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

Query Blocks loads about 1.1k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 107 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.1k

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). 107 words, ~1,061 tokens.

Download SKILL.mdSave it as .claude/skills/query-blocks/SKILL.md (or your agent's skills folder).
name
query-blocks
description
Query Ethereum blocks, transactions, receipts, balances, and nonces using Nethereum (.NET). Use this skill whenever the user asks about getting block data, reading transactions, checking balances, fetching receipts, getting nonces, querying on-chain state, decoding event logs from receipts, detecting contracts, or reading ERC20 token balances with C# or .NET.
user-invocable
true

Query Blocks and Transactions

NuGet: Nethereum.Web3

All operations here are read-only — no private key needed.

Connect

csharp
using Nethereum.Web3;

var web3 = new Web3("https://mainnet.infura.io/v3/YOUR_KEY");

Account Balance

csharp
var balance = await web3.Eth.GetBalance.SendRequestAsync("0xaddress...");
var etherAmount = Nethereum.Util.UnitConversion.Convert.FromWei(balance.Value);

Balance at Specific Block

csharp
using Nethereum.RPC.Eth.DTOs;

var balance = await web3.Eth.GetBalance.SendRequestAsync(
    "0xaddress...",
    new BlockParameter(new HexBigInteger(15000000)));

BlockParameter also accepts BlockParameter.CreateLatest(), CreatePending(), CreateEarliest().

Block Number

csharp
var blockNumber = await web3.Eth.Blocks.GetBlockNumber.SendRequestAsync();

Block with Transactions

csharp
using Nethereum.Hex.HexTypes;

var block = await web3.Eth.Blocks.GetBlockWithTransactionsByNumber
    .SendRequestAsync(new HexBigInteger(blockNumber));
// block.Number, block.Timestamp, block.Transactions[]
// block.BaseFee (present on EIP-1559 blocks)

For tx hashes only (lighter): GetBlockWithTransactionsHashesByNumber.

Block by Hash

csharp
var block = await web3.Eth.Blocks.GetBlockWithTransactionsByHash
    .SendRequestAsync("0xabc123...");

Transaction by Hash

Returns the transaction as submitted (before execution):

csharp
var tx = await web3.Eth.Transactions.GetTransactionByHash
    .SendRequestAsync("0xtxhash...");
// tx.From, tx.To, tx.Value, tx.GasPrice
// tx.MaxFeePerGas, tx.MaxPriorityFeePerGas (EIP-1559)
// tx.Type (0x0 = legacy, 0x2 = EIP-1559)

Transaction Receipt

Available after mining. Shows success/failure, gas used, and events:

csharp
var receipt = await web3.Eth.Transactions.GetTransactionReceipt
    .SendRequestAsync("0xtxhash...");
// receipt.Status (1 = success, 0 = revert)
// receipt.GasUsed, receipt.EffectiveGasPrice
// receipt.Logs, receipt.BlockNumber

Both GetTransactionByHash and GetTransactionReceipt return null for unconfirmed transactions.

Transaction Count (Nonce)

csharp
var nonce = await web3.Eth.Transactions.GetTransactionCount
    .SendRequestAsync("0xaddress...");

Contract Detection

csharp
var code = await web3.Eth.GetCode.SendRequestAsync("0xaddress...");
// Returns "0x" for EOAs, bytecode for contracts
var isContract = code != null && code != "0x";

Decode Events from Receipt

csharp
using Nethereum.Contracts;
using Nethereum.Contracts.Standards.ERC20.ContractDefinition;

var receipt = await web3.Eth.Transactions.GetTransactionReceipt
    .SendRequestAsync("0x654288d8...");

var events = receipt.DecodeAllEvents<TransferEventDTO>();
Console.WriteLine($"From: {events[0].Event.From}");
Console.WriteLine($"To: {events[0].Event.To}");
Console.WriteLine($"Value: {events[0].Event.Value}");

DecodeAllEvents<T>() scans all logs and returns only those matching the event signature.

ERC20 Balance via Typed Service

csharp
var tokenBalance = await web3.Eth.ERC20
    .GetContractService("0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2")
    .BalanceOfQueryAsync("0x8ee7d9235e01e6b42345120b5d270bdb763624c7");
Console.WriteLine(Web3.Convert.FromWei(tokenBalance, 18));

Check If Transaction Succeeded

csharp
var receipt = await web3.Eth.Transactions.GetTransactionReceipt
    .SendRequestAsync(txHash);

if (receipt == null)
    Console.WriteLine("Transaction not yet mined");
else if (receipt.Status.Value == 1)
    Console.WriteLine("Success");
else
    Console.WriteLine("Reverted");

Calculate Transaction Cost in ETH

csharp
var costWei = receipt.GasUsed.Value * receipt.EffectiveGasPrice.Value;
var costEth = Nethereum.Util.UnitConversion.Convert.FromWei(costWei);

© 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/query-blocks of Nethereum/Nethereum.

Open the folder on GitHubat commit 229f278

Compare with similar skills

Query Blocks 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.

Query Blocks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Query Blocks this skillNethereum/Nethereum2.3k—~1.1kAutomated safety check: PassMIT
.NET API Compatibility DesignAaronontheweb/dotnet-skills1.2k2 repos~2.7kAutomated safety check: PassMIT
Tsp Csharpquerylenshq/ef-querylens225—~1.3kAutomated safety check: PassMIT
Explorer Contract Verificationsablier-labs/evm-monorepo353—~1.9kAutomated safety check: PassCustom licence
XML DocumentationVonage/vonage-dotnet-sdk118—~2.7kAutomated safety check: PassApache-2.0
Developing Smart ContractsLFDT-Lineth/lineth-monorepo126—~1.4kAutomated safety check: PassAGPL-3.0

Similar skills

  • .NET API Compatibility Design

    Aaronontheweb/dotnet-skills

    Applies extend-only design rules to NuGet packages and distributed systems, covering source, binary and wire compatibility and how to deprecate members safely.

    1.2k GitHub starsUsed in 2 repos~2.7k tokens
    Backend & APIsAuto-check passed
  • Tsp Csharp

    querylenshq/ef-querylens

    Comprehensive C and .NET development skill for TSP projects.

    225 GitHub stars~1.3k tokensUpdated 1 mo ago
    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 13 days ago
    Backend & APIsAuto-check passed
  • XML Documentation

    Vonage/vonage-dotnet-sdk

    Improve XML documentation in the Vonage .NET SDK. An agent skill from Vonage/vonage-dotnet-sdk.

    118 GitHub stars~2.7k tokensUpdated 3 mo ago
    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
  • Dotnet 10 Csharp 14

    sketch7/FluentlyHttpClient

    A skill your agent uses when building .NET 10 or C 14 applications; when using minimal APIs, modular monolith patterns, or feature folders; when implementing HTTP resilience, Options pattern…

    121 GitHub stars~2.2k tokensUpdated 19 days 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 Query Blocks

What does Query Blocks do?

Query Ethereum blocks, transactions, receipts, balances, and nonces using Nethereum (.NET). Query Blocks is an agent skill from Nethereum/Nethereum.NET).

When should I use Query Blocks?

Query Blocks fits situations like: the user asks about getting block data; reading transactions; checking balances; fetching receipts.

How do I install Query Blocks in Claude Code?

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

How do I install Query Blocks in Codex?

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

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

What does Query Blocks need to run?

SKILL.md names no scripts, command-line tools or credentials: Query Blocks is instructions for the agent only. Our summary lists: A credential in YOUR_KEY.

Does Query Blocks access the network?

SKILL.md names 1 domain. In commands or code: mainnet.infura.io; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Query Blocks 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 Query Blocks use?

Query Blocks 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 Query Blocks use?

About 1.1k tokens (SKILL.md is roughly 4.2k 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 Query Blocks?

Skills that share tags, products or a category with Query Blocks: .NET API Compatibility Design (Aaronontheweb/dotnet-skills, 1.2k stars), Tsp Csharp (querylenshq/ef-querylens, 225 stars), Explorer Contract Verification (sablier-labs/evm-monorepo, 353 stars) and XML Documentation (Vonage/vonage-dotnet-sdk, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Query Blocks?

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.