Agent skill

Nostr Addressable Event Dual Tag Query

by divinevideo in divinevideo/divine-mobile

Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999).

MPL-2.0Auto-check passedBackend & APIs

Install Nostr Addressable Event Dual Tag Query

skills CLI
$ npx skills add divinevideo/divine-mobile --skill nostr-addressable-event-dual-tag-query -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install divinevideo/divine-mobile nostr-addressable-event-dual-tag-query --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/nostr-addressable-event-dual-tag-query .claude/skills/nostr-addressable-event-dual-tag-query && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nostr-addressable-event-dual-tag-query
GitHub stars
266
Token cost
~1.6k tokens
SKILL.md length
454 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999).

  • Works in 4 steps: Update Filter Class (if needed) → Query by BOTH Tags → Post with BOTH Tags → …
  • REST API shows engagement count 0 but WebSocket query returns empty
  • SKILL.md covers Problem, Context / Trigger Conditions, Root Cause and Solution, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nostr Addressable Event Dual Tag Query is an agent skill from divinevideo/divine-mobile. Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999). Use when: (1) REST API shows engagement count 0 but WebSocket query returns empty, (2) Comments/reactions exist but app shows "No comments yet" or similar, (3) Working with NIP-22 comments, NIP-25 reactions, or NIP-18 reposts on Kind 34235/34236 video events or other addressable events. Root cause: clients may reference addressable events using either E…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Realtime and WebSockets, Root cause analysis and REST APIs. The licence is MPL-2.0.

When your agent uses it

  • REST API shows engagement count 0 but WebSocket query returns empty
  • Comments/reactions exist but app shows No comments yet
  • Working with NIP-22 comments
  • NIP-25 reactions

Example prompts

  • “count shows X but list shows empty”
  • “No comments yet”
  • “/nostr-addressable-event-dual-tag-query”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Update Filter Class (if needed)
  2. Query by BOTH Tags
  3. Post with BOTH Tags
  4. Build Addressable ID

What it can do on your machine

Read from SKILL.md and the folder at commit c3d6f7e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • nostrbook.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nostr Addressable Event Dual Tag Query loads about 1.6k tokens when it runs. Until then it costs about 168 tokens; SKILL.md has 454 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~168
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from divinevideo/divine-mobile at commit c3d6f7e, republished under its MPL-2.0 licence (© divinevideo). 454 words, ~1,585 tokens.

Download SKILL.mdSave it as .claude/skills/nostr-addressable-event-dual-tag-query/SKILL.md (or your agent's skills folder).
name
nostr-addressable-event-dual-tag-query
description
Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999). Use when: (1) REST API shows engagement count > 0 but WebSocket query returns empty, (2) Comments/reactions exist but app shows "No comments yet" or similar, (3) Working with NIP-22 comments, NIP-25 reactions, or NIP-18 reposts on Kind 34235/34236 video events or other addressable events. Root cause: clients may reference addressable events using either E tag (event ID) or A tag (kind:pubkey:d-tag format), and querying only one tag misses events tagged with the other.
author
Claude Code
version
1.0.0
date
2026-02-01

Nostr Addressable Event Dual-Tag Query

Problem

When querying related events (comments, reactions, reposts, zaps) for Nostr addressable events (Kind 30000-39999), the query returns fewer or zero results even though an indexing service shows the correct count. This happens because addressable events can be referenced two ways, and different clients use different methods.

Context / Trigger Conditions

Use this skill when:

  • Video/post shows comment count of 5, but comments modal says "No comments yet"
  • REST API (like Funnelcake) returns correct engagement counts, but WebSocket queries return empty
  • Working with NIP-22 comments (Kind 1111) on addressable events
  • Working with NIP-25 reactions (Kind 7) on addressable events
  • Working with NIP-18 reposts (Kind 6/16) on addressable events
  • Any feature querying events that reference Kind 30000-39999 events

Root Cause

For addressable events (Kind 30000-39999, like Kind 34236 videos), related events can reference the target using either:

  1. E tag: References by event ID (64-character hex)

    json
    ["E", "abc123...def456", "", "author-pubkey"]
  2. A tag: References by addressable identifier (kind:pubkey:d-tag)

    json
    ["A", "34236:abc123...def456:my-video-id", "", "author-pubkey"]

Different Nostr clients and indexers use different conventions:

  • Some always use E tags (event ID-based)
  • Some prefer A tags for addressable events (following NIP-22 strictly)
  • Some use both tags

If your app only queries by one tag type, you'll miss events tagged with the other.

Solution

1. Update Filter Class (if needed)

Ensure your Filter class supports uppercase A tag queries:

dart
// In Filter class
List<String>? uppercaseA;  // Add this field

