Install
openclaw skills install dagny-nostr-nakManage Nostr posting and engagement via the nak CLI. Use for creating notes, replying in threads, tagging npubs, checking replies/mentions, monitoring a relay (default wss://relay.primal.net), and publishing events with correct root/reply tags. Requires access to NOSTR_SECRET_KEY (nsec) for signing/publishing.
openclaw skills install dagny-nostr-nakUse nak for all Nostr actions: publish notes, reply in threads, and query relays for replies/mentions. Default relay: wss://relay.primal.net unless the user specifies another.
curl -sSL https://raw.githubusercontent.com/fiatjaf/nak/master/install.sh | shnak key generate (prints nsec + npub)NOSTR_SECRET_KEY in a shell profile or a local .env with restricted permissions.
export NOSTR_SECRET_KEY="nsec1..."chmod 600 .env if you store it locally.--sec in commands.nak event -k 1 --sec $NOSTR_SECRET_KEY -c "..." <relay>root and reply tags (see below)nak req -k 1 -e <event_id> -l <N> <relay>nak req -k 1 -p <your_pubkey_hex> -l <N> <relay>nak event -k 1 --sec $NOSTR_SECRET_KEY -c "<content>" wss://relay.primal.net
Always include both root and reply tags so clients display it as a reply:
root = original top‑level note idreply = the specific note you’re replying toUse -t e="<id>;<relay>;root" and -t e="<id>;<relay>;reply".
Example:
nak event -k 1 --sec $NOSTR_SECRET_KEY \
-t e="<root_id>;wss://relay.primal.net;root" \
-t e="<reply_id>;wss://relay.primal.net;reply" \
-p <other_pubkey_hex> \
-c "<reply content>" \
wss://relay.primal.net
nak req -k 1 -e <root_id> -l 20 wss://relay.primal.net
nak req -k 1 -p <your_pubkey_hex> -l 20 wss://relay.primal.net
wss://relay.primal.netNOSTR_SECRET_KEY env var instead of inline --sec.-p <npub/hex>.nak encode nevent ... and format as https://primal.net/e/<nevent>.nak event --help and nak req --help for flag details.