nak — community Sovran, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Decentralized Data Agents needing to interact with the Nostr protocol. A mobile Cashu wallet

SovranBitcoin SovranBitcoin
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The nak skill by SovranBitcoin is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Decentralized Data Agents needing to interact with the Nostr protocol.

Core Value

Empowers agents to leverage the Nostr Army Knife CLI tool, facilitating seamless interaction with the Nostr protocol and enabling advanced data analysis and visualization capabilities using the nak command-line interface.

Capabilities Granted for nak

Automating Nostr protocol interactions
Generating event feeds
Debugging Nostr-based applications

! Prerequisites & Limits

  • Requires installation via script or trusted package manager
  • CLI tool dependency
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

nak

Install nak, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

nak - Nostr Army Knife

Work with the Nostr protocol using the nak CLI tool.

GitHub: https://github.com/fiatjaf/nak

Installation

To install (or upgrade) nak:

bash
1# Avoid piping remote scripts directly to `sh`. 2# Prefer inspecting the script (or installing from a trusted package manager) before running. 3curl -sSL https://raw.githubusercontent.com/fiatjaf/nak/master/install.sh -o /tmp/nak-install.sh 4sed -n '1,200p' /tmp/nak-install.sh 5sh /tmp/nak-install.sh

Core Concepts

Based on analyzing extensive real-world usage, here are the fundamental concepts distilled down, then branched out:


CONCEPT 1: Query & Discovery

"Finding events and data on Nostr"

Basic:

  • Fetch by identifier: "Get event/profile without knowing relays"
    • nak fetch nevent1... (uses embedded relay hints)
    • nak fetch alex@gleasonator.dev (NIP-05 resolution)
  • Query by event ID: "I want THIS specific event from a relay"
    • nak req -i <event_id> <relay>
  • Query by author: "Show me everything from this person"
    • nak req -a <pubkey> <relay>
  • Query by kind: "Show me all profiles/notes/videos"
    • nak req -k <kind> <relay>

Intermediate:

  • Fetch addressable events: "Get event by naddr/nprofile"
    • nak fetch naddr1... (kind, author, identifier encoded)
    • nak fetch -r relay.primal.net naddr1... (override relays)
  • Filter by multiple criteria: "Find posts by author X of kind Y"
    • nak req -k 1 -a <pubkey> <relay>
  • Tag-based queries: "Find events tagged with bitcoin"
    • nak req --tag t=bitcoin <relay>

Advanced:

  • Search with ranking: "Find trending/top content"
    • nak req --search "sort:hot" <relay>
    • nak req --search "popular:24h" <relay>
  • Live monitoring: "Watch events in real-time"
    • nak req --stream <relay>
  • Cross-protocol queries: "Find bridged Bluesky content"
    • nak req --tag "proxy=at://..." <relay>

Use cases: Discovering content, debugging relay data, testing search algorithms, monitoring live feeds


CONCEPT 2: Broadcast & Migration

"Moving/copying events between relays"

Basic:

  • Publish a single event: "Put this on relay X"
    • cat event.json | nak event <relay>
  • Query and republish: "Copy event from relay A to relay B"
    • nak req -i <id> relay1 | nak event relay2

Intermediate:

  • Batch migration: "Copy all events of kind X"
    • nak req -k 30717 source_relay | nak event dest_relay
  • Paginated backup: "Download everything from a relay"
    • nak req --paginate source_relay | nak event backup_relay
  • Multi-relay broadcast: "Publish to multiple relays at once"
    • cat event.json | nak event relay1 relay2 relay3

Advanced:

  • Selective migration: "Copy follow list members' data"
    • Loop through follow list, query each author, republish to new relay
  • Filter and migrate: "Copy only tagged/searched content"
    • nak req --tag client=X relay1 | nak event relay2
  • Cross-relay synchronization: "Keep two relays in sync"
    • nak sync source_relay dest_relay

Use cases: Seeding new relays, backing up data, migrating content between relays, bridging Mostr/Fediverse content


CONCEPT 3: Identity & Encoding

"Working with Nostr identifiers and keys"

Basic:

  • Decode identifiers: "What's inside this npub/nevent?"
    • nak decode npub1...
    • nak decode user@domain.com
  • Encode identifiers: "Turn this pubkey into npub"
    • nak encode npub <hex_pubkey>

