get-block-number

Installation
SKILL.md

Get latest block number

This skill retrieves the latest block number from a blockchain using the configured JSON-RPC environment variables and Web3.py.

ALWAYS USE SCRIPT. NEVER RELY ON THE HISTORICAL INFORMATION OR GUESS.

Required inputs

  1. Chain name: The blockchain to query (e.g., Ethereum, Arbitrum, Base, Polygon)

Running the script

Generate and run a Python script to fetch the block number. Run it Python commadn line inline, don't write a new file.

import os
from web3 import Web3
Installs
73
GitHub Stars
822
First Seen
Jan 23, 2026
get-block-number — tradingstrategy-ai/web3-ethereum-defi