jpskill.com
📦 その他 コミュニティ

nostr-nip-advisor

Nostrプロトコルを使った機能(DM、投げ銭、マーケットプレイス等)を実装する際に、どのNIP(規格)を適用すべきか判断し、非推奨のNIPを警告、正しいイベント構造を提供する開発支援をするSkill。

📜 元の英語説明(参考)

Identifies which Nostr NIPs apply when implementing a feature (DMs, zaps, marketplace, groups, authentication, etc.), warns about deprecated or unrecommended NIPs, and provides correct event structures. Use when building Nostr clients, relays, or features, when asking which NIPs to implement, when planning Nostr protocol integration, or when encountering NIP-04, NIP-08, NIP-96, or NIP-26 in existing code.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Nostrプロトコルを使った機能(DM、投げ銭、マーケットプレイス等)を実装する際に、どのNIP(規格)を適用すべきか判断し、非推奨のNIPを警告、正しいイベント構造を提供する開発支援をするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o nostr-nip-advisor.zip https://jpskill.com/download/9138.zip && unzip -o nostr-nip-advisor.zip && rm nostr-nip-advisor.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9138.zip -OutFile "$d\nostr-nip-advisor.zip"; Expand-Archive "$d\nostr-nip-advisor.zip" -DestinationPath $d -Force; ri "$d\nostr-nip-advisor.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して nostr-nip-advisor.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → nostr-nip-advisor フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Nostr NIP アドバイザー

Nostr の機能を実装する際に開発者が必要とする NIP を特定し、非推奨のアプローチについて警告し、正しいイベント構造と NIP のインタラクションパターンを提供します。

概要

エージェントは Nostr が何であるかをすでに知っていますが、どの NIP が非推奨であるか、どの NIP を組み合わせれば機能が動作するか、正しいイベント構造がどのようなものかについての最新の知識が不足しています。このスキルは、それらのギャップを埋めます。

どのような時に使うか

  • Nostr の機能(DM、zap、マーケットプレイス、グループなど)を実装するとき
  • 「X に必要な NIP はどれですか?」と質問するとき
  • NIP-04、NIP-08、NIP-96、または NIP-26 を使用するコードをレビューするとき
  • Nostr クライアントまたはリレーのイベント構造を設計するとき
  • 非推奨の NIP から代替 NIP に移行するとき

以下の場合には使用しないでください。

  • Nostr 以外のプロトコル(ActivityPub、AT Protocol など)を構築する場合
  • プロトコルの質問がない Nostr リレーインフラストラクチャに取り組む場合
  • 質問が NIP に関連しない暗号プリミティブのみに関する場合

ワークフロー

1. 機能の理解

開発者が何を構築したいのかを尋ねます。彼らの説明を NIP マップ の 1 つ以上の機能カテゴリにマッピングします。

2. 非推奨の NIP の確認

何かを推奨する前に、非推奨リスト と照合します。開発者が非推奨の NIP について言及したり、コードが非推奨の NIP を使用している場合は、すぐに警告し、移行パスを示します。

3. 必要な NIP の特定

ほとんどの機能では、複数の NIP が連携して動作する必要があります。完全なチェーンを特定します。

  • プライマリ NIP — 機能のコア仕様
  • 必要な依存関係 — 連携して実装する必要がある NIP
  • 関連 NIP — オプションですが、一般的に一緒に使用されます

4. イベント構造の提供

各プライマリ NIP について、イベントの種類、必要なタグ、およびコンテンツ形式を示します。Nostr MCP ツール (read_nipread_kindread_tag) を使用して、利用可能な場合は最新の仕様の詳細を取得します。

5. インタラクションパターンに関する警告

多くの NIP には、自明ではない要件があります。これらを明示的に呼び出します。

  • DM は 4 つの NIP が連携して動作する必要があります (17 + 44 + 59 + 51)
  • Zap は Nostr プロトコルの外部で LNURL 統合が必要です
  • マーケットプレイスのチェックアウトは、一部のフローでレガシー NIP-04 に依然として依存しています

非推奨の警告

常に最初にこの表を確認してください。 非推奨の NIP を使用すると、最新のクライアントとの相互運用性の問題が発生します。

非推奨の NIP 何であったか 代替 非推奨の理由
NIP-04 (kind:4) 暗号化された DM NIP-17 (kind:14) + NIP-44 + NIP-59 メタデータが漏洩する(送信者、受信者、タイムスタンプが表示される)
NIP-08 メンションの処理 NIP-27 (テキストノートの参照) より良い参照形式に置き換えられた
NIP-96 HTTP ファイルストレージ Blossom (NIP-B7) よりシンプルで分散化された Blossom API に置き換えられた
NIP-26 委任されたイベント署名 なし(削除) ほとんどメリットがないのに不要な負担が増える
位置による e タグ 位置によるスレッド参照 マークされた e タグ (NIP-10) イベントが返信なしに参照する場合に曖昧

