# sentry-best-practices

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 106 installs · ★ 23 repo stars
- Author: andrelandgraf
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/andrelandgraf/fullstackrecipes/tree/HEAD/skills/sentry-best-practices/SKILL.md
- Updated: 2026-06-08
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/sentry-best-practices

## What it does

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.

## Requirements
- Works with: Sentry

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install andrelandgraf/fullstackrecipes skills/sentry-best-practices
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/andrelandgraf/fullstackrecipes --path skills/sentry-best-practices
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add andrelandgraf/fullstackrecipes --skill sentry-best-practices -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/andrelandgraf/fullstackrecipes/tree/HEAD/skills/sentry-best-practices/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [sentry-go-sdk](https://affpapa.org/en/nevibecode/skills/sentry-go-sdk.md) — skill · 2300 installs
- [sentry-nextjs-sdk](https://affpapa.org/en/nevibecode/skills/sentry-nextjs-sdk.md) — skill · 3800 installs
- [sentry](https://affpapa.org/en/nevibecode/rules/sentry.md) — rule · ★ 3589 repo stars
- [sentry-automation](https://affpapa.org/en/nevibecode/skills/sentry-automation.md) — skill · 123 installs
- [openai-sentry](https://affpapa.org/en/nevibecode/plugins/openai-openai-sentry.md) — plugin · ★ 540 repo stars
- [adding-error-tracking](https://affpapa.org/en/nevibecode/skills/adding-error-tracking.md) — skill · 423 installs

From the same set: [andrelandgraf/fullstackrecipes](https://affpapa.org/en/nevibecode/by/andrelandgraf/fullstackrecipes.md) — 9 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
