2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill dagny-nostr-nak- _meta.json471 B
- SKILL.md2.8 KB
Overview
This skill manages Nostr posting and engagement using the nak CLI. It provides commands and conventions to create notes, reply in threaded conversations, monitor replies and mentions, and publish events with correct root/reply tags. Default relay is wss://relay.primal.net unless another relay is specified.
How this skill works
The skill issues nak CLI commands to generate keys, publish events, and query relays. It builds properly tagged Nostr events (root and reply e-tags, p-tags for pubkeys), sets the secret key via environment variables, and queries a relay for replies or mentions. Commands are examples you can run directly or adapt into scripts.
When to use it
- Publishing a standalone Nostr note from the command line
- Posting a reply inside a threaded conversation with correct root/reply tags
- Checking who replied to a particular note or viewing recent mentions
- Monitoring a relay for new events or building automation around Nostr activity
- Encoding human-facing Nostr links for sharing
Best practices
- Store your private key in NOSTR_SECRET_KEY rather than passing --sec inline
- Always include both root and reply e-tags when replying in threads so clients show proper threading
- Specify the relay explicitly when needed; default is wss://relay.primal.net
- Include p-tags for any other pubkeys you reference so clients can surface mentions
- Use nak req with limits (-l) when polling a relay to avoid large unwieldy queries
Example use cases
- Create and publish a new note: nak event -k 1 --sec $NOSTR_SECRET_KEY -c "..." wss://relay.primal.net
- Reply to a thread with correct tags: add -t e="<root_id>;wss://relay.primal.net;root" and -t e="<reply_id>;wss://relay.primal.net;reply"
- Check replies to a root note: nak req -k 1 -e <root_id> -l 20 wss://relay.primal.net
- List mentions of your pubkey: nak req -k 1 -p <your_pubkey_hex> -l 20 wss://relay.primal.net
- Generate keys and save secret: nak key generate, then export NOSTR_SECRET_KEY="nsec1..."
FAQ
Run nak key generate to create nsec and npub. Store the nsec value in NOSTR_SECRET_KEY in your shell profile or a local .env file; avoid passing it in commands.
What tags are required for proper threading?
Include both a root e-tag pointing to the top-level note and a reply e-tag for the specific note you respond to. Use -t e="<id>;<relay>;root" and -t e="<id>;<relay>;reply".