Configure Sentry for local development with environment-aware settings.
Use when setting up dev vs prod DSN routing, enabling debug mode,
tuning sample rates for local work, or testing source maps locally.
Trigger with phrases like "sentry local dev", "sentry development config",
"debug sentry locally", "sentry dev environment", "sentry spotlight".
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Configure Sentry for local development with environment-aware settings.
Use when setting up dev vs prod DSN routing, enabling debug mode,
tuning sample rates for local work, or testing source maps locally.
Trigger with phrases like "sentry local dev", "sentry development config",
"debug sentry locally", "sentry dev environment", "sentry spotlight".
Designed for Claude Code, also compatible with Codex and OpenClaw
Sentry Local Dev Loop
Overview
Configure Sentry for local development with environment-aware DSN routing, debug-mode verbosity, full-capture sample rates, beforeSend inspection, Sentry Spotlight for offline event viewing, and sentry-cli source map verification. All configuration uses environment variables so nothing leaks into commits.
Prerequisites
@sentry/node v8+ installed (TypeScript/Node) or sentry-sdk v2+ installed (Python)
Separate Sentry project created for development (different DSN from production)
.env file with SENTRY_DSN_DEV and NODE_ENV=development
Network access to *.ingest.sentry.io (or use Spotlight for fully offline work)
Instructions
Step 1 -- Environment-Aware Configuration
Create an initialization file that routes events to the correct Sentry project based on environment, enables debug logging in dev, and captures 100% of traces locally:
Step 3 -- Sentry Spotlight and Offline Development
Sentry Spotlight runs a local sidecar that intercepts Sentry events and displays them in a browser UI at http://localhost:8969 (Spotlight's default port) — no network required:
# Install and run Spotlight sidecar (runs alongside your dev server)
npx @spotlightjs/spotlight
The spotlight: true option in Step 1's Sentry.init() routes events to the local sidecar. This gives you a full Sentry-style event viewer without sending anything to sentry.io.
For fully offline development or CI environments with no Sentry access:
// Offline mode — SDK loads but sends nothingSentry.init({
dsn: '', // Empty DSN = all capture calls become no-opsdebug: false, // No debug output since nothing is sent
});
// All Sentry.captureException() and captureMessage() calls still work// without throwing — your code runs without modification
Test source maps locally before deploying with sentry-cli: