Help us improve
Share bugs, ideas, or general feedback.
From nostr
Mine a Nostr keypair with a vanity pubkey prefix or target difficulty using rana. Use when the user wants to generate a Nostr public key that starts with specific hex characters, a specific npub prefix/suffix, or meets a minimum proof-of-work difficulty. Requires rana installed in PATH.
npx claudepluginhub cameri/claude-skills --plugin nostrHow this skill is triggered — by the user, by Claude, or both
Slash command
/nostr:mine-pubkeyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
Creates p5.js generative art with seeded randomness, noise fields, and interactive parameter exploration. Use for algorithmic art, flow fields, or particle systems.
Share bugs, ideas, or general feedback.
<essential_principles>
rana must be installed (which rana). If missing, tell the user to install it: cargo install rananpub1 — when the user wants npub10000, the vanity part is 0000 after the mandatory npub1 prefix.
</essential_principles>Ask the user which type of target they want:
dead, 0000, cafe (hex chars only)npub1rana, npub10000 (bech32 chars: qpzry9x8gf2tvdw0s3jn54khce6mua7l)20)Also ask for number of cores to use (default: all available).
Step 2 — Check rana is installed
which rana || echo "NOT FOUND"
If not found, stop and tell the user: rana is required. Install with: cargo install rana
Step 3 — Build the rana command
| Target type | Flag | Example |
|---|---|---|
| Hex prefix | --vanity=<hex> | rana --vanity=dead |
| npub prefix | --vanity-n-prefix=<prefix> | rana --vanity-n-prefix=npub1rana |
| npub suffix | --vanity-n-suffix=<suffix> | rana --vanity-n-suffix=end |
| Difficulty | --difficulty=<n> | rana --difficulty=20 |
| Multiple npub targets | -n=<a>,<b>,<c> | rana -n=rana,h0dl |
Add --cores=<n> if the user specified a core count.
Note: Cannot combine --vanity (hex) with --vanity-n-prefix/suffix or --difficulty. Pick one mode.
Step 4 — Start background job
Save output to a temp file, run in background:
OUTFILE=$(mktemp /tmp/rana-XXXXXX.txt)
echo "Output: $OUTFILE"
rana <flags> > "$OUTFILE" 2>&1 &
echo "PID: $!"
Tell the user: mining has started, PID and output file location.
Step 5 — Monitor for completion
Poll the output file every 10–30 seconds. Rana prints a result line when it finds a match. Look for lines containing nsec and pubkey.
cat "$OUTFILE"
When a result appears, extract and display:
Step 6 — Report result
Present the result clearly:
✓ Found matching keypair!
pubkey: <hex>
npub: <npub1...>
nsec: <nsec1...> ⚠️ Keep this secret — it's your private key
To configure Claude's Nostr channel with this key:
/nostr:configure <nsec>
Offer to configure the Nostr channel automatically with the new key if desired.
<difficulty_guide> Expected mining time (rough estimates, single core):
| Target | Difficulty | ~Time |
|---|---|---|
1 hex char (a) | 4 bits | instant |
2 hex chars (de) | 8 bits | < 1s |
4 hex chars (dead) | 16 bits | seconds |
6 hex chars (dead00) | 24 bits | minutes |
8 hex chars (deadbeef) | 32 bits | hours |
npub prefix npub1rana | ~20 bits | minutes |
More cores = proportionally faster. Use --cores=$(nproc) for maximum speed.
</difficulty_guide>
<success_criteria>