nostr-direct-messages

Integrate Nostr direct messaging with NIP-04 and NIP-17 encryption.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/samthomson/treasure-board --skill nostr-direct-messages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nostr-direct-messages
Source: https://github.com/samthomson/treasure-board/tree/main/.claude/skills/nostr-direct-messages
Command: npx skills add https://github.com/samthomson/treasure-board --skill nostr-direct-messages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a complete Nostr direct messaging system with optional NIP-04 and NIP-17 support, including real-time subscriptions, optimistic UI updates, and a cache-first local storage model for offline use.

Core Features & Use Cases

  • DMProvider integration: Easy setup to wrap your app and enable messaging features.
  • NIP-04 and NIP-17 support: Choose legacy encryption or modern private messaging with gift-wrapping.
  • Real-time and offline UX: Live updates via relays with optimistic UI and locally cached messages.
  • Attachments and file sharing: Support for file messages and metadata when integrated with the DM layer.

Quick Start

Use nostr-direct-messages to enable a DM system in your app by wrapping your application with DMProvider, configuring protocol mode, and enabling the DM system in your provider tree.

Frequently Asked Questions about nostr-direct-messages

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

FAQPage Schema
How do I add Nostr direct messages with NIP-04 and NIP-17 encryption to my app?

Nostr direct messages can be added by wrapping your application with a DMProvider, which enables a complete messaging system supporting both NIP-04 and NIP-17 encrypted messages. You configure the protocol mode and enable the system within your provider tree.

What is the difference between NIP-04 and NIP-17 for Nostr private messaging?

NIP-04 provides legacy encryption for Nostr private messaging, while NIP-17 introduces modern private messaging with gift-wrapping. This system supports both protocols, allowing you to choose between legacy encryption and modern secure peer-to-peer communication.

Can I use Nostr DMs for real-time chat with offline message caching?

Yes, Nostr DMs support real-time chat via relay subscriptions with optimistic UI updates and a cache-first local storage model. This ensures live updates when connected and offline access to locally cached messages.

Does the Nostr direct messaging system support file attachments and sharing?

The Nostr direct messaging system supports file attachments and sharing by integrating file messages and metadata with the DM layer. This allows secure peer-to-peer communication to include optional file attachments.

What's the best way to manage Nostr events for a direct messaging provider?

The best way to manage Nostr events for a direct messaging provider is to configure protocol modes and enable live updates via relays. The system handles event management, subscriptions, and optimistic UI updates automatically.