// In toJson()
if (uppercaseA != null) {
  data['#A'] = uppercaseA;
}
2. Query by BOTH Tags

When loading related events, run two parallel queries and merge results:

dart
Future<List<Event>> loadRelatedEvents({
  required String eventId,
  required String? addressableId,  // Format: "kind:pubkey:d-tag"
}) async {
  // Query by E tag (event ID)
  final filterByE = Filter(
    kinds: [targetKind],
    uppercaseE: [eventId],
  );

  // If addressable ID available, also query by A tag
  if (addressableId != null && addressableId.isNotEmpty) {
    final filterByA = Filter(
      kinds: [targetKind],
      uppercaseA: [addressableId],
    );

    // Run both queries in parallel
    final results = await Future.wait([
      nostrClient.queryEvents([filterByE]),
      nostrClient.queryEvents([filterByA]),
    ]);

    // Merge and deduplicate by event ID
    final eventMap = <String, Event>{};
    for (final event in results[0]) {
      eventMap[event.id] = event;
    }
    for (final event in results[1]) {
      eventMap[event.id] = event;
    }

    return eventMap.values.toList();
  }

  return nostrClient.queryEvents([filterByE]);
}
3. Post with BOTH Tags

When creating related events, include both E and A tags for maximum compatibility:

dart
final tags = <List<String>>[
  // Always include E tag
  ['E', rootEventId, '', authorPubkey],

  // Include A tag for addressable events
  if (rootAddressableId != null && rootAddressableId.isNotEmpty)
    ['A', rootAddressableId, '', authorPubkey],

  // ... other tags
];
4. Build Addressable ID

Construct the addressable identifier from event metadata:

dart
String? get addressableId {
  if (dTag == null) return null;
  return '$kind:$pubkey:$dTag';  // e.g., "34236:abc123...:my-video-id"
}
Show full SKILL.md (191 more words)Show less

Verification

After implementing:

  1. Find an event where REST API shows count > 0 but your app showed empty
  2. Verify the list now shows the expected items
  3. Post a new related event (comment/reaction)
  4. Verify it appears when querying by either E or A tag

Example

Before fix - only queries by E tag:

dart
final filter = Filter(
  kinds: [1111],  // Comments
  uppercaseE: [videoEventId],  // Only E tag!
);
// Returns 0 comments even though 5 exist (tagged with A)

After fix - queries both tags:

dart
final filterByE = Filter(kinds: [1111], uppercaseE: [videoEventId]);
final filterByA = Filter(kinds: [1111], uppercaseA: [addressableId]);

final results = await Future.wait([
  client.queryEvents([filterByE]),
  client.queryEvents([filterByA]),
]);
// Returns all 5 comments regardless of how they were tagged

Notes

  • This pattern applies to ANY feature that queries events referencing addressable events
  • The d-tag may contain colons, so parse addressable IDs carefully: parts.sublist(2).join(':')
  • For count queries (NIP-45), take the maximum of both counts (may over-count if events have both tags)
  • Some relays may not support #A filter queries yet - test with your target relays
  • This is especially important for interoperability between different Nostr clients

Affected NIPs

  • NIP-22: Comments (Kind 1111) - uses E/A tags for root scope
  • NIP-25: Reactions (Kind 7) - references target event
  • NIP-18: Reposts (Kind 6/16) - references reposted event
  • NIP-33: Parameterized Replaceable Events (Kind 30000-39999) - defines addressable format
  • NIP-71: Video Events (Kind 34235/34236) - common use case for this pattern

References

© divinevideo, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/nostr-addressable-event-dual-tag-query of divinevideo/divine-mobile.

Open the folder on GitHubat commit c3d6f7e

Compare with similar skills

Nostr Addressable Event Dual Tag Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nostr Addressable Event Dual Tag Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nostr Addressable Event Dual Tag Query this skilldivinevideo/divine-mobile266—~1.6kAutomated safety check: PassMPL-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
Binance Datatoollostleaf/binance-datatool148—~2.5kAutomated safety check: NotesBSD-3-Clause
Action Cable PatternsThibautBaissac/rails_ai_agents665—~1.2kAutomated safety check: PassMIT
Cb Realtime APIBlkLeg/CircuitBreaker201—~1.7kAutomated safety check: PassMIT
Domain Webfjrevoredo/mini-diarium3102 repos~1kAutomated safety check: PassMIT