機能と NIP のクイックリファレンス

機能 プライマリ NIP 必要な依存関係 関連
ダイレクトメッセージ 17 44 (暗号化)、59 (ギフトラップ) 51 (kind:10050 DM リレー)
Zap (Lightning) 57 LNURL (外部) 47 (Wallet Connect)
Nutzap (Cashu) 61 60 (Cashu Wallet) 87 (Mint Discovery)
マーケットプレイス 15 69 (P2P 注文)、99 (クラシファイド)
ソーシャル / ノート 01, 10 25 (リアクション)、18 (リポスト)、22 (コメント)
長文コンテンツ 23 22 (コメント)、84 (ハイライト)
グループ 29 72 (モデレートされたコミュニティ)
リレー認証 42 11 (リレー情報) 98 (HTTP 認証)
アイデンティティ 05 (NIP-05)、19 (bech32) 06 (キー導出)、46 (リモート署名)
DVM 90 89 (アプリハンドラー)
暗号化 44 59 (ギフトラップ)、49 (キー暗号化)
リスト 51 65 (リレーリスト)
検索 50
ファイルストレージ B7 (Blossom) 94 (ファイルメタデータ)、92 (メディア添付)

完全なイベント構造とタグの詳細については、references/nip-map.md を参照してください。

NIP インタラクションパターン

これらは、開発者が頻繁に見落とす、自明ではないマルチ NIP チェーンです。

プライベート DM (NIP-17 チェーン)

kind:14 (署名なしの噂) → NIP-44 暗号化 → kind:13 (封印) → NIP-44 暗号化 → kind:1059 (ギフトラップ)
  1. 受信者の p タグとプレーンテキストコンテンツを含む署名なしの kind:14 を作成します
  2. それを封印します (kind:13) — 送信者の

