sentry-best-practices — Claude Code skill for Sentry
The sentry-best-practices Claude Code skill guides Sentry error capture, context, tracing, and logging in application code. It activates during work on error handling or performance instrumentation.
The skill shows how to send caught exceptions to Sentry and associate them with user and error details. It also covers tracing operations with spans, recording custom breadcrumbs, and writing structured logs through Sentry Logger.
Its examples use @sentry/nextjs. The Sentry Setup recipe comes first. Clear the session user on sign-out, or that user's details can remain attached to the session.
What it helps with
send caught exceptions to Sentry
attach user and error details to an exception
trace API calls and UI actions with spans
record structured Sentry logs
Example prompts for the agent
Add Sentry reporting for caught application errors.
Attach the current user and order details to this exception.
Trace the API request and the button click with spans.
How to install sentry-best-practices
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a claude-code
2Manually: put the files in place
~/.claude/skills/sentry-best-practices/SKILL.md
Copy the whole skill folder; for one project use .claude/skills/sentry-best-practices/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a codex
2Manually: put the files in place
.agents/skills/sentry-best-practices/SKILL.md
For all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a cursor
2Manually: put the files in place
.cursor/skills/sentry-best-practices/SKILL.md
Cursor also reads .agents/skills/ and .claude/skills/
How do I install sentry-best-practices in Claude Code?
Run npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a claude-code. The skill file is placed at ~/.claude/skills/sentry-best-practices/SKILL.md.
What does sentry-best-practices do?
It explains how to capture exceptions, attach user and error context, trace operations, add breadcrumbs, and write structured Sentry logs.
What does sentry-best-practices need to work?
Complete the Sentry Setup recipe first. The examples use the @sentry/nextjs package.