onflow/flow-cli/query-blockchain
Claude Code and agent skill by onflow/flow-cli
- community
Checking that the SKILL.md file is still in the repository.
Use when you need to read any data from the Flow blockchain — account state, blocks, events, transaction results, collections, or custom contract state via Cadence scripts.
Install
npx vskill@latest install onflow/flow-cli/query-blockchainSKILL.md
Querying the Flow Blockchain with flow-cli
Overview
Use this skill any time you need on-chain data. Choose the right command from the decision table, then run it.
When the entity commands don't expose what you need, use `flow scripts execute` — Cadence scripts can query any on-chain state and are the primary tool for anything not covered by the commands below. See Cadence Scripts.
Network
Default: mainnet. Infer from conversation context:
| Context | Flag | |
|---|---|---|
| Default / production | --network mainnet | |
| Testnet discussion | --network testnet | |
| Local development / emulator | --network emulator |
Access node endpoints (built-in):
- Mainnet:
access.mainnet.nodes.onflow.org:9000 - Testnet:
access.devnet.nodes.onflow.org:9000 - Emulator:
127.0.0.1:3569
Override with --host <endpoint> to point at a custom access node.
Decision Table
| What you need | Command | |
|---|---|---|
| Account balance, keys, deployed contracts | flow accounts get | |
| Account staking info | flow accounts staking-info | |
| Block info | flow blocks get | |
| Events emitted in a block range | flow events get | |
| Regular transaction status / result | flow transactions get | |
| System transaction for a block | flow transactions get-system | |
| Scheduled transaction details | flow schedule get / flow schedule list | |
| Collection contents | flow collections get | |
| Network status (online/offline) | flow status | |
| Protocol state snapshot | flow snapshot save | |
| Anything not covered above | flow scripts execute |
Commands
Accounts
--include contractsadds deployed contract source code to the output- Flow addresses must include the
0xprefix (e.g.0xf8d6e0586b0a20c7) <name>resolves viaflow.json— only use names when aflow.jsonis present
Blocks
Events
- Default: last 10 blocks. Use
--last Nto widen. --start/--endfor explicit block height range.- Multiple event types are fetched in parallel.
- Event name format:
A.<address>.<ContractName>.<EventName>
Transactions
Collections
Network Status
Output Format
All commands support --output json for machine-readable output.
Use --filter <property> to extract specific fields from results.
Cadence Scripts
flow scripts execute is the most powerful read tool. Use it when:
- You need data from a contract that has no dedicated CLI command
- You need to call a
viewfunction or read a field from a contract - You need to combine data from multiple contracts in one query
- You need a historical snapshot at a specific block height
- Simple types (Address, UInt64, String, Bool) can be passed as positional args
- Use
--args-jsonfor complex types (UFix64, optionals, structs, arrays) --block-height/--block-idexecute against historical state- Write a temporary
.cdcfile, execute it, then clean up
Writing and Running Scripts
Write script to a temp file, execute, clean up:
Passing Arguments
Contract Addresses
| Contract | Mainnet | Testnet | Emulator | |
|---|---|---|---|---|
| FungibleToken | 0xf233dcee88fe0abe | 0x9a0766d93b6608b7 | 0xee82856bf20e2aa6 | |
| FungibleTokenMetadataViews | 0xf233dcee88fe0abe | 0x9a0766d93b6608b7 | 0xf8d6e0586b0a20c7 | |
| FungibleTokenSwitchboard | 0xf233dcee88fe0abe | 0x9a0766d93b6608b7 | 0xf8d6e0586b0a20c7 | |
| Burner | 0xf233dcee88fe0abe | 0x9a0766d93b6608b7 | 0xf8d6e0586b0a20c7 | |
| FlowToken | 0x1654653399040a61 | 0x7e60df042a9c0868 | 0x0ae53cb6e3f42a79 | |
| NonFungibleToken | 0x1d7e57aa55817448 | 0x631e88ae7f1d7c20 | 0xf8d6e0586b0a20c7 | |
| MetadataViews | 0x1d7e57aa55817448 | 0x631e88ae7f1d7c20 | 0xf8d6e0586b0a20c7 | |
| ViewResolver | 0x1d7e57aa55817448 | 0x631e88ae7f1d7c20 | 0xf8d6e0586b0a20c7 | |
| FlowFees | 0xf919ee77447b7497 | 0x912d5440f7e3769e | 0xe5a8b7f23e8b548f | |
| FlowServiceAccount | 0xe467b9dd11fa00df | 0x8c5303eaa26202d6 | 0xf8d6e0586b0a20c7 | |
| FlowStorageFees | 0xe467b9dd11fa00df | 0x8c5303eaa26202d6 | 0xf8d6e0586b0a20c7 | |
| NodeVersionBeacon | 0xe467b9dd11fa00df | 0x8c5303eaa26202d6 | 0xf8d6e0586b0a20c7 | |
| RandomBeaconHistory | 0xe467b9dd11fa00df | 0x8c5303eaa26202d6 | 0xf8d6e0586b0a20c7 | |
| FlowIDTableStaking | 0x8624b52f9ddcd04a | 0x9eca2b38b18b5dfe | 0xf8d6e0586b0a20c7 | |
| FlowEpoch | 0x8624b52f9ddcd04a | 0x9eca2b38b18b5dfe | 0xf8d6e0586b0a20c7 | |
| FlowClusterQC | 0x8624b52f9ddcd04a | 0x9eca2b38b18b5dfe | 0xf8d6e0586b0a20c7 | |
| FlowDKG | 0x8624b52f9ddcd04a | 0x9eca2b38b18b5dfe | 0xf8d6e0586b0a20c7 | |
| FlowStakingCollection | 0x8d0e87b65159ae63 | 0x95e019a17d0e23d7 | 0xf8d6e0586b0a20c7 | |
| LockedTokens | 0x8d0e87b65159ae63 | 0x95e019a17d0e23d7 | 0xf8d6e0586b0a20c7 | |
| StakingProxy | 0x62430cf28c26d095 | 0x7aad92e5a0715d21 | 0xf8d6e0586b0a20c7 | |
| EVM | 0xe467b9dd11fa00df | 0x8c5303eaa26202d6 | 0xf8d6e0586b0a20c7 | |
| FlowEVMBridge ¹ | 0x1e4aa0b87d10b141 | 0xdfc20aee650fcbdf | 0xf8d6e0586b0a20c7 | |
| NFTStorefrontV2 | 0x1d7e57aa55817448 | 0x2d55b98eb200daef | 0xf8d6e0586b0a20c7 | |
| HybridCustody | 0xd8a7e05a7ac670c0 | 0x294e44e1ec6993c6 | 0xf8d6e0586b0a20c7 | |
| CapabilityFactory | 0xd8a7e05a7ac670c0 | 0x294e44e1ec6993c6 | 0xf8d6e0586b0a20c7 | |
| CapabilityFilter | 0xd8a7e05a7ac670c0 | 0x294e44e1ec6993c6 | 0xf8d6e0586b0a20c7 | |
| CapabilityDelegator | 0xd8a7e05a7ac670c0 | 0x294e44e1ec6993c6 | 0xf8d6e0586b0a20c7 |
¹ The EVM bridge account hosts many contracts beyond FlowEVMBridge itself (FlowEVMBridgeConfig, FlowEVMBridgeUtils, FlowEVMBridgeNFTEscrow, FlowEVMBridgeTokenEscrow, CrossVMNFT, CrossVMToken, and more). Run flow accounts get 0x1e4aa0b87d10b141 --network mainnet for the current deployed contract list, or check the flow-evm-bridge repo for available scripts.
Cadence Script Recipes & Data Structures
See cadence-scripts.md for 20+ ready-to-use Cadence scripts organized by category:
- Token queries — FLOW balance, total supply, generic FT balance, FT metadata
- Account & storage — storage capacity, available balance, account creation fee, fee parameters
- Epoch — counter, phase, metadata, timing config
- Staking — node info, staked node IDs, total staked, by role, requirements, rewards, delegator info, staking collections
- Protocol — node version beacon, random beacon source
- NFT — collection IDs, NFT metadata (Display)
- Key data structures — NodeInfo, DelegatorInfo, EpochMetadata, EpochPhase, Node Roles
Common Event Types
| Event | Description | |
|---|---|---|
A.f233dcee88fe0abe.FungibleToken.Deposited | Any fungible token deposited | |
A.f233dcee88fe0abe.FungibleToken.Withdrawn | Any fungible token withdrawn | |
A.f233dcee88fe0abe.FungibleToken.Burned | Any fungible token burned | |
A.1d7e57aa55817448.NonFungibleToken.Deposited | Any NFT deposited to a collection | |
A.1d7e57aa55817448.NonFungibleToken.Withdrawn | Any NFT withdrawn from a collection | |
A.8624b52f9ddcd04a.FlowEpoch.NewEpoch | New epoch started | |
A.8624b52f9ddcd04a.FlowEpoch.EpochSetup | Epoch setup phase began | |
A.8624b52f9ddcd04a.FlowEpoch.EpochCommit | Epoch commit phase began | |
A.8624b52f9ddcd04a.FlowIDTableStaking.NewNodeCreated | New staking node registered | |
A.8624b52f9ddcd04a.FlowIDTableStaking.TokensCommitted | Tokens committed to stake | |
A.8624b52f9ddcd04a.FlowIDTableStaking.RewardsPaid | Staking rewards distributed | |
A.8624b52f9ddcd04a.FlowIDTableStaking.NewDelegatorCreated | New delegator registered | |
A.f919ee77447b7497.FlowFees.FeesDeducted | Transaction fees paid | |
A.f919ee77447b7497.FlowFees.TokensDeposited | Fees deposited to fee vault |
Available Script Libraries
For more complex queries, clone these repos to /tmp and use their scripts directly:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 82 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/query-blockchain/SKILL.md
Popularity
- Repository stars
- 211
- Repository forks
- 84
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/onflow/flow-cli/query-blockchain)