Farfield Skills
Four .claude/skills/ live in the repository. They encode the patterns and aesthetics that run through every app.
Content Addressing
Give records and files a content-addressed identity — a CIDv1 sha-256 hash of the content itself, computed in-process. This provides verification, change detection, ETag caching, and deduplication with no IPFS node and no network.
Two identifiers
Every mutable record needs both a key and a CID:
| Key (slug, id) | CID |
| What it is | A stable name | A hash of the content |
| Changes on edit? | No | Yes |
| Reference by | This | Never this |
| Survives edit? | Yes | No — that is the point |
For immutable bytes (uploaded files, snapshots) the CID is the key. There is no separate slug, and GET /blobs/<cid> is safe to cache forever.
Primitive
A CIDv1 is 0x01 (v1) + 0x55 (raw codec) + 0x12 0x20 (sha2-256, 32 bytes) + the digest, base32-encoded with a b multibase prefix. Implemented in lib/cid with the standard library only.
Self-Migrating SQLite
A single-binary service should not need a migration tool, a migrations directory, or a manual "run migrations" step. The database migrates itself: openDB brings any database — fresh or years old — to the current schema, and every step is safe to run on every startup.
The openDB discipline
- CREATE TABLE IF NOT EXISTS — builds fresh DBs, no-ops on existing ones.
- Renames — before anything reads the new column name.
- Added columns — via
ensureColumn for tables that already exist.
- Backfills — populate new columns for pre-existing rows.
DSN
file:<path>?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)
WAL gives concurrent readers plus one writer; busy_timeout makes writers wait instead of erroring under contention.
Farfield Stack
Scaffold and build Go CRUD web applications in the farfield workspace using the standard library plus exactly one external dependency.
| Concern | Tool |
| HTTP server | net/http (http.ServeMux, method routing) |
| Routing | http.ServeMux patterns (GET /items/{id}) |
| Database | database/sql + modernc.org/sqlite |
| Templates | html/template |
| Static assets | embed + http.FileServerFS |
| JSON | encoding/json |
| Auth | crypto/subtle, crypto/rand, cookies |
| Logging | log/slog |
| Concurrency | goroutines |
Shared libraries under lib/ have zero dependencies:
lib/auth — password verify, session token, cookie helpers
lib/store — env loader, short-ID, session table helpers
lib/theme — shared CSS + editor JS, embedded
lib/cid — content-addressed identifiers
Farfield Style
Function and form, with function first. The aesthetic borrows from Dieter Rams (Braun), JPL / NASA technical documentation, and Swiss typography — high-contrast monochrome, generous whitespace, ruled dividers, restrained type. Nothing decorative earns its place unless it carries information.
Palette
| Token | Value | Usage |
| --surface | #fafaf7 | Page background — slightly warm, paper-like |
| --ink | #0a0a0a | All text, primary rules |
| --accent | #d93a00 | NASA red — status, callouts; never body text |
No gradients. No shadows. No additional colours.
Hierarchy via opacity
| Level | Opacity | Usage |
| Primary | 1.0 | Headings, body, links |
| Secondary | 0.7 | Labels, captions, meta |
| Tertiary | 0.5 | Timestamps, table headers, footnotes |
| Muted | 0.3 | Placeholders, disabled, empty states |
System fonts only. Mono for numerals, codes, identifiers, telemetry — anywhere alignment matters. Sans for prose.