Intermediate:

  • Generate keys: "Create a new identity"
    • nak key generate
    • nak key generate | nak key public | nak encode npub
  • Extract hex from NIP-05: "Get the raw pubkey from an address"
    • nak decode user@domain.com | jq -r .pubkey
  • Create shareable references: "Make a nevent with relay hints"
    • nak encode nevent <event_id> --relay <relay>

Advanced:

  • Complex naddr creation: "Create addressable event reference with metadata"
    • nak encode naddr -k 30717 -a <author> -d <identifier> -r <relay>
  • Multi-relay nprofile: "Create profile with multiple relay hints"
    • nak encode nprofile <pubkey> -r relay1 -r relay2 -r relay3

Use cases: Converting between formats, sharing references with relay hints, managing multiple identities, extracting pubkeys for scripting


CONCEPT 4: Event Creation & Publishing

"Creating and signing new events"

Basic:

  • Interactive creation: "Create an event with prompts"
    • nak event --prompt-sec <relay>
  • Simple note: "Publish a text note"
    • nak event -k 1 -c "Hello Nostr" <relay>

Intermediate:

  • Events with tags: "Create tagged content"
    • nak event -k 1 -t t=bitcoin -t t=nostr <relay>
  • Event deletion: "Delete a previous event"
    • nak event -k 5 -e <event_id> --prompt-sec <relay>
  • Replaceable events: "Create/update a profile or app data"
    • nak event -k 10019 -t mint=<url> -t pubkey=<key> <relay>

Advanced:

  • Remote signing with bunker: "Sign without exposing keys"
    • nak event --connect "bunker://..." <relay>
  • Batch event creation: "Generate many events via script"
    • for i in {1..100}; do nak event localhost:8000; done
  • Complex events from JSON: "Craft specific event structure"
    • Modify JSON, then cat event.json | nak event <relay>

Use cases: Testing event creation, developing apps (kind 31990, 37515), wallet integration (kind 10019), moderation (kind 5), bunker/remote signing implementation


CONCEPT 5: Development & Testing

"Building on Nostr"

Basic:

  • Local relay testing: "Test against dev relay"
    • nak req localhost:8000
    • nak event ws://127.0.0.1:7777

Intermediate:

  • Inspect JSON: "Examine event structure"
    • nak req -i <id> <relay> | jq .
  • Test search: "Verify search functionality"
    • nak req --search "<query>" localhost:8000
  • Admin operations: "Manage relay content"
    • nak admin --prompt-sec banevent --id <id> <relay>

Advanced:

  • Protocol bridging: "Query/test ATProto integration"
    • nak req --tag "proxy=at://..." eclipse.pub/relay
  • Git over Nostr: "Use git with Nostr transport"
    • nak git clone nostr://...
    • nak req -k 30617 git.shakespeare.diy
  • Performance testing: "Measure query speed"
    • time nak req -k 0 -a <pubkey> <relay>
  • Custom event kinds: "Test proprietary event types"
    • nak req -k 37515 -a <author> -d <id> ditto.pub/relay

Use cases: Relay development (Ditto), testing bridges (Mostr/Bluesky), developing video platforms, implementing Git-over-Nostr, testing search ranking algorithms, performance benchmarking


CONCEPT 6: Analytics & Monitoring

"Understanding Nostr data"

Basic:

  • Count results: "How many events match?"
    • nak req -k 1 <relay> | wc -l
    • nak count -k 7 -e <event_id> <relay>

Intermediate:

  • Live monitoring: "Watch relay activity"
    • nak req --stream <relay>
    • nak req -l 0 --stream relay1 relay2 relay3
  • Client analytics: "What apps are posting?"
    • nak req --tag client=<app> <relay>

Advanced:

  • Event chain analysis: "Track engagement"
    • nak count -k 7 -e <event_id> <relay> (reactions)
    • nak req -k 6 -k 7 -e <event_id> <relay> (reposts + reactions)
  • Content ranking: "Find top/hot content"
    • nak req --search "sort:top" <relay>
  • Cross-relay comparison: "Compare event availability"
    • Query same event from multiple relays, compare results

Use cases: Monitoring relay health, tracking client usage (Ditto, noStrudel, moStard), analyzing engagement, testing ranking algorithms


