sentry · brianlovin — Claude Code skill for Next.js monitoring
Guides an agent through Sentry error capture and performance tracing in Next.js code. Use it while adding Sentry instrumentation to an application.
npx skills add brianlovin/agent-config --skill sentry -a claude-codeWhat sentry does
The skill recommends capturing caught failures with Sentry.captureException(error) before rethrowing them. It adds spans around meaningful work, including interface clicks, HTTP client requests, and function calls. A span can carry an operation, a name, and attributes.
Next.js setup uses sentry.client.config.ts, sentry.server.config.ts, and sentry.edge.config.ts, while application code imports @sentry/nextjs. The setup example reads process.env.NEXT_PUBLIC_SENTRY_DSN and enables logs; logger supports context fields and formatted variables. Check the DSN environment value before running the app.
What it helps with
- capture exceptions inside
try/catchblocks - trace HTTP requests with Sentry spans
- add spans around interface clicks
- attach context to structured log events
Example prompts for the agent
- Add Sentry exception capture and rethrow the error in this
try/catchblock. - Wrap
GET /api/items/${id}in a Sentry client span. - Set up
sentry.edge.config.tswithNEXT_PUBLIC_SENTRY_DSNand logs.
How to install sentry
1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill sentry -a claude-code2Manually: put the files in place
~/.claude/skills/sentry/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sentry/
1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill sentry -a codex2Manually: put the files in place
.agents/skills/sentry/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill sentry -a cursor2Manually: put the files in place
.cursor/skills/sentry/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install brianlovin/agent-config sentry2Manually: put the files in place
.github/skills/sentry/SKILL.md1Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill sentry -a gemini-cli2Platform CLI
gemini skills install https://github.com/brianlovin/agent-config --path skills/sentryManually: put the files in place
.devin/skills/sentry/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add brianlovin/agent-config --skill sentry -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about sentry
How do I install sentry in Claude Code?
Run npx skills add brianlovin/agent-config --skill sentry -a claude-code, then run npx skills add brianlovin/agent-config --skill sentry -a claude-code again. The skill file is at ~/.claude/skills/sentry/SKILL.md.
What does sentry do?
This skill gives an agent patterns for adding Sentry to a Next.js project. It covers exception capture, performance spans, and structured logging.
Which Next.js configuration files does Sentry use?
It uses sentry.client.config.ts, sentry.server.config.ts, and sentry.edge.config.ts. Application code imports @sentry/nextjs.
Similar skills
Everything for Frontend and UI →sentry by other authors comes first.