nostrsocial

Social graph manager — contacts, trust tiers, and identity verification over Nostr

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nostrsocial" with this command: npx skills add vveerrgg/nostrsocial

NostrSocial — Social Graph for AI Agents

Give your AI agent the ability to manage contacts, enforce trust tiers, and track identity verification — all anchored to Nostr npub identity.

Install

pip install nostrsocial

Core Capabilities

1. Manage Contacts

Add contacts to friends, block, or gray lists with capacity enforcement.

from nostrsocial import SocialEnclave, Tier

enclave = SocialEnclave.create()
enclave.add("alice@example.com", "email", Tier.CLOSE, display_name="Alice")
enclave.block("spam@bad.com", "email")
enclave.gray("meh@example.com", "email")

2. Query Behavioral Rules

Get tier-based behavioral parameters for any contact.

rules = enclave.get_behavior("alice@example.com", "email")
# rules.token_budget, rules.warmth, rules.can_interrupt, etc.

# Unknown contacts get neutral behavior
rules = enclave.get_behavior("stranger@example.com", "email")
# warmth=0.5, token_budget=500

3. Identity Verification

Track identity state from proxy to claimed to verified.

# See who needs verification
for contact in enclave.get_upgradeable():
    print(f"{contact.display_name}: {contact.upgrade_hint}")

# Create a challenge for a claimed npub
challenge = enclave.create_challenge("npub1alice...")

4. Persistence

Save and load the social graph.

from nostrsocial import FileStorage

storage = FileStorage("~/.agent/social.json")
enclave = SocialEnclave.create(storage)
enclave.add("alice@example.com", "email", Tier.CLOSE)
enclave.save()

# Later
enclave = SocialEnclave.load(storage)

When to Use Each Module

TaskModuleFunction
Add/remove contactsenclaveSocialEnclave.add, block, gray, remove
Change trust tierenclavepromote, demote
Get behavioral rulesenclave / behaviorget_behavior
Check remaining slotsenclaveslots_remaining
Find unverified contactsenclaveget_unverified_contacts, get_upgradeable
Create verification challengeenclave / verifycreate_challenge
Derive proxy npubproxyderive_proxy_npub
Decay stale contactsenclavedecay
Persist social graphenclavesave / load

Important Notes

  • Friends list is capped at 150 (Dunbar's number): 5 intimate + 15 close + 50 familiar + 80 known
  • Block list holds 50. Gray list holds 100 with auto-decay.
  • Proxy npubs are deterministic — same identifier always maps to same npub
  • Identity state: proxy → claimed → verified. Verified contacts get warmer behavior.
  • Challenge verification requires relay interaction — stub only in 0.1.0
  • Depends on nostrkey for npub derivation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Leads

Leads - command-line tool for everyday use

Registry SourceRecently Updated
General

Bmi Calculator

BMI计算器。BMI计算、理想体重、健康计划、体重追踪、儿童BMI、结果解读。BMI calculator with ideal weight, health plan. BMI、体重、健康。

Registry SourceRecently Updated
General

Blood

Blood — a fast health & wellness tool. Log anything, find it later, export when needed.

Registry SourceRecently Updated
General

Better Genshin Impact

📦BetterGI · 更好的原神 - 自动拾取 | 自动剧情 | 全自动钓鱼(AI) | 全自动七圣召唤 | 自动伐木 | 自动刷本 | 自动采集/挖矿/锄地 | 一条龙 | 全连音游 - UI A better genshin impact, c#, auto-play-game, automatic, g...

Registry SourceRecently Updated