home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-install-auth

This skill installs and configures the Sentry SDK authentication, setting DSN and initialization for immediate error capture.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-install-auth

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.2 KB
---
name: sentry-install-auth
description: |
  Install and configure Sentry SDK authentication.
  Use when setting up a new Sentry integration, configuring DSN,
  or initializing Sentry in your project.
  Trigger with phrases like "install sentry", "setup sentry",
  "sentry auth", "configure sentry DSN".
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Install Auth

## Prerequisites
- Node.js 18+ or Python 3.10+
- Package manager (npm, pnpm, or pip)
- Sentry account with project DSN
- DSN from Sentry project settings


See `{baseDir}/references/implementation.md` for detailed implementation guide.

## Output
- Installed SDK package in node_modules or site-packages
- Environment variable or .env file with DSN
- Sentry initialized and ready to capture errors

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources
- [Sentry Documentation](https://docs.sentry.io)
- [Sentry Dashboard](https://sentry.io)
- [Sentry Status](https://status.sentry.io)

Overview

This skill installs and configures Sentry SDK authentication so your app can report errors and performance data. It guides installing the appropriate SDK (Node or Python), setting the DSN in environment configuration, and initializing Sentry with sensible defaults for error capture. The result is a ready-to-use Sentry integration that begins sending events to your Sentry project.

How this skill works

The skill detects the target runtime (Node.js or Python), installs the matching Sentry package, and writes the DSN into an environment variable or .env file. It then inserts or displays the minimal initialization snippet to add to your application startup so Sentry begins capturing exceptions and transactions. The flow includes basic validation of the DSN and confirms installation success.

When to use it

  • Setting up a new Sentry integration for a web or backend project
  • Adding or changing the Sentry DSN in an existing application
  • Initializing Sentry when onboarding error monitoring in CI/CD
  • Configuring auth for serverless functions or containerized apps
  • Preparing a project to capture exceptions and performance traces

Best practices

  • Use environment variables (e.g., SENTRY_DSN) instead of hardcoding the DSN
  • Install the runtime-specific SDK (@sentry/node, @sentry/browser, or sentry-sdk for Python)
  • Initialize Sentry early in app startup to catch initialization-time errors
  • Set release and environment tags for meaningful grouping and filtering
  • Limit PII by configuring data scrubbing and sample rates

Example use cases

  • Node.js API: install @sentry/node, set SENTRY_DSN in .env, and call Sentry.init in server entrypoint
  • React app: install @sentry/react, configure DSN and error boundaries for UI crash reporting
  • Python backend: pip install sentry-sdk and initialize with sentry_sdk.init(dsn=os.getenv('SENTRY_DSN'))
  • Serverless function: inject DSN via environment variable in deployment config and wrap handlers with Sentry
  • CI/CD: automate SDK install and inject DSN during build or deployment for consistent monitoring

FAQ

What DSN should I use?

Use the DSN string from your Sentry project settings; treat it as a configuration secret and store it in env variables or a secrets manager.

Which package should I install?

Choose the SDK that matches your runtime: @sentry/node or @sentry/browser for Node/JS, @sentry/react for React, and sentry-sdk for Python.