clerk-observability
Skill by jeremylongshore
Adds logging, monitoring and health checks to Clerk authentication in a Next.js app. It is for developers who need to debug auth issues in production or keep audit logs.
Install clerk-observability
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/clerk-observability ~/.claude/skills/clerk-observabilityRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/clerk-observability ~/.gemini/antigravity-cli/skills/clerk-observabilityAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install clerk-observability in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill sets up observability for Clerk authentication. It covers structured auth event logging with Pino, middleware timing that flags slow auth checks, and tracking of Clerk webhook events with processing time. It also adds Sentry error tracking with Clerk user context, a health check endpoint for the Clerk Backend API and the database, and an admin endpoint that counts sign-ins, sign-ups, permission denials and webhook events over 24 hours.
The skill is written as step-by-step code for a Next.js project using @clerk/nextjs. The logs are structured JSON, and the Sentry config strips the Clerk secret key from events before sending. It is aimed at developers who run Clerk in production and need monitoring or audit logs. The skill ends by pointing to clerk-incident-runbook for incident response.
Written from the project's SKILL.md and checked against it.
What it can do
- Structured auth event loggingLogs sign-in, sign-out, sign-up, permission denied and session expired events with Pino.
- Middleware performance trackingTimes Clerk middleware checks, logs slow ones and adds an X-Auth-Duration header.
- Webhook event trackingRecords Clerk webhook events such as user.created, session.created and session.ended with processing time.
- Sentry integrationSets Sentry user and org tags from Clerk and captures exceptions from wrapped API routes.
- Health check endpointChecks the Clerk Backend API and the database, returning 503 when a check is unhealthy.
- Admin auth metrics endpointReturns 24-hour counts of sign-ins, sign-ups, permission denials and webhook events for org admins.
What you need
- A working Clerk integration
- Sentry, DataDog or Pino as a monitoring or logging platform
- Structured JSON logging infrastructure (recommended)
- A database with an audit log table for the metrics endpoint
Try asking
- Set up Pino structured logging for Clerk sign-in and sign-out events
- Add a health check endpoint that tests Clerk and my database
- Wire Sentry so errors include the current Clerk user and org
Good to know
- Examples assume a Next.js project using @clerk/nextjs.
- Code samples depend on a db client and an auditLog table that you must provide.
- Sentry scrubbing only removes CLERK_SECRET_KEY from event extra data.
Security check
B- Allowed to use Write, Edit without limitsIn
SKILL.md
Checked automatically: skills/.curated/clerk-observability/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadWriteEditBash(npm:*)Grep
Alternatives to clerk-observability
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
clerk-observability: common questions
Which logger does this skill use for Clerk auth events?
It uses Pino, with pino-pretty as the transport when NODE_ENV is development. Log level comes from the LOG_LEVEL variable and defaults to info.
Does the Sentry setup protect Clerk secrets?
The example Sentry server config deletes CLERK_SECRET_KEY from event extra data in beforeSend if it was logged by accident.
What does the health check test?
It calls the Clerk Backend API with a user list request and runs SELECT 1 against the database. It returns healthy or degraded, with HTTP 503 when a check fails.
How do I install clerk-observability?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is clerk-observability free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is clerk-observability safe to use?
It scores 77 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.
What are alternatives to clerk-observability?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
