Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bluesky-jetstream

БесплатноБез исполняемых скриптовНе проверен

Bluesky Jetstream Firehose Skill

plurigridот plurigrid★ 73 звезды на GitHub

Об этом скилле

Bluesky Jetstream Firehose Skill

GF(3) Trit: -1 (MINUS - validator/filter on incoming data stream) Role: Constrain and validate Bluesky firehose events before processing

Overview

Jetstream is Bluesky's simplified JSON firehose - a WebSocket streaming API that provides real-time access to all public activity on the Bluesky network. Unlike the full atproto firehose (which uses CBOR/CAR binary encoding), Jetstream delivers plain JSON, making it accessible for rapid prototyping.

Endpoints:

  • Primary: wss://jetstream2.us-east.bsky.network/subscribe
  • Backup: wss://jetstream1.us-west.bsky.network/subscribe

Source: github.com/bluesky-social/jetstream

Query Parameters

Parameter Type Description
wantedCollections string[] Filter by NSID (repeatable)
wantedDids string[] Filter by specific DIDs (repeatable)
compress boolean Enable zstd compression
cursor integer Resume from timestamp (microseconds since epoch)

Example URL:

wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post&wantedCollections=app.bsky.feed.like

Message Types

commit

Repository commit events (most common):

{
  "did": "did:plc:abc123...",
  "time_us": 1703123456789012,
  "kind": "commit",
  "commit": {
    "rev": "3k...",
    "operation": "create",
    "collection": "app.bsky.feed.post",
    "rkey": "3k...",
    "record": {
      "$type": "app.bsky.feed.post",
      "text": "Hello world!",
      "createdAt": "2024-12-21T10:00:00.000Z"
    },
    "cid": "bafyrei..."
  }
}

identity

Identity updates:

{
  "did": "did:plc:abc123...",
  "time_us": 1703123456789012,
  "kind": "identity",
  "identity": {
    "did": "did:plc:abc123...",
    "handle": "alice.bsky.social",
    "seq": 12345
  }
}

account

Account status changes:

{
  "did": "did:plc:abc123...",
  "time_us": 1703123456789012,
  "kind": "account",
  "account": {
    "active": true,
    "did": "did:plc:abc123...",
    "seq": 12345
  }
}

Collection NSIDs

NSID Description
app.bsky.feed.post Posts/skeets
app.bsky.feed.like Likes
app.bsky.feed.repost Reposts
app.bsky.graph.follow Follows
app.bsky.graph.block Blocks
app.bsky.graph.list Lists
app.bsky.graph.listitem List memberships
app.bsky.actor.profile Profile updates
app.bsky.feed.threadgate Thread gates
app.bsky.feed.postgate Post gates

JavaScript Example

const ws = new WebSocket(
  'wss://jetstream2.us-east.bsky.network/subscribe?' +
  'wantedCollections=app.bsky.feed.post'
);

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  if (data.kind === 'commit' && data.commit.operation === 'create') {
    console.log(`[${data.did}]: ${data.commit.record.text}`);
  }
};

Babashka/Clojure Example

(ns bluesky.jetstream
  (:require [clojure.data.json :as json]
            [org.httpkit.client :as http]))

(def GAMMA 0x9E3779B9)

(defn splitmix32 [x]
  (let [z (bit-and (+ x GAMMA) 0xFFFFFFFF)
        z (bit-and (* (bit-xor z (unsigned-bit-shift-right z 15)) 0x85EBCA6B) 0xFFFFFFFF)
        z (bit-and (* (bit-xor z (unsigned-bit-shift-right z 13)) 0xC2B2AE35) 0xFFFFFFFF)]
    (bit-xor z (unsigned-bit-shift-right z 16))))

(defn cid->trit [cid]
  (let [hash (reduce #(bit-xor (unchecked-multiply %1 31) (int %2)) 0 cid)
        hue (mod (splitmix32 hash) 360)]
    (cond
      (or (< hue 60) (>= hue 300)) +1   ; PLUS (warm)
      (< hue 180) 0                      ; ERGODIC (neutral)
      :else -1)))                        ; MINUS (cold)

(defn process-event [event]
  (when (and (= (:kind event) "commit")
             (= (get-in event [:commit :operation]) "create"))
    (let [cid (get-in event [:commit :cid])
          text (get-in event [:commit :record :text])
          trit (cid->trit cid)]
      {:did (:did event)
       :text text
       :cid cid
       :trit trit
       :trit-label (case trit 1 "PLUS" 0 "ERGODIC" -1 "MINUS")})))

Integration with Agent-o-rama

Memory Substrate Connection

;; Feed Jetstream events into memory substrate
(defn ingest-to-substrate [event memory-client]
  (when-let [processed (process-event event)]
    ;; Compress into control artifact
    (compress-trace memory-client
      [{:role :user 
        :content (format "Bluesky post from %s: %s" 
                         (:did processed) (:text processed))}]
      {:tags ["bluesky" (:trit-label processed)]
       :source "jetstream"
       :cid (:cid processed)})))

Decay Tracking

Posts from Jetstream get the same decay epistemology:

  • Half-life: 10 hours (HALF_LIFE_MS = 36000000)
  • Renewal: User engagement (likes, replies) renews the artifact
  • Expiration: Unrenewed posts decay to trit=0 (neutral)

GF(3) Conservation

Eac

Полный SKILL.md на GitHub

Установить bluesky-jetstream в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл bluesky-jetstream?

Bluesky Jetstream Firehose Skill

Как установить скилл bluesky-jetstream?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bluesky-jetstream запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bluesky-jetstream с