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 "${CLAUDE_PLUGIN_ROOT:-$HOME/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.testing
--- name: linear-pipeline description: The Fable orchestrator for a single dispatched Linear ticket. Holds almost no context itself; it receives `--issue <ID> --detached`, decides the stage sequence, and fans out a sub-agent per stage, passing forward only each stage's artifact (never re-derived, never inlined into its own context). Step zero, before any planning or stage routing, is a boundary triage against `canon/security-boundary.md` (#199): a match tags Ronan Connolly and stops the run, no
development
--- name: in-your-face description: Capture a chat-only answer into a durable artifact (markdown + HTML, PDF when cheap) and launch it automatically so the user cannot miss it. Use when user says "in your face", "don't let me lose this", "save that answer", "make that durable", or right after answering a substantive side question (a recipe, comparison, how-to, or generated prompt) that would otherwise die with the context. category: workflow argument-hint: [--no-open] [--vault <short>] [hint of
tools
One-shot headless OpenAI Codex CLI calls for background/admin AI tasks — summaries, classification, extraction, admin glue. The default engine for anything that runs AI constantly in the background (daemon-driven, per-event), because it bills the flat ChatGPT subscription instead of Claude usage or per-token API spend, and it keeps working while Claude is rate-limited. NEVER for coding — coding stays Claude. Use when a skill or daemon needs a cheap always-on AI call, when the user says "use codex", "ask codex", "codex as backup", or when building a background summarizer/classifier into a listener or loop. Reads auth from ~/.codex/auth.json (ChatGPT account, no API key).
research
Turn a warranty rejection, repair quote, or RMA email into a cited decision brief — legal read (NL/EU consumer law), is the part user-serviceable, live part and new-unit prices, repair-vs-DIY-vs-new economics, before-you-send-it checklist, deadlines. Use when the user pastes or screenshots a repair quote, warranty rejection, "not covered" email, onderzoekskosten fee, or asks "should I repair or replace this".