contract-query

Query NEAR smart contracts for read-only data using near-cli-rs.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/jlwaugh/legion-social --skill contract-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-query
Source: https://github.com/jlwaugh/legion-social/tree/main/.claude/skills/contract-query
Command: npx skills add https://github.com/jlwaugh/legion-social --skill contract-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies querying NEAR blockchain smart contracts, making it easier to retrieve information about NFTs and other contract states without complex command-line arguments.

Core Features & Use Cases

  • Contract Interaction: Query specific methods on NEAR contracts like "legion" and "initiate".
  • Simplified Arguments: Easily pass JSON arguments for methods like nft_token or nft_tokens_for_owner.
  • Use Case: Quickly check the total supply of NFTs on the "legion" contract or find all NFTs owned by a specific account.

Quick Start

Use the contract-query skill to find the total supply of NFTs on the legion contract.

Frequently Asked Questions about contract-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query a NEAR smart contract to check NFT total supply?

Query NFT total supply on NEAR smart contracts by mapping shortcut names like "legion" to full contract IDs and executing methods with JSON arguments to retrieve contract state and display results with timing information.

Can I find all NFTs owned by a specific account on the NEAR blockchain?

Find all NFTs owned by a specific NEAR account by executing methods like nft_tokens_for_owner with JSON arguments. The query maps contract shortcuts to full IDs to retrieve and display the account's NFT state.

Does querying NEAR contracts require complex command-line arguments?

Querying NEAR contracts does not require complex command-line arguments. The process simplifies interaction by mapping shortcuts to full contract IDs and easily passing JSON arguments for methods like nft_token to retrieve contract state.

What is the easiest way to retrieve read-only information from NEAR NFT contracts?

Retrieve read-only information from NEAR NFT contracts by using shortcuts like legion or initiate that automatically map to full contract IDs. Execute specified methods with JSON arguments to get contract state and timing details.

How do I pass JSON arguments when querying a NEAR contract method?

Pass JSON arguments when querying a NEAR contract method by specifying the method name, such as nft_token, alongside the JSON input. This retrieves the specific contract state and displays the results with execution timing information.