Skip to main content
skill CX Codex

observability-baseline — Claude Code skill

Bakes error capture in Sentry, request-id structured logs and /healthz plus /readyz endpoints into a freshly generated service. Useful when the app is still being scaffolded and you don't want the first prod failure to go unseen.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add avelikiy/great_cto --skill observability-baseline -a claude-code
Open on GitHub

What observability-baseline does

The skill runs while an app is being generated. It puts three pieces in place: Sentry initialization with the DSN read from SENTRY_DSN rather than written into code, a logger that emits JSON carrying a request_id per request, and two endpoints — GET /healthz for liveness and GET /readyz for readiness, which checks that dependencies such as the database and cache answer. Diagnostics go to stderr so they stay out of user-facing output.

Wiring is the part that matters. app-scaffolder drops instrumentation.ts, the logger and the endpoints into the generated app and adds SENTRY_DSN to .env.example. infra-provisioner sets the variable in the prod environment and points the platform health probe at /readyz. l3-support reads Sentry and the request-id logs during triage, and devops fails the deploy gate when /readyz doesn't return 200 after a release.

Skip it for a plain library, a CLI with no running service, or a static site with no backend — there is nothing to probe or log. The Sentry project and endpoints get recorded in docs/infra/PROVISION-{slug}.md. Done means the three pieces are wired into the prod environment, not merely present in the code.

What it helps with

  • catch the first production error instead of hearing about it from users
  • tie every log line from one request together by request_id
  • give the load balancer an endpoint to check liveness against
  • verify the database and cache are reachable before taking traffic
  • fail a deploy when the service stops answering after release

Example prompts for the agent

  • Scaffold a new service and bake in Sentry, JSON logs with request_id, and /healthz and /readyz endpoints
  • Set SENTRY_DSN in the prod environment and point the platform health probe at /readyz
  • Check that /readyz returns 200 after deploy, otherwise stop the rollout

How to install observability-baseline

1Skills CLI (Vercel)

npx skills add avelikiy/great_cto --skill observability-baseline -a claude-code

2Manually: put the files in place

~/.claude/skills/observability-baseline/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/observability-baseline/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about observability-baseline

How do I install observability-baseline in Claude Code?

Run npx skills add avelikiy/great_cto --skill observability-baseline -a claude-code. The skill file lands at ~/.claude/skills/observability-baseline/SKILL.md.

What does observability-baseline do?

At scaffold time it adds Sentry error capture, structured logs with a request_id, and /healthz and /readyz endpoints. Without it the first prod incident stays invisible.

Which projects should not use this skill?

A plain library, a CLI with no running service, or a static site with no backend. There is no live service to probe or log.

Source text

SKILL.md · MIT
---
name: observability-baseline
description: Scaffold-time observability so a shipped product is not blind in prod from day one — error capture (Sentry), request-id structured logging, and /healthz + /readyz endpoints. stack-baseline pins Sentry but nothing wires it; this is the wiring. Loaded by app-scaffolder (bake into the scaffold), infra-provisioner (prod env + probes), and consumed by l3-support (traces) and devops (deploy gate).
when_to_use: |
  Apply when:
  - app-scaffolder is generating a new product (any archetype that runs as a service)
  - infra-provisioner is setting prod env vars + health probes
  - l3-support needs traces/logs to triage an incident
  Do NOT apply to:
  - pure library / cli archetypes with no running service
  - static marketing sites with no backend
effort: medium
allowed-tools: Read, Write, Edit, Grep, Glob
paths:
  - "src/**"
  - "app/**"
  - "docs/infra/**"
---

# observability-baseline

stack-baseline names Sentry and wires it nowhere — so every shipped product's first
prod incident is invisible, and l3-support triages blind. This skill makes three
things exist at scaffold time. Defaults baked in; no founder question.

## 1. Error capture (Sentry)

- `instrumentation.ts` (Next.js) / SDK init at process start; DSN from `SENTRY_DSN`
  env (never hardcoded).
- CI uploads source maps on release so stack traces are readable (release = git sha).
- Capture unhandled rejections + a global error boundary on the client.

## 2. Request-id structured logging

- A logger that emits **JSON** (not `console.log` prose) with a per-request
  `request_id` (generate at the edge, propagate via header/async-local-storage).
- Levels: error / warn / info / debug — diagnostics go to **stderr**, never mixed
  into user-facing stdout. (Same discipline as the CLI logging gap, DEEPEN d94.)
- One log line per request with: request_id, method, path, status, latency_ms.

## 3. Health endpoints

- `GET /healthz` — liveness (process up). `GET /readyz` — readiness (deps reachable:
  db, cache). Cheap, unauthenticated, no PII.
- These are what infra-provisioner probes and what a load balancer checks.

## Wiring (a skill is shelfware unless a consumer loads it)

| Consumer | What it does with this skill |
|----------|------------------------------|
| **app-scaffolder** | bakes `instrumentation.ts` + the JSON logger + `/healthz`+`/readyz` into the generated app; adds `SENTRY_DSN` to `.env.example` |
| **infra-provisioner** | sets `SENTRY_DSN` in the prod env list; points the platform health probe at `/readyz`; records the Sentry project in PROVISION |
| **l3-support** | first triage step reads Sentry + the request-id logs (a trace now exists to read) |
| **devops** | deploy gate fails if `/readyz` doesn't return 200 post-deploy |

## Output

A scaffolded app where the first prod error is captured, every request is traceable
by id, and the platform can health-check it. Record the Sentry project + endpoints
in `docs/infra/PROVISION-{slug}.md`. Done = the three pieces exist AND are wired
into the prod env, not just present in code.

© avelikiy · MIT · avelikiy/great_cto

Similar skills

All skills for DevOps and infrastructure →

From the same set11

test-strategy A skill for QA engineers that turns "90% coverage" into a defensible plan: what to test, why that set, and a signal that the tests actually catch bugs. CX Codex +1 ★ 107repo stars signing-preflight Checks before the first commit that the signing key is loaded and unlocked, and asks the operator to unlock it up front. CX Codex +1 ★ 107repo stars prose-style A writing contract for agent output: conclusion first, evidence over adjectives. Useful when a person reads the report, not a parser. CX Codex +1 ★ 107repo stars pm-planning Turns an approved architecture document into a Beads task list with dependencies, time-boxes and acceptance criteria. Built for the pm agent handing work to senior-dev. CX Codex +1 ★ 107repo stars great_cto The skill turns Claude into a pipeline orchestrator: you describe the task in plain words and the right agents run on their own. Useful when one agent drives a whole project. CX Codex +1 ★ 107repo stars deploy-landed The skill checks that the revision being served is the commit you meant, that its env reached the running process, and that the product actually works. Useful after any deploy or restart. CX Codex +1 ★ 107repo stars cost-model Pins down one format for the cost section in plans and architecture docs. Useful when a report claims savings and someone will ask how you got the number. CX Codex +1 ★ 107repo stars brainstorming Takes a raw product idea through three steps: divergent bets, a two-round argument between four personas on four models, and a synthesised call. CX Codex +1 ★ 107repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor