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 nostrThis skill uses the workspace's default tool permissions.
<objective>
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
<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. </process>
<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>