skills/setup-logging/SKILL.md
--- name: setup-logging description: Set up (or audit) the observability stack in a TanStack Start + Cloudflare Workers app so it is "diagnosable by default" — structured logging (logtape) with a request context carrying trace_id + userId + tenant/orgId, a trace_id propagated FE→BE→logs→Sentry→PostHog, Cloudflare Workers observability enabled, and Sentry + PostHog wired. Two modes: `setup` (wire it into an app) and `audit` (check an existing app + report gaps). Use when scaffolding a new app, wh
npx skillsauth add RonanCodes/ronan-skills skills/setup-loggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A repo is diagnosable when a bug can be traced from one id across every layer. This skill installs (mode setup) or verifies (mode audit) that baseline. It is the supply side of /ro:diagnose (the demand side).
@logtape/logtape), JSON formatter, console sink (so wrangler tail + CF Workers Logs see it) + a Sentry sink at warning+ (alerts, with breadcrumbs). One log(category) helper.AsyncLocalStorage (withRequestLogContext) carrying trace_id, userId, and the tenant id (orgId/accountId) so EVERY log line in a request is correlatable. Identity set as soon as it's resolved (so even early returns carry it).x-<app>-trace-id on every /api/* fetch, read (or minted) at the worker boundary, threaded into the log context + Sentry.setTag + a PostHog property. (Reference: dataforce #288.)"observability": { "enabled": true } in wrangler.jsonc (historical Workers Logs; without it wrangler tail is live-only)./ro:diagnose sweeps all exist.configureLogger(env) themselves. logtape config is per-isolate; a DO that calls log(...) without configuring has no sink → logs vanish silently.configured guard before the async configure() resolves. A pattern like configured = true; void configure({...}) permanently disables logging if configure is slow or throws. Await configure() and set the guard only on success.wrangler tail and confirm a real log line appears. "We added a log" ≠ "the log emits."bash ~/Dev/ronan-skills/skills/setup-logging/scripts/audit-logging.sh <repo-path>
Greps the repo + reports a pass/fail checklist against the baseline above (logtape present, console sink, request context, trace_id propagation, observability.enabled, Sentry, PostHog, DO-configureLogger, guard-race). For each FAIL, propose the concrete fix; for high-value gaps, offer to implement. End with a one-line "diagnosable: yes/partial/no".
The script is a heuristic sweep — confirm findings by reading the flagged files, and for the two gotchas, actually trace whether logs reach a sink (a wrangler tail smoke is the ground truth).
Wire the baseline into the app, mirroring the dataforce implementation (src/lib/logger.ts + src/lib/trace-id.ts + withRequestLogContext + wrangler.jsonc observability). Steps:
@logtape/logtape (+ @logtape/sentry if Sentry is present). Create src/lib/logger.ts: configureLogger(env) (await configure, set guard on success), withRequestLogContext, setRequestLogIdentity, log(category).src/lib/trace-id.ts (UUIDv7 + header const), FE fetch wrapper, worker-boundary resolve, thread into context + Sentry + PostHog.wrangler.jsonc: add "observability": { "enabled": true }.configureLogger(env).wrangler tail + hit an endpoint → confirm a structured line appears./ro:diagnose — consumes these logs to debug./ro:new-tanstack-app, /ro:new-app — call this during scaffolding./ro:sentry, /ro:posthog — per-tool wiring.configureLogger; the configured guard was set before the async configure() resolved). Codifies the baseline + the two silent-failure gotchas as a setup + audit skill.development
Close the loop on a Linear ticket when its work ships - move the status and post a deploy comment with the PR link, what shipped, and a try-it link, mentioning the collaborator. Used as the tail of /ro:linear-nightshift for every merged mirror, or manually after an ad-hoc build. Triggers on "linear update", "update the linear ticket", "mark NUT-x done", "tell eoin it shipped", "/ro:linear-update".
devops
Run a night-shift against a collaborator's Linear board. Pulls the team's Grilled tickets (/ro:linear-grill moves a ticket to Grilled once its questions are answered), VERIFIES the questions were actually answered (unanswered → bounce the ticket to the "Question for <name>" state), mirrors verified tickets to ephemeral GitHub issues with ready-for-agent, then runs the standard /ro:night-shift machinery on GitHub. Tail-calls /ro:linear-update for everything that merged + deployed. Triggers on "linear nightshift", "nightshift linear", "drain the linear board", "run the shift off linear", "/ro:linear-nightshift".
development
Grill a collaborator's Linear tickets and move every processed ticket to where it belongs. Resolves the board from the repo's .ro-linear.json, reads the collaborator's Backlog / Ready-for-agent issues, then per ticket either posts 3-5 decision-extracting questions (state moves to "Question for <name>") or confirms it build-ready (state moves to "Grilled", the gate /ro:linear-nightshift consumes); shipped-and-confirmed tickets close as Done. The async-collaborator counterpart of /ro:day-shift for people who never touch GitHub. Triggers on "grill linear", "grill eoin's tickets", "linear grill", "add questions to the linear tickets", "/ro:linear-grill".
development
--- name: about-page description: Add a standard About page to any web app, what it is, the tech stack, and an FAQ, wired into a footer link with a sticky footer. Built with Spartan + Tailwind (the canonical component layer) and falls back to semantic HTML so it ships reliably. Use whenever building, polishing, or shipping an app, every app should have one. Triggers on "add an about page", "about page", "footer about link", or as a standard step in app build/polish. category: frontend argument-h