agentleFS
Rikinshah787Rikinshah787/agent-skills-production-skills/skills/sentry/SKILL.md

sentry

Skill2 starsChanged 4 months agoMITView on GitHub

Use to monitor production errors, traces, logs, and session replays with readable source-mapped stack traces and actionable release alerts.

  • Reads credentials

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use datadog, postgres and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    datadog

    Query live Datadog telemetry (logs, metrics, traces, spans, monitors, incidents, dashboards, services, hosts) through Datadog's Pup CLI. Use when users ask to investigate production behavior in Datadog, including searching logs, checking monitor status, inspecting traces or spans, looking up incidents, finding services, or correlating metrics. Do not use it for Sentry issues, repository/source-code work, or ticketing.

    Also in 4 projects that use this

  • digitalocean-labsSkill

    postgres

    Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.

    Also in 3 projects that use this

  • SentrySkill

    cloudflare

    Cloudflare production operations via the Cloudflare API MCP server. Use when users ask to investigate Workers errors or performance, check build or deployment status, query logs, inspect DNS records, check load balancer pool health, review Zero Trust tunnels, or manage Cloudflare resources. Do not use for Sentry issues, GitHub/Linear ticketing, or non-Cloudflare infrastructure.

    Also in 4 projects that use this

  • VercelSkill

    slack

    Emulated Slack API for local development and testing. Use when the user needs to interact with Slack API endpoints locally, test Slack integrations, emulate channels/messages/users/views, set up Slack OAuth flows, test incoming webhooks, or work with the Slack Web API without hitting the real Slack API. Triggers include "Slack API", "emulate Slack", "mock Slack", "test Slack OAuth", "Slack bot", "Slack views", "incoming webhook", "local Slack", or any task requiring a local Slack API.

    Also in 3 projects that use this

  • NVIDIASkill

    github

    Interact with GitHub using the gh CLI restricted to REST API only (no GraphQL). Use when the user wants to work with GitHub issues, pull requests, repos, releases, or Actions — especially in sandboxed environments where the GraphQL endpoint may be blocked. Trigger keywords - github, gh, pull request, PR, github issue, github actions, workflow, release, gh api.

    Also in 4 projects that use this

  • VercelSkill

    agent-browser

    Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

    Also in 5 projects that use this

  • +1 more from getsentry

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when: you need production error reporting with stack traces, context, alerts, and release tracking.

    line 21
  2. Distinctive:

    Use when: you want performance traces, structured logs, or privacy-configured session replay.

    line 22
  3. Distinctive:

    Don't use for: infrastructure metrics and long-term log storage as your only observability system.

    line 23

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sentry - Skillship

Capture production exceptions, traces, logs, and replays, then connect minified failures to the original source and the release that introduced them.

🧭 When to use this skill

  • Use when: you need production error reporting with stack traces, context, alerts, and release tracking.
  • Use when: you want performance traces, structured logs, or privacy-configured session replay.
  • Don't use for: infrastructure metrics and long-term log storage as your only observability system.

⚡ Quickstart

1. Run the framework wizard (recommended for Next.js)

npx @sentry/wizard@latest -i nextjs

The wizard installs @sentry/nextjs, configures client/server/edge runtimes, wraps Next.js config for source maps, and creates a test route.

2. Configure deployment variables

NEXT_PUBLIC_SENTRY_DSN=https://public-key@o123.ingest.sentry.io/456
SENTRY_AUTH_TOKEN=sntrys_... # SECRET, build/CI only; uploads source maps

The DSN identifies where events go and is safe to expose. The auth token grants API access and is secret.

3. Minimal client initialization

// instrumentation-client.ts
import * as Sentry from "@sentry/nextjs";

Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
  enabled: process.env.NODE_ENV === "production",
  tracesSampleRate: 0.1,
  replaysSessionSampleRate: 0.0,
  replaysOnErrorSampleRate: 1.0,
  integrations: [Sentry.replayIntegration()],
});

export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;

🧩 Common recipes

Recipe: Register server and edge runtimes

// instrumentation.ts
import * as Sentry from "@sentry/nextjs";

export async function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") {
    await import("./sentry.server.config");
  }
  if (process.env.NEXT_RUNTIME === "edge") {
    await import("./sentry.edge.config");
  }
}

export const onRequestError = Sentry.captureRequestError;

Initialize Sentry.init(...) separately in sentry.server.config.ts and sentry.edge.config.ts.

Recipe: Upload source maps during production builds

// next.config.ts
import type { NextConfig } from "next";
import { withSentryConfig } from "@sentry/nextjs";

const nextConfig: NextConfig = {};

export default withSentryConfig(nextConfig, {
  org: "your-org-slug",
  project: "your-project-slug",
  authToken: process.env.SENTRY_AUTH_TOKEN,
  silent: !process.env.CI,
});

Recipe: Capture an expected failure with context

import * as Sentry from "@sentry/nextjs";

try {
  await chargeOrder(orderId);
} catch (error) {
  Sentry.captureException(error, {
    tags: { operation: "charge-order" },
    extra: { orderId },
  });
  throw error;
}

Recipe: Trace a slow operation

import * as Sentry from "@sentry/nextjs";

const result = await Sentry.startSpan(
  { name: "load-dashboard", op: "function" },
  async () => loadDashboard(),
);

Recipe: Capture App Router render errors

// app/global-error.tsx
"use client";

import * as Sentry from "@sentry/nextjs";
import { useEffect } from "react";

export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
  useEffect(() => Sentry.captureException(error), [error]);
  return <html><body><h1>Something went wrong.</h1></body></html>;
}

🚀 Ship to production

  • A deliberate test error reaches the correct Sentry project from client and server runtimes.
  • SENTRY_AUTH_TOKEN exists only in CI/build secrets and source maps upload successfully.
  • Stack traces resolve to original source files for the deployed release.
  • Trace/replay sample rates match traffic and budget; monitor Sentry usage.
  • Alerts route new regressions and high-impact issues to an owned channel.
  • PII collection, request bodies, user context, and replay masking match your privacy policy.

🔐 Security & secrets

  • The DSN is public by design. SENTRY_AUTH_TOKEN is privileged and must never reach the client or repository.
  • Scrub credentials, authorization headers, form values, and regulated personal data before events are sent.
  • Session Replay masks text, inputs, and media by default; verify custom settings before enabling it broadly.

🐛 Common errors & fixes

SymptomLikely causeFix
Minified, unreadable stack tracesSource maps were not uploaded for the buildSet SENTRY_AUTH_TOKEN in CI and verify build upload logs
Client events arrive but server errors do notServer/edge configs were not registeredAdd instrumentation.ts and runtime-specific config files
Test error from browser console never appearsConsole-thrown errors are sandboxedThrow from application code or the wizard's test page
Event volume or bill spikesSample rates are too highLower trace/replay rates or use dynamic sampling
Events blocked by ad blockersDirect ingest request was blockedConsider a tunnel route and exclude it from proxy matching

💰 Pricing gotchas

  • Errors, spans, replays, attachments, and logs consume separate quotas. Sample based on real traffic rather than leaving development rates in production.

📚 Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.