backend-observability
Skill9 starsChanged 42 days agoMITView on GitHub
Implement correlated errors, traces, and structured logs with PII redaction. Use when "add logging", "instrument this", or wiring Sentry/Langfuse. Plan-only audit → plan-error-handling. Sentry triage → debug-sentry-monitor.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- kensaurus/cursor-kenjiword for word, first seen Oct 1, 2026
- omonuj/claude-skillstheir own version, first seen Jul 23, 2026
Other versions2 projects use a version of this.
Word for word · 1
- kensaurus/cursor-kenji★ 9100% same
Edited · 0
None found.
Wrote their own version · 1
- omonuj/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository163 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/approved-plan-execution.mdcCursor rule
- .cursor/rules/skill-workflows.mdcCursor rule
- .cursor/rules/verification-before-completion.mdcCursor rule
- llms.txtllms.txt
- audit-accessibilitySkill
- audit-agent-speedSkill
- audit-analyticsSkill
- audit-auth-flowsSkill
- audit-backend-architectureSkill
- audit-bundle-sizeSkill
- audit-cicdSkill
- audit-codemod-safetySkill
- audit-code-qualitySkill
- audit-code-reviewSkill
- audit-db-schemaSkill
- audit-doctrineSkill
- audit-env-paritySkill
- audit-fe-apiSkill
- audit-gate-logicSkill
- audit-i18nSkill
- audit-infra-costSkill
- audit-langfuse-llmSkill
- audit-llm-securitySkill
- audit-monetization-iapSkill
- audit-payment-systemSkill
- audit-performanceSkill
- audit-realworldSkill
- audit-registry-listingSkill
- audit-resilienceSkill
- audit-responsiveSkill
- audit-securitySkill
- audit-skill-conflictsSkill
- audit-ui-statesSkill
- audit-uiux-design-systemSkill
- audit-ux-journeysSkill
- audit-uxSkill
- backend-db-performanceSkill
- backend-error-handlingSkill
- backend-patternsSkill
- backend-realtimeSkill
- burndown-fullSkill
- complete-everythingSkill
- data-pipelineSkill
- data-visualizationSkill
- debug-errorSkill
- debug-fe-be-integrationSkill
- debug-sentry-monitorSkill
- deploy-npmSkill
- deploy-verifySkill
- design-apiSkill
- design-canvasSkill
- design-emailSkill
- design-frontendSkill
- design-generative-artSkill
- design-mobile-firstSkill
- design-motionSkill
- design-prdSkill
- design-systemSkill
- design-themeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Stamp it on everything: every log line, Sentry setTag("request_id", id) / setContext, and the Langfuse trace (trace.id or metadata).
- Distinctive: line 55
Never log tokens, passwords, API keys, full PANs, auth headers, or raw request bodies.
- Very specific: line 72
Every alert names an owner and a first action.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Observability Instrumentation
Degree of freedom: MIXED. What to wrap and alert on [HIGH freedom];
correlation ids, PII redaction, and the DoD [LOW freedom — run exactly].
How to reason
- Observe — which ids, logs, spans, and PII already exist
- Interpret — can you pivot error ↔ trace ↔ log ↔ user from any one?
- Classify — add-correlation / convert-console / redact / wrap-span / alert
- Severity — uncorrelated prod 500 outranks a missing debug field
Worked example
Observe: checkout 500 in Sentry has no request_id; pino logs the cart id; no LLM (Langfuse unused). Interpret: cannot pivot error → logs; webhook still
console.logs. Classify: ALS request_id on logs +Sentry.setTag; convert console to pino; redactAuthorization. Verify: one id on the Sentry event and the log line;beforeSendstrips the header.
Self-critique before reporting
- Correlated — same request/trace id on the log, Sentry, and Langfuse
- Redacted — deny-list at the logger +
beforeSend, not per-call hope - Leveled — no
console.login prod; handled paths are noterror - Right owner — plan-only audit →
plan-error-handling; investigate a Sentry issue →debug-sentry-monitor
The build-time counterpart to your monitoring stack. The Sentry plugin installs the SDK;
debug-sentry-monitortriages after the fact;audit-langfuse-llmaudits LLM traces. This skill is about instrumenting correctly while you build so those tools have signal to work with — and so a 3am incident is debuggable.
When this fires
Adding logging / tracing / metrics to new code, reviewing instrumentation, or fixing "we can't tell what happened in prod." Not for installing an SDK (use the Sentry/Langfuse plugins) or post-hoc triage (use the monitor/audit skills).
The one rule that matters most: correlation [LOW freedom — run exactly]
A prod incident is only debuggable if you can pivot error ↔ trace ↔ log ↔ user from any one of them. Make every layer share an id.
- Generate/propagate a request id (or OTel
trace_id) at the entry point (HTTP middleware, edge function, job start). Put it in async context (AsyncLocalStorage/ context var), not a parameter threaded everywhere. - Stamp it on everything: every log line, Sentry
setTag("request_id", id)/setContext, and the Langfuse trace (trace.idor metadata). On an LLM error, attach the Langfuse trace URL to the Sentry event so you jump straight from the error to the prompt/response. - Set user/session/tenant scope (
Sentry.setUser, LangfuseuserId/sessionId) — scrubbed (see redaction).
Structured logging discipline [HIGH freedom]
- Structured, not string-soup. Emit JSON with stable fields (
level,msg,request_id,event, domain ids). One event per line. Use the platform logger (pino / structlog / slog), not bareconsole.log. - Levels mean things:
error= needs a human;warn= degraded but handled;info= state transitions / business events;debug= dev-only, off in prod. Don't logerrorfor handled flow. - No
console.logshipped to prod — it's unsearchable, unleveled, and a PII leak risk. Remove or convert to a leveled structured log. - Log decisions, not noise: log the branch taken + key inputs/outputs at boundaries, not every line. A log you'd never grep is cost, not signal.
PII / secret redaction (non-negotiable) [LOW freedom — run exactly]
- Never log tokens, passwords, API keys, full PANs, auth headers, or raw request bodies. Redact at the logger/transport layer (deny-list keys + pattern scrub) so it can't be bypassed per-call.
- Configure Sentry
beforeSend/ data-scrubbing and Langfuse masking to strip PII from events/traces. Assume anything you put in a span/breadcrumb may be retained. - For LLM traces: decide explicitly whether prompts/completions may contain PII; mask or hash before sending if the jurisdiction requires it.
Tracing / spans (what to wrap) [HIGH freedom]
- Wrap boundaries and slow/fallible work: inbound request, outbound HTTP/DB/queue calls, LLM calls, background jobs. Not every function.
- Name spans by operation (
http.server,db.query,llm.generate), add attributes (route, status, row count, model) — follow OTel semantic conventions, including the GenAI conventions for LLM spans (model, tokens in/out, cost, latency, temperature). - Sampling: you don't need 100%. Head-sample normal traffic (e.g. 10–20%), but always keep errors and slow outliers. Document the rate; it's a cost/visibility dial.
LLM-specific (Langfuse) [HIGH freedom]
- Capture per generation: prompt, response, model, input/output tokens, cost, latency, and the eval/score if you run one. Group multi-step agents under one trace with nested spans.
- Link the Langfuse
trace_idinto the surrounding request id and into Sentry on failure — so an LLM error in Sentry is one click from the full trace. - Tag traces with
userId/sessionId/ release soaudit-langfuse-llmcan slice quality by cohort.
Alerts & SLOs (signal, not noise) [HIGH freedom]
- Alert on symptoms users feel (error-rate spike, p95 latency, checkout/login failure, LLM eval-score drop), not every error. A pager that cries wolf gets muted.
- Define a few SLOs (availability, latency, key-flow success) and alert on burn rate, not raw counts.
- Every alert names an owner and a first action. Route via
sentry-create-alert/ your channel.
Definition of done [LOW freedom — do not skip]
- A shared request/trace id is on every log line, the Sentry scope, and the Langfuse trace.
- From a prod error you can reach the trace, the logs, and the user in ≤2 clicks.
- Logs are structured + correctly leveled; no
console.logshipped to prod. - PII/secret redaction is enforced at the logger + Sentry
beforeSend+ Langfuse masking. - Spans cover boundaries with OTel-conventional names/attributes; errors are never sampled out.
- LLM generations record model/tokens/cost/latency and link back to the request id.
- Alerts fire on user-felt symptoms with an owner, not on every error.
Composes with
- Sentry plugin (
sentry-sdk-setup,sentry-setup-ai-monitoring,sentry-create-alert,sentry-otel-exporter-setup) — SDK + alert wiring. - Langfuse plugin (
langfuse) +audit-langfuse-llm— LLM trace capture + quality audit. debug-sentry-monitor/debug-error— post-hoc triage of what this instrumentation surfaces.data-pipeline— per-run pipeline metrics use these same correlation + logging rules.workflow-spec-tdd— make "observable" part of the spec's "done when", not an afterthought.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