Similar skills

  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Binance Datatool

    lostleaf/binance-datatool

    Manage Binance historical market data from data.binance.vision using the binance-datatool CLI.

    148 GitHub stars~2.5k tokensUpdated 5 mo ago
    Backend & APIsAuto-check: notes
  • Action Cable Patterns

    ThibautBaissac/rails_ai_agents

    Implements real-time features with Action Cable and WebSockets.

    665 GitHub stars~1.2k tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed
  • Cb Realtime API

    BlkLeg/CircuitBreaker

    How Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and…

    201 GitHub stars~1.7k tokensUpdated 6 days ago
    Backend & APIsAuto-check passed
  • Domain Web

    fjrevoredo/mini-diarium

    A skill your agent uses when building web services. An agent skill from fjrevoredo/mini-diarium.

    310 GitHub starsUsed in 2 repos~1k tokens
    Backend & APIsAuto-check passed
  • FastAPI Expert

    Jeffallan/claude-skills

    Builds async Python APIs with FastAPI and Pydantic V2, covering endpoints, JWT authentication, async SQLAlchemy, WebSockets and pytest checks against the OpenAPI docs.

    12k GitHub stars~1.8k tokensUpdated 8 days ago
    Backend & APIsAuto-check passed

More from divinevideo/divine-mobile

All 103 skills in this repo
  • Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".

    266 GitHub stars~931 tokensUpdated today
    Auto-check passed
  • Art Direct

    divinevideo/divine-mobile

    Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.

    266 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Async Await Null Race Condition

    divinevideo/divine-mobile

    Fix "Null check operator used on a null value" errors when an object is set to null during an async await.

    266 GitHub stars~881 tokensUpdated today
    Auto-check passed
  • AWS V4 Signing Custom Headers Gcs

    divinevideo/divine-mobile

    Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.

    266 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Bash Herestring Newline Secrets

    divinevideo/divine-mobile

    Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.

    266 GitHub stars~791 tokensUpdated today
    Auto-check passed
  • Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).

    266 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Nostr Addressable Event Dual Tag Query

What does Nostr Addressable Event Dual Tag Query do?

Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999). Nostr Addressable Event Dual Tag Query is an agent skill from divinevideo/divine-mobile. Fix "count shows X but list shows empty" bugs when querying related events (comments, reactions, zaps, reposts) for Nostr addressable events (Kind 30000-39999).

When should I use Nostr Addressable Event Dual Tag Query?

Nostr Addressable Event Dual Tag Query fits situations like: REST API shows engagement count 0 but WebSocket query returns empty; comments/reactions exist but app shows No comments yet; working with NIP-22 comments; NIP-25 reactions.

How do I install Nostr Addressable Event Dual Tag Query in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill nostr-addressable-event-dual-tag-query -a claude-code`. Or copy the skill folder (.agents/skills/nostr-addressable-event-dual-tag-query in divinevideo/divine-mobile) into .claude/skills/nostr-addressable-event-dual-tag-query in your project. Claude Code loads it when a task matches its description.

How do I install Nostr Addressable Event Dual Tag Query in Codex?

Run `npx skills add divinevideo/divine-mobile --skill nostr-addressable-event-dual-tag-query -a codex`. Or copy the skill folder (.agents/skills/nostr-addressable-event-dual-tag-query in divinevideo/divine-mobile) into .agents/skills/nostr-addressable-event-dual-tag-query in your project. Codex loads it when a task matches its description.

Can I use Nostr Addressable Event Dual Tag Query in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add divinevideo/divine-mobile --skill nostr-addressable-event-dual-tag-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nostr-addressable-event-dual-tag-query, .gemini/skills/nostr-addressable-event-dual-tag-query, .github/skills/nostr-addressable-event-dual-tag-query and .opencode/skills/nostr-addressable-event-dual-tag-query in your project.

What does Nostr Addressable Event Dual Tag Query need to run?

SKILL.md names no scripts, command-line tools or credentials: Nostr Addressable Event Dual Tag Query is instructions for the agent only.

Does Nostr Addressable Event Dual Tag Query access the network?

SKILL.md names 2 domains. As links in the text: github.com and nostrbook.dev. This is read from the text; nothing was executed.

Is Nostr Addressable Event Dual Tag Query safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nostr Addressable Event Dual Tag Query use?

Nostr Addressable Event Dual Tag Query is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nostr Addressable Event Dual Tag Query use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nostr Addressable Event Dual Tag Query?

Skills that share tags, products or a category with Nostr Addressable Event Dual Tag Query: Use Yaak (mountain-loop/yaak, 19k stars), Binance Datatool (lostleaf/binance-datatool, 148 stars), Action Cable Patterns (ThibautBaissac/rails_ai_agents, 665 stars) and Cb Realtime API (BlkLeg/CircuitBreaker, 201 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nostr Addressable Event Dual Tag Query?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 266 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 10, 2026.

Source: divinevideo/divine-mobile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.