nostr-direct-messages

Implement encrypted Nostr direct messaging with NIP-04 and NIP-17 protocols.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Direct messaging on Nostr with strong privacy is often difficult to implement securely across clients. This skill provides a complete, encryptable DM system supporting both NIP-04 and NIP-17, plus real-time updates and local storage to ensure reliable, private conversations.

Core Features & Use Cases

  • Complete DM system that supports legacy (NIP-04) and private (NIP-17) messaging
  • Real-time subscriptions, optimistic UI updates, and per-user IndexedDB storage for fast, offline-ready conversations
  • Quick integration with DMProvider and configurable protocol modes to fit various app architectures

Quick Start

Provide a ready-to-use DM interface by wrapping your app with DMProvider and selecting a protocol mode to enable encrypted direct messaging.

Frequently Asked Questions about nostr-direct-messages

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

FAQPage Schema
How do I implement encrypted direct messaging on Nostr for my chat app?

Encrypted Nostr direct messaging is implemented by wrapping your application with a DMProvider interface that supports configurable protocol modes for both legacy NIP-04 and private NIP-17 encryption. This enables real-time relay subscriptions and per-user local IndexedDB storage for offline-ready conversations.

What is the difference between NIP-04 and NIP-17 Nostr DM protocols?

NIP-04 is the legacy direct messaging standard on Nostr, while NIP-17 provides private messaging with gift-wrapped message support for stronger privacy. This DM system supports configurable protocol modes, allowing developers to choose or switch between both encryption standards to fit various app architectures.

Can I use IndexedDB for offline Nostr direct message storage?

Yes, Nostr direct messages can be stored locally using per-user IndexedDB. This ensures fast, offline-ready conversations by caching encrypted messages locally, while real-time relay subscriptions handle live updates and optimistic UI updates keep the chat interface responsive.

How do I add real-time chat updates to a Nostr messaging client?

Real-time chat updates in a Nostr messaging client are enabled through relay subscriptions that stream new encrypted messages instantly. The DMProvider integration applies optimistic UI updates immediately upon sending and syncs with local IndexedDB storage to maintain conversation state across web and mobile platforms.

Does Nostr gift-wrapped messaging work across web and mobile apps?

Gift-wrapped messaging via the NIP-17 protocol works across web and mobile apps by utilizing a complete DM system with per-user encryption. Integration is achieved through the DMProvider, which handles giftwrap support and real-time relay subscriptions to ensure private conversations function reliably across different platforms.

What are the limitations of using NIP-04 for Nostr private messaging?

NIP-04 legacy messaging has known privacy limitations compared to the NIP-17 standard, which utilizes gift-wrapped message support for stronger encryption. Developers should use the configurable protocol modes in the DMProvider to select NIP-17 when stronger privacy is required for their direct messaging implementation.