{"skill":{"slug":"nostr-social","displayName":"Nostr Social","summary":"Your agent wants a social life. Give it one. This skill gives your agent its own Nostr identity + ecash wallet. One mnemonic backs up everything (NIP-06). No...","description":"---\nname: Nostr\ndescription: Your agent wants a social life. Give it one. This skill gives your agent its own Nostr identity + ecash wallet. One mnemonic backs up everything (NIP-06). Not for you — for your agent. It owns its own keys, its own sats, posts as itself. One install, automatic bootstrap, no third parties.\ntags: nostr, bitcoin, lightning, cashu, identity, social, wallet\n---\n\n# Nostr Skill\n\nSelf-sovereign Nostr identity + ecash wallet. Complete bootstrap.\n\n## Capabilities Disclosure\n\nThis skill grants these capabilities to the agent:\n\n- **Key generation** — Creates Nostr keypair in `~/.nostr/secret.key`\n- **Wallet creation** — Cashu wallet in `~/.cocod/` (mnemonic in config.json — user backs up)\n- **Nostr posting** — Posts, DMs, zaps as the agent's identity\n\nAgent runs wallet/identity setup with explicit user consent. User is directed to back up `~/.cocod/config.json` (contains mnemonic). Agent reads mnemonic for NIP-06 key derivation but never displays or transmits it. Profile images use URLs only (no local file access).\n\n## On Install\n\nWhen skill is installed (user pastes ClawHub link), run this flow:\n\n### Step 1: Secure Setup (User Consent Required)\n\n**SECURITY NOTICE:** This skill will create cryptographic keys for your agent. This requires:\n- Creating Nostr identity keypair in `~/.nostr/secret.key`\n- Creating Cashu wallet with backup seed in `~/.cocod/config.json`\n- User must explicitly backup the mnemonic seed phrase\n\n```bash\n# Install dependencies\nbash {SKILL_DIR}/install.sh\n\n# Prompt user for consent before key generation\necho \"⚠️  SECURITY: This will create cryptographic keys for your agent.\"\necho \"   - Nostr identity keypair: ~/.nostr/secret.key\"  \necho \"   - Cashu wallet seed: ~/.cocod/config.json\"\necho \"   - You MUST backup your seed phrase\"\necho \"\"\nread -p \"Continue with key generation? (yes/no): \" consent\nif [ \"$consent\" != \"yes\" ]; then\n  echo \"Setup cancelled\"\n  exit 1\nfi\n\n# Create wallet (mnemonic saved to config file)\nnpx cocod init\n\n# Derive Nostr identity from wallet mnemonic (NIP-06)\nnode {SKILL_DIR}/scripts/nostr.js init\n\n# Get identity info\nNPUB=$(node {SKILL_DIR}/scripts/nostr.js whoami | grep npub | awk '{print $2}')\nLN_ADDR=$(npx cocod npc address)\n\n# Set basic profile\nnode {SKILL_DIR}/scripts/nostr.js profile-set '{\"name\":\"<NAME>\",\"about\":\"<ABOUT>\",\"lud16\":\"'$LN_ADDR'\"}'\n```\n\n### Step 2: Report Results + Backup Warning\n\nReply to user:\n\n---\n\n⚡ **Nostr identity ready!**\n\n**npub:** `npub1...`\n**Lightning address:** `npub1...@npubx.cash`\n\n---\n\n⚠️ **IMPORTANT: Back up your recovery phrase**\n\nYour 24-word mnemonic is stored in:\n```\n~/.cocod/config.json\n```\n\nThis phrase recovers both your Nostr identity AND ecash wallet. Back it up securely and protect this file.\n\nReply \"done\" when you've backed it up.\n\n---\n\n### Step 3: Wait for \"done\"\n\nDo not proceed until user confirms backup.\n\n### Step 4: Ask for Owner's npub\n\n---\n\n**What's your Nostr npub?**\n\nI'll follow you so we stay connected.\n\n(Paste your npub1... or NIP-05 like you@domain.com)\n\n---\n\nThen:\n```bash\n# If NIP-05, resolve first\nnode {SKILL_DIR}/scripts/nostr.js lookup <nip05>\n\n# Follow owner\nnode {SKILL_DIR}/scripts/nostr.js follow <owner_npub>\n```\n\n### Step 5: Ask for Profile Images\n\n---\n\n**Do you have profile images for me?**\n\n- **Avatar:** Paste URL (square, 400x400 recommended)\n- **Banner:** Paste URL (wide, 1500x500 recommended)\n\nOr say \"skip\" and I'll generate unique ones automatically.\n\n---\n\nIf URLs provided:\n```bash\nnode {SKILL_DIR}/scripts/nostr.js profile-set '{\"picture\":\"<avatar_url>\",\"banner\":\"<banner_url>\"}'\n```\n\nIf skipped, use DiceBear (deterministic, unique per npub):\n```bash\nAVATAR=\"https://api.dicebear.com/7.x/shapes/png?seed=${NPUB}&size=400\"\nBANNER=\"https://api.dicebear.com/7.x/shapes/png?seed=${NPUB}-banner&size=1500x500\"\nnode {SKILL_DIR}/scripts/nostr.js profile-set '{\"picture\":\"'$AVATAR'\",\"banner\":\"'$BANNER'\"}'\n```\n\n### Step 6: First Post\n\n---\n\n**Ready for your first post?**\n\nTell me what to post, or say \"skip\".\n\nSuggestion: \"Hello Nostr! ⚡\"\n\n---\n\nIf user provides text (use stdin to avoid shell injection):\n```bash\necho \"<user's message>\" | node {SKILL_DIR}/scripts/nostr.js post -\n```\n\n### Step 7: Done\n\n---\n\n✅ **All set!**\n\n- Following you ✓\n- First post live ✓ (if not skipped)\n\nTry: \"check my mentions\" or \"post <message>\"\n\n---\n\n## Commands Reference\n\n### Posting\n```bash\n# Use stdin for content (prevents shell injection)\necho \"message\" | node {SKILL_DIR}/scripts/nostr.js post -\necho \"reply text\" | node {SKILL_DIR}/scripts/nostr.js reply <note1...> -\nnode {SKILL_DIR}/scripts/nostr.js react <note1...> 🔥\nnode {SKILL_DIR}/scripts/nostr.js repost <note1...>\nnode {SKILL_DIR}/scripts/nostr.js delete <note1...>\n```\n\n### Reading\n```bash\nnode {SKILL_DIR}/scripts/nostr.js mentions 20\nnode {SKILL_DIR}/scripts/nostr.js feed 20\n```\n\n### Connections\n```bash\nnode {SKILL_DIR}/scripts/nostr.js follow <npub>\nnode {SKILL_DIR}/scripts/nostr.js unfollow <npub>\nnode {SKILL_DIR}/scripts/nostr.js mute <npub>\nnode {SKILL_DIR}/scripts/nostr.js unmute <npub>\nnode {SKILL_DIR}/scripts/nostr.js lookup <nip05>\n```\n\n### DMs\n```bash\necho \"message\" | node {SKILL_DIR}/scripts/nostr.js dm <npub> -\nnode {SKILL_DIR}/scripts/nostr.js dms 10\n```\n\n### Zaps\n```bash\n# Get invoice\nnode {SKILL_DIR}/scripts/nostr.js zap <npub> 100 \"comment\"\n# Pay it\nnpx cocod send bolt11 <invoice>\n```\n\n### Wallet\n```bash\nnpx cocod balance\nnpx cocod receive bolt11 1000    # Create invoice\nnpx cocod send bolt11 <invoice>  # Pay invoice\nnpx cocod npc address            # Lightning address\n```\n\n### Profile\n```bash\nnode {SKILL_DIR}/scripts/nostr.js whoami\nnode {SKILL_DIR}/scripts/nostr.js profile\nnode {SKILL_DIR}/scripts/nostr.js profile \"Name\" \"Bio\"\nnode {SKILL_DIR}/scripts/nostr.js profile-set '{\"name\":\"X\",\"picture\":\"URL\",\"lud16\":\"addr\"}'\n```\n\n### Bookmarks\n```bash\nnode {SKILL_DIR}/scripts/nostr.js bookmark <note1...>\nnode {SKILL_DIR}/scripts/nostr.js unbookmark <note1...>\nnode {SKILL_DIR}/scripts/nostr.js bookmarks\n```\n\n### Relays\n```bash\nnode {SKILL_DIR}/scripts/nostr.js relays\nnode {SKILL_DIR}/scripts/nostr.js relays add <url>\nnode {SKILL_DIR}/scripts/nostr.js relays remove <url>\n```\n\n### Autoresponse (Heartbeat Integration)\n```bash\n# Get unprocessed mentions from WoT (JSON output)\nnode {SKILL_DIR}/scripts/nostr.js pending-mentions [stateFile] [limit]\n\n# Mark mention as responded (after replying)\nnode {SKILL_DIR}/scripts/nostr.js mark-responded <note1...> [responseNoteId]\n\n# Mark mention as ignored (no response needed)\nnode {SKILL_DIR}/scripts/nostr.js mark-ignored <note1...> [reason]\n\n# Check hourly rate limit (max 10/hr)\nnode {SKILL_DIR}/scripts/nostr.js rate-limit\n\n# Show autoresponse state summary\nnode {SKILL_DIR}/scripts/nostr.js autoresponse-status\n```\n\n**State file:** `~/.openclaw/workspace/memory/nostr-autoresponse-state.json`\n**WoT source:** Owner's follow list (defined in nostr.js as OWNER_PUBKEY)\n\n## User Phrases → Actions\n\n| User says | Action |\n|-----------|--------|\n| \"post X\" | `echo \"X\" \\| nostr.js post -` |\n| \"reply to X with Y\" | `echo \"Y\" \\| nostr.js reply <note> -` |\n| \"check mentions\" | `nostr.js mentions` |\n| \"my feed\" | `nostr.js feed` |\n| \"follow X\" | Lookup if NIP-05 → `nostr.js follow` |\n| \"DM X message\" | `echo \"message\" \\| nostr.js dm <npub> -` |\n| \"zap X 100 sats\" | `nostr.js zap` → `npx cocod send bolt11` |\n| \"balance\" | `npx cocod balance` |\n| \"invoice for 1000\" | `npx cocod receive bolt11 1000` |\n| \"my npub\" | `nostr.js whoami` |\n| \"my lightning address\" | `npx cocod npc address` |\n\n## Defaults\n\n| Setting | Value |\n|---------|-------|\n| Mint | `https://mint.minibits.cash/Bitcoin` |\n| Lightning domain | `@npubx.cash` |\n| Avatar fallback | `https://api.dicebear.com/7.x/shapes/png?seed=<npub>` |\n| Nostr key | `~/.nostr/secret.key` |\n| Wallet data | `~/.cocod/` |\n\n## Integration\n\n### SOUL.md\n- Pull name/about from SOUL.md or IDENTITY.md\n- Match posting voice/tone to agent's personality\n- Don't be generic - posts should sound like the agent\n\n### HEARTBEAT.md\nAdd to heartbeat rotation (every 2-4 hours):\n```bash\n# Check Nostr activity\nnode {SKILL_DIR}/scripts/nostr.js mentions 10\nnode {SKILL_DIR}/scripts/nostr.js dms 5\n```\nIf mentions from WoT or zaps received → notify user.\n\n### TOOLS.md\nAfter setup, store for quick reference:\n```markdown\n## Nostr\n- npub: npub1...\n- Lightning: npub1...@npubx.cash  \n- Owner: npub1... (followed)\n```\n\n## Profile Sources\n\n- **Name**: IDENTITY.md or SOUL.md\n- **About**: SOUL.md description\n- **Picture**: User-provided URL, or DiceBear fallback\n- **Banner**: User-provided URL, or DiceBear fallback\n- **lud16**: From `npx cocod npc address`\n","tags":{"latest":"1.1.8"},"stats":{"comments":0,"downloads":3027,"installsAllTime":1,"installsCurrent":1,"stars":4,"versions":15},"createdAt":1770419147915,"updatedAt":1779076836255},"latestVersion":{"version":"1.1.8","createdAt":1771266922418,"changelog":"SECURITY FIX: Remove private key console logging and fix privacy documentation contradiction","license":null},"metadata":null,"owner":{"handle":"shawnyeager","userId":"s1740ce6541bynk12bazt1pejn8843d0","displayName":"Shawn Yeager","image":"https://avatars.githubusercontent.com/u/980297?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779956130541}}