CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Quarto website that displays daily statistics for labels emitted by skywatch.blue, a Bluesky/AT Protocol moderation labeller. Published at https://stats.skywatch.blue.
Build & Render
# Restore R package dependencies (renv)
Rscript -e 'renv::restore()'
# Render the full site
quarto render
# Preview with live reload
quarto previewOutput goes to _site/.
Data Pipeline
R/stats.R— Fetches labels from the Skywatch Ozone API (com.atproto.label.queryLabels), paginates with cursor-based pagination, appends new labels toall_labels.rds. Cursor position is persisted incursor.txt.index.qmd— Readsall_labels.rdsand generates daily label counts, hourly breakdowns (tables + line chart), per-DID label distributions (90-day window), and 3-day rolling averages per label.
Run R/stats.R before rendering to pull fresh label data.
Key Architecture Decisions
- renv manages R dependencies (R 4.3.3). Lock file is
renv.lock; activate script is.Rprofile→renv/activate.R. - Brand theming via
_brand.yml— Atkinson Hyperlegible font throughout. Referenced in_quarto.ymland in ggplot/gt code. - Two label lists in
index.qmd:.automated_labels(subset used for 90-day analysis) andlabels(full set used for daily views). When adding new labels, update the appropriate list. - All timestamps are UTC. Date filtering uses
lubridate::today(tzone='UTC') - 1(yesterday’s data). - Label data distinguishes
recordvsrepo(account-level) labels based on URI pattern (at://didprefix).