Nostr Thread Rendering (skill)
Threads
A thread is one root of any kind plus responses that point at that root or at a descendant already in the thread.
| Term | Meaning |
|---|---|
| OP | An original post of any kind with no thread tags. |
| Reply | Kind 1 with NIP-10 thread tags. Only valid onto a kind 1 parent. |
| Response | Any event that references something higher in the thread (1111, replies, 1244, quotes, highlights, …). |
Publish
| Parent | Default text response | Also offer a reply (kind 1)? |
|---|---|---|
| Kind 1 reply | Kind 1 (another reply) | -- |
| Kind 1 original | Kind 1111 | Yes |
| Any other kind | Kind 1111 | No |
Tag shapes
NIP-22 uppercase (E / A / P) uses the same field order as lowercase (e / a / p). Replies use the NIP-10 e row, not NIP-01.
| Tag | When | Fields |
|---|---|---|
e / E | NIP-01 and NIP-22 | id, relay (optional), author pubkey (optional) |
e | Reply (NIP-10) | id, relay, marker (root \ |
p / P | Mentions / NIP-22 authors | pubkey, relay (optional) |
a / A | Addressable (30000–39999) | kind:pubkey:d-tag, relay (optional) |
a / A | Replaceable (0, 3, 10000–19999) | kind:pubkey: (keep the trailing colon), relay (optional) |
Hex ids and pubkeys are 32-byte lowercase.
Kind 1111 (NIP-22 comment = a response, not a reply)
| Role | Pointer | Kind (required) | Author if tagging a Nostr event |
|---|---|---|---|
| Root | A / E / I | K | P |
| Parent | a / e / i | k | p |
Omit P / p on I/i-only scopes (URL, hashtag, geohash, podcast, …).
| Target | Root | Parent |
|---|---|---|
| Regular event | E | e (same id if top-level) |
| Addressable / replaceable | A only (no required root E) | a and e (this version's id) |
| NIP-73 scope | I | Top-level: i = I. Nested: keep I; parent is e on the 1111 |
Nested 1111 responses copy the uppercase root; lowercase tags point at the parent response (e, k = that event's kind).
Kind 1 replies (NIP-10)
| Responding to | e tags |
|---|---|
| The kind 1 OP | One e with marker root |
| A nested reply | root, then marker reply (the parent reply) |
Copy the parent's p tags and add the author of the parent.
Prefer marked e tags. Still render deprecated positional threads (first e = root, last = parent).
Display
| Surface | What |
|---|---|
| Main thread rows | Replies and kind 1111 responses, on every OP kind |
| On those rows (not extra rows) | Zap counts (BTC and/or XMR), reactions as badges or counts, boost badges, kind 9802 highlights, and the one-line embed card for any nostr:naddr / nevent / note (or q / kind 1 a) the row cites — same card as Quotes |
| Quotes subsection | Kind 1 quotes: NIP-18 q, or embedding in content (nostr:naddr, nostr:nevent, **nostr:note1**). Embedding is quoting, including older notes with a bare note1 and no q/a/e tags. |
| Below the fold / subsection | Other responses: kind 1244, bookmarks, … Unknown kind → generic card |
Kind 9802 highlights mark the quoted span on the event they reference (OP or a thread row). They are decorations on that text — same category as reactions and boosts — not extra thread rows and not quote cards below the fold.
Do not put an embedded-OP note — or a kind 1 whose body is a note1/nevent/naddr embed-quote — in Other responses.
Nest on the parent: NIP-22 lowercase e / a / i; for replies, the NIP-10 reply marker when both root and reply exist. If lowercase parent tags are present, ignore uppercase E / A / I as the parent. Missing parent → still show the row at top-level.
Fetch without restricting kinds: e E a A q, plus I/i for NIP-73 scopes.
Comments / responses filter: kind 1111 comments and legacy kind 1 replies.
I / i value | Card |
|---|---|
| http(s) URL | OpenGraph, or a fallback card |
| Geohash, hashtag, podcast, … | An appropriate non-OG card |