# sentry

Guides an agent through Sentry error capture and performance tracing in Next.js code. Use it while adding Sentry instrumentation to an application.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2800 installs · ★ 379
- Author: brianlovin
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/brianlovin/agent-config/tree/HEAD/skills/sentry/SKILL.md
- Updated: 2026-03-25
- HTML: https://affpapa.org/en/nevibecode/skills/brianlovin-sentry

## What it 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.

## Requirements
- Works with: Sentry

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add brianlovin/agent-config --skill sentry -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/sentry/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/sentry/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add brianlovin/agent-config --skill sentry -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/sentry/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add brianlovin/agent-config --skill sentry -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/sentry/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install brianlovin/agent-config sentry
```

2. **Manually: put the files in place**
- File: `.github/skills/sentry/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add brianlovin/agent-config --skill sentry -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/brianlovin/agent-config --path skills/sentry
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/sentry/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add brianlovin/agent-config --skill sentry -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/brianlovin/agent-config/tree/HEAD/skills/sentry/SKILL.md

## When to use it
- capture exceptions inside `try/catch` blocks
- trace HTTP requests with Sentry spans
- add spans around interface clicks
- attach context to structured log events

## Example prompts
- Add Sentry exception capture and rethrow the error in this `try/catch` block.
- Wrap `GET /api/items/${id}` in a Sentry client span.
- Set up `sentry.edge.config.ts` with `NEXT_PUBLIC_SENTRY_DSN` and logs.

## Similar
- [sentry-browser-sdk](https://affpapa.org/en/nevibecode/skills/sentry-browser-sdk.md) — skill · 2900 installs
- [sentry-svelte-sdk](https://affpapa.org/en/nevibecode/skills/sentry-svelte-sdk.md) — skill · 2100 installs
- [adding-error-tracking](https://affpapa.org/en/nevibecode/skills/adding-error-tracking.md) — skill · 386 installs
- [observability](https://affpapa.org/en/nevibecode/skills/observability.md) — skill · 7 installs
- [Sentry Bug Fixer](https://affpapa.org/en/nevibecode/prompts/sentry-bug-fixer.md) — prompt · ★ 174597
- [sentry-triage](https://affpapa.org/en/nevibecode/plugins/sentry-triage.md) — plugin · ★ 40418

## Other versions with the same name
- [sentry · openai](https://affpapa.org/en/nevibecode/skills/sentry.md) — 4 installs

From the same set: [brianlovin/agent-config](https://affpapa.org/en/nevibecode/by/brianlovin/agent-config.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