Summary: The 6 Core Mental Models

  1. Query & Discovery: "How do I find things?"
  2. Broadcast & Migration: "How do I move things?"
  3. Identity & Encoding: "How do I represent things?"
  4. Event Creation: "How do I make things?"
  5. Development & Testing: "How do I build things?"
  6. Analytics & Monitoring: "How do I measure things?"

Command Shapes and Edge-Cases

Non-obvious patterns and edge cases for nak commands.

Signing Methods

Using environment variable:

bash
1export NOSTR_SECRET_KEY=<hex_key> 2nak event -c "hello" # Automatically uses $NOSTR_SECRET_KEY

Reading key from file:

bash
1nak event -c "hello" --sec $(cat /path/to/key.txt)

Content from File

Using @ prefix to read content from file:

bash
1echo "hello world" > content.txt 2nak event -c @content.txt

Tag Syntax

Tag with multiple values (semicolon-separated):

bash
1nak event -t custom="value1;value2;value3" 2# Creates: ["custom", "value1", "value2", "value3"]

Filter Output Modes

Print bare filter (JSON only):

bash
1nak req -k 1 -l 5 --bare 2# Output: {"kinds":[1],"limit":5}

Filter from stdin can be modified with flags:

bash
1echo '{"kinds": [1]}' | nak req -l 5 -k 3 --bare

Unlimited stream:

bash
1nak req -l 0 --stream wss://relay.example.com

Relay Specification

Local relays and WebSocket schemes:

bash
1nak req localhost:8000 2nak req ws://127.0.0.1:7777 3nak req relay.example.com # Assumes wss:// if not specified

Encoding

Encode from JSON stdin (auto-detects type):

bash
1echo '{"pubkey":"<hex>","relays":["wss://relay.example.com"]}' | nak encode

Key Operations

Complete key generation pipeline:

bash
1nak key generate | tee secret.key | nak key public | nak encode npub 2# Saves private key to file AND prints the public npub

Verification

Verify and pipe:

bash
1nak event -c "test" --sec <key> | nak verify && echo "Valid"

Fetch vs Req

nak fetch uses relay hints from identifiers:

bash
1nak fetch nevent1... # Uses relays encoded in nevent 2nak fetch naddr1... # Uses relays encoded in naddr 3nak fetch alex@gleasonator.dev # Resolves NIP-05 4nak fetch -r relay.primal.net naddr1... # Override relays

nak req requires explicit relay specification:

bash
1nak req -i <event_id> wss://relay.example.com

Edge Cases

No relays specified (prints event without publishing):

bash
1nak event -c "test" --sec <key> # Just prints the event JSON

Tag order matters for addressable events:

bash
1# The first 'd' tag is the identifier 2nak event -k 30023 -d first -d second # "first" is the identifier

Timestamp override:

bash
1nak event --ts 1700000000 -c "backdated" --sec <key> 2nak event --ts 0 -c "genesis" --sec <key> # Event at Unix epoch

Kind 0 (profile) requires JSON content:

bash
1nak event -k 0 -c '{"name":"Alice","about":"Developer"}' --sec <key>

POW (Proof of Work):

bash
1nak event --pow 20 -c "mined event" --sec <key> 2# Will compute hash until difficulty target is met

NIP-42 AUTH:

bash
1nak req --auth -k 1 wss://relay.example.com 2nak event --auth -c "test" --sec <key> wss://relay.example.com 3# Automatically handles AUTH challenges

Stdin takes precedence over flags:

bash
1echo '{"content":"from stdin"}' | nak event -c "from flag" --sec <key> 2# Uses "from stdin" (stdin overrides flags)

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is nak?

Perfect for Decentralized Data Agents needing to interact with the Nostr protocol. A mobile Cashu wallet

How do I install nak?

Run the command: npx killer-skills add SovranBitcoin/Sovran/nak. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for nak?

Key use cases include: Automating Nostr protocol interactions, Generating event feeds, Debugging Nostr-based applications.

Which IDEs are compatible with nak?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for nak?

Requires installation via script or trusted package manager. CLI tool dependency.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add SovranBitcoin/Sovran/nak. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use nak immediately in the current project.

Related Skills

Looking for an alternative to nak or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI