Step 14 of 14
Reading Miner Code (Without Coding)
You don't need to be a programmer to understand how a Bittensor miner works. This page teaches you how to use Claude Code to read, analyze, and understand any subnet's codebase — without writing a single line of code yourself.
1. You Don't Read Code — Claude Does
The miner code for each subnet is on GitHub — a website where programmers share code. Think of GitHub as a library, but instead of books, it stores code projects.
Every subnet has a repository (called a "repo" for short) — a folder of code files that make the miner work. A typical repo has hundreds or thousands of files: Python scripts, configuration files, documentation, and more.
Here's the key insight: you don't need to understand any of that code. What you need is to ask Claude the right questions about it.
- Claude reads thousands of lines of code in seconds and explains it in plain English.
- Claude finds the important parts — the scoring function, hardware requirements, configuration options — without you having to search through files.
- Claude translates programmer language into concepts you already understand: competition, scoring, cost, risk.
This is what makes your role possible. You can understand any subnet without being a programmer — you just need to know what to ask.
2. What to Look For in Every Subnet
Every time you analyze a new subnet's repo, ask Claude these 5 essential questions. They give you a complete picture of whether the subnet is worth mining.
| Question | Why it matters | Example prompt for Claude |
|---|---|---|
| What does this subnet do? | Understand the AI service it provides | "What does this subnet do? Explain it in simple terms." |
| How are miners scored? | The scoring function determines who earns the most | "Analyze the scoring/reward function. How are miners evaluated? What makes a miner score high vs low?" |
| What hardware is needed? | Determines your cost | "What are the hardware requirements? Does it need a GPU? How much RAM and storage?" |
| How competitive is it? | More competition = harder to earn | "How difficult is it to compete as a new miner? What do the top miners do differently?" |
| Has anything changed recently? | Code changes affect profitability | "What changed in the last 5 commits? Did the scoring function change?" |
3. The Scoring Function — Most Important Part
Every subnet has a "scoring function" (also called a "reward function") — the rules that determine who gets paid and how much. Understanding this is like knowing the exam questions before taking the test.
If you only analyze one thing in a repo, make it the scoring function. Everything else is secondary.
Types of Scoring
| Scoring type | How it works | Example |
|---|---|---|
| Model quality | Your AI model produces better results than others | Language models, image generators, speech recognition |
| Data quality | You provide better or more data than others | Web scraping, data collection, indexing |
| Compute proof | You prove you did computational work | Solving math problems, running simulations |
| Hybrid | Combination of the above | Model quality + data quality together |
Once you know the type, you can ask Claude more targeted questions:
The answers tell you exactly what you need to compete. If it's model quality, you need the best model. If it's data quality, you need the best data sources. If it's compute proof, you need the fastest hardware.
4. Using GSD to Map a Codebase
Here's the step-by-step process for analyzing any subnet's code. You do everything from Agent Deck — no terminal commands needed.
- Create a new session in Agent Deck. Press
Nto create a new session, and name it after the subnet (for example, "subnet-42-analysis"). - Claude Code opens in the new session. You're now in a fresh workspace ready to work.
- Tell Claude to clone the repo. Give Claude the GitHub URL and ask it to download the code:
"Clone https://github.com/example/subnet-42 into this directory"
- Use GSD to get organized. GSD creates a structured analysis of the entire codebase:
# Initialize the project structure
"/gsd:new-project"# Claude analyzes the entire codebase and creates a summary
"/gsd:map-codebase" - Now ask your questions. With the codebase mapped, Claude has full context. Ask the 5 essential questions from Section 2, plus any specific questions about the scoring function.
After this process, you have a complete picture of the subnet: what it does, how it scores miners, what hardware it needs, and how competitive it is. All without reading a single line of code.
5. Red Flags to Watch For
When Claude analyzes a subnet for you, watch for these warning signs. They don't always mean "stay away" — but they should make you cautious and do extra research before committing hardware.
| Red flag | What it means | What to do |
|---|---|---|
| Scoring function changed recently | Rules changed, old strategies might not work | Wait and observe for 1–2 weeks before entering |
| Very few miners (< 10) | Subnet might be dying or experimental | Check community health in Nexus |
| No documentation | Hard to understand, risky to enter | Ask Claude to analyze anyway — but flag as high risk |
| Single validator controls most weight | One entity decides who gets paid | High centralization risk — be cautious |
| Requires very expensive hardware | High cost = high risk if earnings drop | Calculate exact cost vs. earnings before entering |
6. Putting It All Together
Let's walk through a complete example from start to finish. Imagine Nexus recommends subnet 111 (Google Maps review provision). Here's exactly what you'd do:
- Start with Nexus. Ask:
"Give me the full report for subnet 111"— note the metrics, emission rate, miner count, and recommendation. - Open Agent Deck. Press
Nto create a new session. Name it "subnet-111". Select the Claude Code tool. - Clone the code. In Claude Code, say:
"Clone the Bittensor subnet 111 repo from GitHub" - Understand the task. Ask:
"What does this miner do? Explain the task in simple terms." - Analyze the scoring. Ask:
"Analyze the scoring function. What determines which miners get the highest rewards?" - Check hardware needs. Ask:
"What hardware do I need? Can I run this on a rented GPU or just CPU?" - Assess the risks. Ask:
"What are the biggest risks or challenges for a new miner entering this subnet?" - Write up your findings. Compile everything into a short summary for your team lead: what the subnet does, the scoring type, hardware cost, competition level, red flags, and your recommendation (MINE, SKIP, or WATCH).