searchable-events

Documents the NIP-50 SearchableEvent indexing surface of Quartz for Nostr event search.

1.6k|222|Updated Jan 11, 2023
One-click install
npx skills add https://github.com/vitorpamplona/amethyst --skill searchable-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: searchable-events
Source: https://github.com/vitorpamplona/amethyst/tree/main/.claude/skills/searchable-events
Command: npx skills add https://github.com/vitorpamplona/amethyst --skill searchable-events

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It answers which Nostr event kinds are full-text searchable in Quartz, exactly what text each kind's indexableContent() contributes, and how the SQLite and filesystem stores consume that text, so changes to search indexing never ship silently.

Core Features & Use Cases

  • Authoritative kind table: A references file lists every SearchableEvent implementor with its kind number, class, and exact indexableContent() expression (130 classes covering 133 kind values).
  • Maintenance contract: Mandates updating the table in the same PR as any indexing change, registering new implementors in EventFactory, and scheduling reindexFullTextSearch() since existing databases do not reindex themselves.
  • NIP-50 client grammar: Documents the SearchQuery extension syntax (include:spam, domain:, language:) and SearchRelayListEvent (kind 10007).
  • Use Case: When bumping Quartz, diff references/searchable-kinds.md to tell external search engines whether the searchable set or any kind's indexed text changed.

Quick Start

Ask the AI to check whether a given Nostr event kind is searchable and what text it indexes using the searchable-events skill.

Frequently Asked Questions about searchable-events

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a Nostr event kind searchable in Quartz?

Implement the SearchableEvent interface on the event class so indexableContent() returns human-meaningful plain text, then register the class in EventFactory. Without factory registration the stores' kind pre-filter and reindex scan never see it.

Why is a Nostr event not found by NIP-50 search?

Common causes are the kind not implementing SearchableEvent, the class missing from EventFactory, or existing database rows never being reindexed after an indexing change. Run IEventStore.reindexFullTextSearch() to rebuild FTS text for old rows.

What text does kind 9735 zap receipt index for search?

Kind 9735 indexes the embedded zap request's content via zapRequest?.content.orEmpty(), so receipts are searchable by the zapper's comment rather than the receipt's own content.

How does NIP-50 search query extension syntax work?

SearchQuery parses the search filter string into terms plus extensions, where a whitespace token is an extension iff it looks like lowercasekey:value. Unsupported extensions are ignored per NIP-50, so an extensions-only search becomes an unconstrained query.

Does changing indexableContent update existing search indexes?

No, existing databases keep their old FTS text until reindexFullTextSearch() runs. After shipping an indexing change, schedule the resumable reindex overload so stored events pick up the new indexed text.