3
2
# Install this skill:
npx skills add KennethAshley/bittensor-skill

Or install specific skill: npx add-skill https://github.com/KennethAshley/bittensor-skill

# Description

Query Bittensor network using the Python SDK. Get metagraph data, subnet info, validator stats, and more. Use when user asks about TAO, subnets, validators, emissions, or staking.

# SKILL.md


name: bittensor
description: Query Bittensor network using the Python SDK. Get metagraph data, subnet info, validator stats, and more. Use when user asks about TAO, subnets, validators, emissions, or staking.


Bittensor SDK

Query the Bittensor decentralized AI network with structured JSON output.

SDK Scripts

Run scripts with Python (assumes bittensor installed):

# Top validators on a subnet
python scripts/metagraph.py --netuid 8 --top 5

# List all subnets  
python scripts/subnets.py

# Specify network
python scripts/metagraph.py --netuid 1 --network test

Available Scripts

Script Purpose Args
metagraph.py Subnet validators sorted by emission --netuid, --top, --network
subnets.py List all subnets --network

Output Format

All scripts return JSON:

{
  "netuid": 8,
  "name": "Vanta",
  "n_neurons": 256,
  "top_validators": [
    {"rank": 1, "name": "ฯ„aoshi validator", "emission": 147.67, "stake": 11859.70}
  ]
}

Common Queries

"Who are the top validators on subnet X?"

python scripts/metagraph.py --netuid X --top 10

"List all subnets"

python scripts/subnets.py

"What's the emission on SN8?"
Run metagraph.py and sum the emissions from top_validators.

CLI Fallback

For queries without SDK scripts, use btcli:

btcli wallet balance --wallet.name default
btcli stake list --wallet.name default
btcli subnets register --netuid 8 --wallet.name default

Networks

  • finney โ€” Mainnet (default)
  • test โ€” Testnet

# README.md

Bittensor Agent Skill

An agent skill for querying the Bittensor decentralized AI network using the Python SDK and CLI.

Installation

Via skills.sh

npx skills add KennethAshley/bittensor-cli-skill@bittensor-cli

Manual

  1. Copy SKILL.md and scripts/ to your agent's skills directory
  2. Install requirements:
pip install bittensor

Features

  • Metagraph Queries โ€” Get top validators by emission, stake, or other metrics
  • Subnet Discovery โ€” List all subnets with stats
  • Wallet Management โ€” Check balances, stakes (via CLI)
  • Structured Output โ€” JSON responses for easy parsing

Requirements

SDK Scripts

Script Purpose Usage
metagraph.py Top validators on a subnet python scripts/metagraph.py --netuid 8 --top 5
subnets.py List all subnets python scripts/subnets.py

Example Output

{
  "netuid": 8,
  "network": "finney",
  "name": "Vanta",
  "n_neurons": 256,
  "total_stake": 2785896.58,
  "top_validators": [
    {
      "rank": 1,
      "name": "ฯ„aoshi validator",
      "stake": 11859.70,
      "emission": 147.67
    }
  ]
}

Usage Examples

Ask your agent:
- "Who are the top 5 validators on subnet 8 by emission?"
- "List all Bittensor subnets"
- "What's the total stake on SN1?"

Networks

  • finney โ€” Mainnet (default)
  • test โ€” Testnet

Pass --network test to query testnet.

License

MIT

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.