nostr-tools

Create, sign, and filter Nostr events with relay communication via nostr-tools.

4|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/PlebeianApp/plebeian-signer --skill nostr-tools-plebeianapp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nostr-tools
Source: https://github.com/PlebeianApp/plebeian-signer/tree/main/.claude/skills/nostr-tools
Command: npx skills add https://github.com/PlebeianApp/plebeian-signer --skill nostr-tools-plebeianapp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nostr development often requires orchestrating event creation, signing, filtering, and relay communication across multiple libraries. nostr-tools centralizes these tasks, reducing boilerplate and potential errors.

Core Features & Use Cases

  • Event handling: create, sign, verify events with standard Nostr kinds.
  • Key management and encoding: generate keys and encode to bech32 formats.
  • Relay communication: interact with relays via SimplePool and direct Relay connections.
  • NIP implementations and cryptography: support for NIP-04, NIP-44, NIP-05, etc.
  • Filtering and querying: build complex filters and perform batched queries.

Quick Start

Install the library with npm install nostr-tools and start by creating a signed event with the core APIs.

Frequently Asked Questions about nostr-tools

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

FAQPage Schema
How do I create and sign Nostr events in a Node script?

To create and sign Nostr events, use nostr-tools APIs like finalizeEvent. This library centralizes event handling, key generation, and bech32 encoding for Node scripts, browser extensions, and front-end apps.

How does relay communication work with Nostr?

Relay communication in Nostr uses SimplePool and direct Relay connections. nostr-tools manages these connections to subscribe to event streams and perform batched queries across multiple relays.

Can I implement NIP-04, NIP-44, and NIP-05 for Nostr cryptography?

Yes, Nostr cryptography supports NIP-04, NIP-44, and NIP-05 implementations. nostr-tools provides dedicated modules like nip04 and nip44 to handle encryption, decryption, and verification.

What's the best way to build complex filters for Nostr event streams?

The best way to build complex filters for Nostr event streams is using the querying capabilities in nostr-tools. It allows you to compose intricate filters and perform batched queries to retrieve specific events.

Do I need nostr-tools to generate keys and encode to bech32?

You need nostr-tools to generate keys and encode to bech32 formats. It provides built-in functions for key management and encoding, reducing boilerplate when building Nostr applications.

Why does my Nostr app need centralized event creation and relay handling?

A Nostr app needs centralized event creation and relay handling to reduce boilerplate and potential errors. nostr-tools orchestrates signing, filtering, and relay communication across browser extensions and front-end apps.