claude up some atproto stuff
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

restore API contract details cut too aggressively

curl examples document endpoint URLs, parameter names, and response
shapes — not teaching Claude how to use curl. UFOs gets actual query
params (sort, prefix, collection detail) since the worker was guessing
blindly. CORS note in app-patterns. Spacedust gets a concrete websocat
example showing filter construction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 296fa368 45bb2a4d

+59 -6
+10 -2
skills/app-patterns/SKILL.md
··· 16 16 17 17 Typical flow: get initial counts from Constellation, resolve identities/records via Slingshot, then open a Spacedust WebSocket to keep things live. 18 18 19 - For writes and `listRecords`, go through the user's PDS directly (get PDS URL from Slingshot's `resolveMiniDoc`). 19 + ## example: engagement counters 20 + 21 + 1. Fetch like/repost counts from Constellation's `getBacklinksCount` (parallel requests, one per source type per post URI) 22 + 2. Resolve author identities via Slingshot's `resolveMiniDoc` to get handles and avatars 23 + 3. Open a Spacedust WebSocket filtered to the post URIs + wanted sources to increment/decrement counts live 24 + 25 + ## writes and listRecords 26 + 27 + Go through the user's PDS directly — Slingshot is read-only and doesn't support `listRecords`. Get the PDS URL from `resolveMiniDoc`, then call `com.atproto.repo.listRecords` on that PDS. For writes, use **pdsx** or hit the PDS XRPC endpoints directly with auth. 20 28 21 29 ## bundled tools 22 30 ··· 26 34 27 35 ## notes 28 36 29 - - all Microcosm services are unauthenticated 37 + - all Microcosm services are unauthenticated and support CORS — safe to call directly from client-side apps 30 38 - for lexicons beyond `app.bsky.*`, use UFOs to discover what exists 31 39 - check each service's live docs for the latest API details
+10 -2
skills/constellation/SKILL.md
··· 33 33 # {"total":16} 34 34 ``` 35 35 36 - **List who interacted** — `getBacklinks` returns `{total, records: [{did, collection, rkey}], cursor}`. 36 + **List who interacted** — `getBacklinks`: 37 + ```bash 38 + curl "https://constellation.microcosm.blue/xrpc/blue.microcosm.links.getBacklinks?subject=at://did:plc:hdhoaan3xa3jiuq4fg4mefid/app.bsky.feed.post/3lwcmto4tck2h&source=app.bsky.feed.like:subject.uri&limit=5" 39 + # {"total":16,"records":[{"did":"did:plc:...","collection":"app.bsky.feed.like","rkey":"3lwd..."},...], "cursor":"..."} 40 + ``` 37 41 38 - **Explore all link types** — `/links/all?target={did}` shows every collection+path linking to a DID with counts. 42 + **Explore all link types** — `/links/all?target={did}`: 43 + ```bash 44 + curl "https://constellation.microcosm.blue/links/all?target=did:plc:hdhoaan3xa3jiuq4fg4mefid" | jq . 45 + # shows every collection+path linking to this DID with counts 46 + ``` 39 47 40 48 **Distinct DIDs** — `/links/distinct-dids` (legacy; XRPC `getBacklinkDids` is in source but not yet deployed). Uses dot-prefixed paths (`.subject.uri`) and `target` param. 41 49
+10 -2
skills/slingshot/SKILL.md
··· 23 23 curl "https://slingshot.microcosm.blue/xrpc/blue.microcosm.repo.getRecordByUri?at_uri=at://did:plc:.../app.bsky.actor.profile/self" | jq . 24 24 ``` 25 25 26 - **Standard atproto getRecord** also works — `repo` accepts handles or DIDs. 26 + **Fetch record (standard atproto API)** — `repo` accepts handles or DIDs: 27 + ```bash 28 + curl "https://slingshot.microcosm.blue/xrpc/com.atproto.repo.getRecord?repo=did:plc:xbtmt2zjwlrfegqvch7fboei&collection=app.bsky.actor.profile&rkey=self" 29 + # {"uri":"at://...","cid":"bafy...","value":{...}} 30 + ``` 27 31 28 - **Resolve handle to DID only** — `com.atproto.identity.resolveHandle` 32 + **Resolve handle to DID only:** 33 + ```bash 34 + curl "https://slingshot.microcosm.blue/xrpc/com.atproto.identity.resolveHandle?handle=zzstoatzz.io" 35 + # {"did":"did:plc:xbtmt2zjwlrfegqvch7fboei"} 36 + ``` 29 37 30 38 ## when to use slingshot vs PDS directly 31 39
+7
skills/spacedust/SKILL.md
··· 47 47 {"type": "options_update", "payload": {"wantedSubjectDids": ["did:plc:..."], "wantedSources": ["app.bsky.graph.follow:subject"]}} 48 48 ``` 49 49 50 + ## quick start 51 + 52 + ```bash 53 + # watch for new followers of bsky.app 54 + websocat "wss://spacedust.microcosm.blue/subscribe?wantedSources=app.bsky.graph.follow:subject&wantedSubjectDids=did:plc:z72i7hdynmk6r22z27h6tvur" 55 + ``` 56 + 50 57 ## notes 51 58 52 59 - events are buffered 21 seconds to filter quickly-undone interactions; `instant=true` bypasses this
+22
skills/ufos/SKILL.md
··· 13 13 **Source:** https://github.com/at-microcosm/microcosm-rs/tree/main/ufos 14 14 15 15 Use it to discover what atproto apps exist beyond Bluesky, check if a lexicon is active, or understand what records look like in an unfamiliar collection. Start with the web explorer for interactive browsing. 16 + 17 + ## API endpoints 18 + 19 + **List collections** — sorted by activity: 20 + ```bash 21 + curl "https://ufos-api.microcosm.blue/collections?sort=dids-estimate&limit=20" 22 + # sort options: "dids-estimate" (most users) or "records-created" (most records) 23 + # returns {"collections":[{"nsid":"app.bsky.feed.post","creates":...,"updates":...,"deletes":...,"dids_estimate":...},...]} 24 + ``` 25 + 26 + Note: the default sort is alphabetical, which surfaces junk/spam NSIDs first. Always specify `sort=dids-estimate` for useful results. 27 + 28 + **Collection detail** — timeseries and sample records: 29 + ```bash 30 + curl "https://ufos-api.microcosm.blue/collection/app.bsky.feed.post" 31 + # returns stats, timeseries data, and sample records for the collection 32 + ``` 33 + 34 + **Search collections by prefix:** 35 + ```bash 36 + curl "https://ufos-api.microcosm.blue/collections?prefix=app.bsky&sort=dids-estimate" 37 + ```