A Claude Code skill that finds every Bitaxe-family miner on your network and repoints them all at the 256 Foundation pool under a venue's Nostr npub — with a consistent, dashboard-friendly worker-naming convention — then hands you a clean overview.
It works across stock Bitaxe (ESP-Miner / AxeOS) and the NerdQAxe firmware fork, and its helper scripts are plain, dependency-free Python you can also run by hand.
Made for the kind of setup where a bunch of solo-lottery Bitaxes live at a bar, meetup, or lab and you want them all mining to the house npub in one move.
Say something like "I'm at PubKey — scan the network and switch all the bitaxes over to the 256 pool under PubKey's npub." The skill runs the whole flow:
- Scans the current subnet (and any extra ranges you name) for miners — identified by the AxeOS API, not just an open port 80.
- Asks where you are and resolves that venue's Nostr npub from an authoritative source — the venue's own self-hosted NIP-05 identity — and verifies it before trusting it.
- Repoints every miner to
pool.256foundation.org:3333with username<npub>.<venue>-bitaxeNNN, restarts them, and confirms each reconnects and hashes. - Prints an overview and flags anything odd (a miner with no fallback, one hashing under spec, etc.).
| Setting | Value |
|---|---|
| Pool | pool.256foundation.org:3333 (primary stratum on every miner) |
| Username | <npub>.<venue>-bitaxeNNN — zero-padded index assigned in IP order |
| Hostnames | left untouched — the stratum username identifies the miner to the pool, not the device name |
| Fallback pools | left untouched — the safety net stays put |
Example (venue = PubKey, npub npub1key55…):
npub1key55ax33gkl50uqemvl4khrtqrhzm7wzpc7fhseutt5ddkcwcrqgxlt3h.pubkey-bitaxe001
npub1key55ax33gkl50uqemvl4khrtqrhzm7wzpc7fhseutt5ddkcwcrqgxlt3h.pubkey-bitaxe002
npub1key55ax33gkl50uqemvl4khrtqrhzm7wzpc7fhseutt5ddkcwcrqgxlt3h.pubkey-bitaxe003
Skills live in ~/.claude/skills/. Clone this repo into that directory:
git clone https://github.com/Schnitzel/skill-bitaxe-repool.git ~/.claude/skills/bitaxe-repoolClaude Code picks it up automatically. Verify with /skills (or just ask Claude to "scan for bitaxes").
Requirements: Python 3 (standard library only — no pip install), and network reachability to the miners' HTTP API.
Once installed, natural-language prompts trigger it:
- "scan the network for bitaxes"
- "I'm at PubKey, switch all the miners over to the 256 pool under their npub"
- "look up the npub for <venue> and repoint the axes"
- "what pool are my bitaxes on right now?"
Claude reads SKILL.md, runs the scripts, and confirms the npub with you before changing anything.
The three helpers are self-contained and useful on their own.
Scan for miners (auto-detects the current /24, or takes explicit CIDRs):
python3 scripts/scan.py # current subnet
python3 scripts/scan.py 10.0.5.0/24 192.168.50.0/24Resolve a venue's npub from its self-hosted NIP-05, or convert a hex key:
python3 scripts/npub.py from-domain pubkey.bar # every name -> hex -> npub
python3 scripts/npub.py hex2npub <64-char-hex> # NIP-19 bech32 encodeRepoint the miners (preview with --dry-run, then run for real):
python3 scripts/apply.py --npub <npub> --venue pubkey \
--ips 10.0.5.11,10.0.5.12,10.0.5.13 --dry-runapply.py sets only the primary stratum (URL/port/user), restarts each miner, and polls until it's back on the new pool and hashing. Hostnames and fallback pools are never touched.
The worker username routes pool attribution to a Nostr identity — so getting the npub right matters, and the skill never guesses one. It prefers the venue's self-hosted NIP-05 file (https://<domain>/.well-known/nostr.json), because a key served from the venue's own domain can't be spoofed by a third party. It then verifies the resulting npub resolves to the expected profile (via njump.me) before anything is applied. npub.py does the bech32 (NIP-19) encoding locally with no external dependencies.
Both stock Bitaxe (ESP-Miner) and the NerdQAxe fork expose the same shape:
| Call | Purpose |
|---|---|
GET /api/system/info |
Full status + config (the Bitaxe fingerprint) |
PATCH /api/system |
Update stratumURL / stratumPort / stratumUser / stratumPassword |
POST /api/system/restart |
Apply a stratum change (miner reconnects on boot) |
A PATCH frequently drops the TCP socket right after applying — an empty/000 response is normal, so the scripts confirm with a read-back rather than trusting the HTTP code. The "connected to primary vs fallback" check differs by firmware (NerdQAxe uses stratum.pools[].connected; stock AxeOS uses wifiStatus + isUsingFallbackStratum); apply.py handles both.
- Read-only by default.
scan.pyandnpub.pynever write anything.apply.pyonly mutates when run without--dry-run. - npub is verified, never guessed — the one costly, silent mistake this domain has, and the skill is built to avoid it.
- Reversible. To revert, repoint each miner's
stratumURL/stratumUserand restart.
- 256 Foundation — the open pool these miners point at: https://pool.256foundation.org
- Bitaxe (open-source solo miner) and the NerdQAxe firmware fork.
- Nostr NIP-05 / NIP-19 for identity + npub encoding.
- The PubKey example uses PubKey's public Nostr identity.
- Built as a skill for Claude Code.
MIT © Michael Schmid