Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill pubky-stack명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | pubky-stack |
| description | > Use when this capability is needed. |
Pubky is an open protocol for censorship-resistant web apps where a user's Ed25519 public key IS their identity. The stack:
pubky + npm @synonymdev/pubky (JS/WASM, v0.6.0)For the complete JS SDK API, see references/sdk-usage.md.
For data model schemas, see references/pubky-app-specs.md.
For authentication flows, see references/authentication.md.
For full Docker stack setup, see references/pubky-docker.md.
User Keypair (Ed25519)
│
▼
Pubky Ring ─── or ─── In-app keypair / Recovery file
│
▼
Pubky SDK (Pubky facade → Signer → Session → Storage)
│ pubky:// URIs resolved via Pkarr + DHT
▼
Homeserver(s) ← key-value store, all data under /pub/ is public
│
▼ (events / polling)
Indexer (Nexus or custom) → REST API for aggregated queries
Pubky (facade)
├── .signer(keypair) → Signer
│ ├── .signup(hs, invite) → Session
│ ├── .signin() → Session
│ ├── .signinBlocking() → Session
│ ├── .approveAuthRequest(url)
│ └── .pkdns.* → PKDNS publishing
├── .publicStorage → PublicStorage (read-only, addressed paths)
├── .startAuthFlow(caps, kind, relay?) → AuthFlow
├── .restoreSession(snapshot)→ Session
├── .getHomeserverOf(pk) → string | undefined
└── .client → Client (raw HTTP)
Session
├── .info.publicKey → PublicKey
├── .info.capabilities → string[]
├── .storage → SessionStorage (read/write, absolute paths)
├── .signout()
└── .export() → string (snapshot for persistence)
signer.signup(homeserver, invite) registers on a homeserver → returns Session.Session.storage provides read/write via cookie-based auth./pub/<app_namespace>/<path>.pubky.publicStorage using addressed paths: <userPk>/pub/....SessionStorage uses absolute paths (your own data):
/pub/example.com/data.json
PublicStorage uses addressed form (any user's data):
<user_pk_z32>/pub/example.com/data.json
Both pubky<pk>/pub/... and pubky://<pk>/pub/... resolve to the same endpoint.
Convention: Put app data under a domain-like folder in /pub/, e.g., /pub/my-cool-app/.
Everything under /pub/ is public. Private data is not yet supported.
Pkarr lets any Ed25519 public key function as a sovereign TLD:
The SDK resolves addressed paths by looking up Pkarr records → finding the homeserver address → connecting via HTTPS.
npm install @synonymdev/pubky # Node 20+, ESM and CJS
import { Pubky, PublicKey, Keypair } from "@synonymdev/pubky";
const pubky = new Pubky(); // mainnet
// const pubky = Pubky.testnet(); // local testnet
const keypair = Keypair.random();
const signer = pubky.signer(keypair);
// Signup (first time — needs homeserver pk + optional invite code)
const homeserver = PublicKey.from("8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo");
const session = await signer.signup(homeserver, null);
// Write (session storage — absolute paths)
await session.storage.putJson("/pub/myapp/hello.json", { hello: "world" });
// Read publicly (public storage — addressed paths, no auth)
const pk = session.info.publicKey.z32();
const data = await pubky.publicStorage.getJson(`${pk}/pub/myapp/hello.json`);
For the complete API, see references/sdk-usage.md.
pubky = "0.5" # https://crates.io/crates/pubky — check for latest
The Rust SDK API may differ from the JS SDK in naming and structure. Always verify method signatures at https://docs.rs/pubky. Do not assume the JS examples translate directly to Rust.
Standardized schemas for social apps, stored under /pub/pubky.app/:
| Model | Path | ID Type |
|---|---|---|
| Profile | profile.json | Single file |
| Post | posts/<id> | Timestamp ID |
| Follow | follows/<user_pk> | Public key |
| Tag | tags/<id> | Hash ID |
| Bookmark | bookmarks/<id> | Hash ID |
| File | files/<id> | Timestamp ID |
| Feed | feeds/<id> | Timestamp ID |
Packages: cargo add pubky-app-specs (Rust) or build JS WASM from source with wasm-pack build --target bundler.
Custom apps use their own namespace (e.g., /pub/eventky.app/events/<id>). Many apps also read /pub/pubky.app/profile.json for cross-app user identity.
For full field definitions, see references/pubky-app-specs.md.
See references/authentication.md for all details. Summary of three methods:
pubky.startAuthFlow(caps, kind) generates a QR/deeplink URL. User approves in Pubky Ring. flow.awaitApproval() returns a Session.Keypair.random(), then signer.signup() / signer.signin().Keypair.fromRecoveryFile(bytes, passphrase) or import 12-word phrase in Pubky Ring.Homeservers are per-user stores. Cross-user queries need an indexer.
Pubky Nexus (official): Watches homeserver events → Neo4j graph + Redis cache → REST API.
https://nexus.pubky.app/swagger-ui//v0 (unstable, breaking changes expected)Custom indexers: Use the homeserver's /events-stream endpoint with ?path= prefix filtering and per-user cursors for efficient incremental polling. Fallback: poll via pubky.publicStorage.list().
See references/indexer-patterns.md.
See references/app-architectures.md.
# Install and run testnet (homeserver + relay only)
cargo install pubky-testnet
pubky-testnet
// Point SDK at testnet
const pubky = Pubky.testnet(); // defaults to localhost
// const pubky = Pubky.testnet("custom-host"); // e.g., Docker bridge
For running the complete stack including Nexus indexer, Neo4j, Redis, and client apps:
git clone https://github.com/pubky/pubky-docker.git
cd pubky-docker
cp .env-sample .env
docker compose up -d
This gives you: Homeserver (6287), Nexus API (8080), Neo4j (7474), Redis Insight (8001), HTTP relay (15412).
See references/pubky-docker.md for full configuration and service details.
See references/repository-reference.md for all repos, packages, and URLs.
/pub/ data is public. No private data support yet./v0 — breaking changes expected.references/sdk-usage.md for details.publicStorage does NOT work in the browser. Cross-user reads silently fail. Proxy public reads through your backend/indexer instead. See references/sdk-usage.md Browser Notes.@synonymdev/pubky to serverExternalPackages in next.config.ts. See references/sdk-usage.md.base32 crate does NOT match JS manual encoding for 64-bit values (bit padding mismatch). Write a custom decoder. See references/indexer-patterns.md.Converted and distributed by TomeVault — claim your Tome and manage your conversions.