pds
Operate the AT Protocol Personal Data Server in the joelclaw k8s cluster. Use when checking PDS health, reading or writing dev.joelclaw.* records, restoring the service after a rebuild, or debugging session auth / repo DID drift.
What this skill does
# PDS — AT Protocol Personal Data Server
## Current truth
- Helm release: `bluesky-pds`
- Namespace: `joelclaw`
- Values: `infra/pds/values.yaml`
- Health URL: `http://localhost:9627/xrpc/_health`
- Host port: `9627`
- Service `nodePort`: `3000`
- Handle: `joel.pds.panda.tail7af24.ts.net`
- Current DID: `did:plc:5w6ablyvahugobsj7n57yjmm`
## CLI surface
```bash
joelclaw pds
joelclaw pds health
joelclaw pds describe
joelclaw pds collections
joelclaw pds records dev.joelclaw.system.log --limit 5
joelclaw pds write dev.joelclaw.system.log --data '{"action":"verify","tool":"pds","detail":"manual check"}'
joelclaw pds delete dev.joelclaw.system.log <rkey>
joelclaw pds session --refresh
```
Semantics:
- sessions cache at `~/.joelclaw/pds-session.json`
- the CLI and host system-bus client resolve the repo handle from `pds_joel_did` before `createSession`
- raw DID login was not reliable after the rebuild; handle login was
- `write` auto-adds `$type` and `createdAt`
## Restore after rebuild
A rebuilt cluster can bring back an **empty** PDS even when the pod is healthy.
Restoring the service is a two-step recovery:
### 1) Recreate secrets + Helm release
```bash
JWT_SECRET=$(secrets lease pds_jwt_secret --ttl 10m)
ADMIN_PASSWORD=$(secrets lease pds_admin_password --ttl 10m)
PLC_ROTATION_KEY=$(secrets lease pds_plc_rotation_key --ttl 10m)
kubectl create secret generic bluesky-pds-secrets \
-n joelclaw \
--from-literal=jwtSecret="$JWT_SECRET" \
--from-literal=adminPassword="$ADMIN_PASSWORD" \
--from-literal=plcRotationKey="$PLC_ROTATION_KEY" \
--from-literal=emailSmtpUrl='' \
--dry-run=client -o yaml | kubectl apply -f -
helm upgrade --install bluesky-pds nerkho/bluesky-pds \
-n joelclaw \
-f ~/Code/joelhooks/joelclaw/infra/pds/values.yaml
kubectl patch svc bluesky-pds -n joelclaw --type='json' \
-p='[{"op":"replace","path":"/spec/ports/0/nodePort","value":3000}]'
kubectl rollout status deployment/bluesky-pds -n joelclaw
curl -fsS http://localhost:9627/xrpc/_health
```
### 2) Recreate Joel's account if the PVC was wiped
```bash
ADMIN_PASSWORD=$(secrets lease pds_admin_password --ttl 10m)
JOEL_PASSWORD=$(secrets lease pds_joel_password --ttl 10m)
INVITE_CODE=$(curl -fsS -u "admin:${ADMIN_PASSWORD}" \
-H 'content-type: application/json' \
-d '{"useCount":1}' \
http://localhost:9627/xrpc/com.atproto.server.createInviteCode | jq -r '.code')
curl -fsS -X POST http://localhost:9627/xrpc/com.atproto.server.createAccount \
-H 'content-type: application/json' \
-d "$(jq -nc \
--arg email '[email protected]' \
--arg handle 'joel.pds.panda.tail7af24.ts.net' \
--arg password "$JOEL_PASSWORD" \
--arg inviteCode "$INVITE_CODE" \
'{email:$email,handle:$handle,password:$password,inviteCode:$inviteCode}')"
```
**Then update `pds_joel_did`** to the new DID returned by `createAccount`.
If you skip that, the host dual-write path will authenticate against a dead repo.
## Fast checks
```bash
curl -fsS http://localhost:9627/xrpc/_health
joelclaw pds describe
joelclaw pds collections
kubectl get deploy,svc,pods,pvc -n joelclaw | rg 'bluesky-pds|NAME'
kubectl logs -n joelclaw -l app.kubernetes.io/name=bluesky-pds --tail=50
```
## Gotchas
1. `nodePort` must stay `3000`. Host exposure is `9627`, but the service still targets container-side port `3000`.
2. Rebuilds can wipe the PVC and silently invalidate the old DID.
3. `createSession` worked against the handle on the rebuilt PDS but rejected raw DID login.
4. `describeRepo` is the truth source for recovering the current handle from a stored DID.
## Key files
- `infra/pds/values.yaml`
- `packages/cli/src/commands/pds.ts`
- `packages/system-bus/src/lib/pds.ts`
- `docs/deploy.md`
- `Vault/docs/decisions/0044-pds-private-first-with-bento-bridge.md`
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.