(原文はここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Nostr NIP Advisor

Identifies which NIPs a developer needs when implementing a Nostr feature, warns about deprecated approaches, and provides the correct event structures and NIP interaction patterns.

Overview

Agents already know what Nostr is, but they lack current knowledge of which NIPs are deprecated, which NIPs must be combined for a feature to work, and what the correct event structures look like. This skill fills those gaps.

When to use

  • When implementing any Nostr feature (DMs, zaps, marketplace, groups, etc.)
  • When asking "which NIPs do I need for X?"
  • When reviewing code that uses NIP-04, NIP-08, NIP-96, or NIP-26
  • When designing event structures for a Nostr client or relay
  • When migrating from deprecated NIPs to their replacements

Do NOT use when:

  • Building non-Nostr protocols (ActivityPub, AT Protocol, etc.)
  • Working on Nostr relay infrastructure without protocol questions
  • The question is purely about cryptographic primitives unrelated to NIPs

Workflow

1. Understand the feature

Ask what the developer wants to build. Map their description to one or more feature categories from the NIP map.

2. Check for deprecated NIPs

Before recommending anything, cross-reference against the deprecations list. If the developer mentions or their code uses a deprecated NIP, warn immediately with the migration path.

3. Identify required NIPs

Most features require multiple NIPs working together. Identify the full chain:

  • Primary NIP — the core spec for the feature
  • Required dependencies — NIPs that must be implemented alongside
  • Related NIPs — optional but commonly used together

4. Provide event structures

For each primary NIP, show the event kind, required tags, and content format. Use the Nostr MCP tools (read_nip, read_kind, read_tag) to fetch current spec details when available.

5. Warn about interaction patterns

Many NIPs have non-obvious requirements. Call these out explicitly:

  • DMs require 4 NIPs working together (17 + 44 + 59 + 51)
  • Zaps require LNURL integration outside the Nostr protocol
  • Marketplace checkout still depends on legacy NIP-04 in some flows

Deprecation Warnings

Always check this table first. Using deprecated NIPs causes interoperability failures with modern clients.

Deprecated NIP What it was Replacement Why deprecated
NIP-04 (kind:4) Encrypted DMs NIP-17 (kind:14) + NIP-44 + NIP-59 Leaks metadata (sender, receiver, timestamps visible)
NIP-08 Handling Mentions NIP-27 (text note references) Superseded by better reference format
NIP-96 HTTP File Storage Blossom (NIP-B7) Replaced by simpler, more decentralized Blossom APIs
NIP-26 Delegated Event Signing None (removed) Adds unnecessary burden for little gain
Positional e tags Thread references by position Marked e tags (NIP-10) Ambiguous when events reference without replying

Feature-to-NIP Quick Reference

Feature Primary NIPs Required Dependencies Related
Direct Messages 17 44 (encryption), 59 (gift wrap) 51 (kind:10050 DM relays)
Zaps (Lightning) 57 LNURL (external) 47 (Wallet Connect)
Nutzaps (Cashu) 61 60 (Cashu Wallet) 87 (Mint Discovery)
Marketplace 15 69 (P2P Orders), 99 (Classifieds)
Social / Notes 01, 10 25 (Reactions), 18 (Reposts), 22 (Comments)
Long-form Content 23 22 (Comments), 84 (Highlights)
Groups 29 72 (Moderated Communities)
Relay Auth 42 11 (Relay Info) 98 (HTTP Auth)
Identity 05 (NIP-05), 19 (bech32) 06 (Key Derivation), 46 (Remote Signing)
DVMs 90 89 (App Handlers)
Encryption 44 59 (Gift Wrap), 49 (Key Encryption)
Lists 51 65 (Relay List)
Search 50
File Storage B7 (Blossom) 94 (File Metadata), 92 (Media Attachments)

For complete event structures and tag details, see references/nip-map.md.

NIP Interaction Patterns

These are the non-obvious multi-NIP chains that developers frequently miss:

Private DMs (NIP-17 chain)

kind:14 (unsigned rumor) → NIP-44 encrypt → kind:13 (seal) → NIP-44 encrypt → kind:1059 (gift wrap)
  1. Create unsigned kind:14 with p tags for recipients and plaintext content
  2. Seal it (kind:13) — encrypt with NIP-44 using sender's key + recipient's pubkey
  3. Gift wrap (kind:1059) — encrypt seal with a random ephemeral key
  4. Publish to recipient's kind:10050 relay list (NIP-51)
  5. Repeat wrapping for each recipient AND the sender (for sent-message recovery)

Critical: The kind:14 MUST NOT be signed (deniability). Timestamps on seal and gift wrap MUST be randomized up to 2 days in the past (metadata protection).

Zaps (NIP-57 chain)

  1. Fetch recipient's lnurl pay endpoint (from lud16 in kind:0 profile)
  2. Verify allowsNostr: true and nostrPubkey in lnurl response
  3. Create kind:9734 zap request (NOT published to relays)
  4. Send zap request to lnurl callback URL as query parameter
  5. Receive bolt11 invoice, pay it
  6. Recipient's lnurl server publishes kind:9735 zap receipt

Nutzaps (NIP-61 chain)

  1. Fetch recipient's kind:10019 for trusted mints and P2PK pubkey
  2. Mint/swap Cashu tokens P2PK-locked to recipient's specified pubkey
  3. Publish kind:9321 with proofs, tagging recipient and mint URL
  4. Recipient swaps tokens into their NIP-60 wallet
  5. Recipient publishes kind:7376 to mark redemption

Relay Authentication (NIP-42)

  1. Relay sends ["AUTH", "<challenge>"] to client
  2. Client creates kind:22242 event with relay and challenge tags
  3. Client sends ["AUTH", <signed-event>]
  4. Relay responds with ["OK", ...]

Common Mistakes

Mistake Fix
Using NIP-04 (kind:4) for DMs Use NIP-17 (kind:14) with NIP-44 encryption and NIP-59 gift wrap
Signing the kind:14 DM rumor Leave it unsigned — signatures remove deniability
Publishing kind:9734 zap requests to relays Send to lnurl callback URL only, never publish
Using positional e tags for threading Use marked e tags with root and reply markers (NIP-10)
Hardcoding relay URLs Use kind:10002 relay list (NIP-65) for outbox model
Using NIP-96 for file uploads Use Blossom (NIP-B7) — NIP-96 is unrecommended
Using recipient's main Nostr pubkey for nutzap P2PK Use the dedicated pubkey from their kind:10019 event
Not randomizing gift wrap timestamps Randomize created_at up to 2 days in the past on both seal and wrap
Skipping NIP-11 when implementing NIP-42 auth Relay info document tells clients what auth is required before connecting

Key Principles

  1. Deprecation-first checking — Always verify NIPs against the deprecation list before recommending. A working implementation on a deprecated NIP will break interoperability with modern clients.

  2. Full chain awareness — Most features require multiple NIPs. Recommending NIP-17 without NIP-44, NIP-59, and NIP-51 produces a broken implementation.

  3. Metadata protection matters — The shift from NIP-04 to NIP-17 was driven by metadata leakage. When advising on encryption or messaging, always explain what metadata is protected and what isn't.

  4. Verify with the spec — Use the Nostr MCP tools (read_nip, read_kind) to fetch current NIP text when providing event structures. NIPs evolve and details change.

  5. Event kind numbers are canonical — Always include the specific kind number when discussing events. "Use NIP-17" is less useful than "Create a kind:14 event, seal it as kind:13, gift wrap as kind:1059."