[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71EG9DXJCS6TVGYEQ0C9V8G":3,"skill-same:01M71EG9DXJCS6TVGYEQ0C9V8G":102},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":67},"01M71EG9DXJCS6TVGYEQ0C9V8G","sentry-nextjs-sdk",null,"Full Sentry SDK setup for Next.js. Use when asked to \"add Sentry to Next.js\", \"install @sentry\u002Fnextjs\", or configure error monitoring, tracing, session replay, logging, profiling, AI monitoring, or crons for Next.js applications. Supports Next.js 13+ with App Router and Pages Router.","patinaproject\u002Fskills","patinaproject","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F229996889?v=4","01M71E58JKTDNY1138WYZK44TR","Patina Project","01M71E58K5GH4K16MV6A8BQ6NZ",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"sentry","sentry nextjs","sentry nextjs sdk","nextjs","sdk","monitoring","tracing","configure","install","router","sdk setup","next","full","app","add","error","error monitoring","for","logging","when","2026-11-10 10:12:30",false,"---\nname: sentry-nextjs-sdk\ndescription: Full Sentry SDK setup for Next.js. Use when asked to \"add Sentry to Next.js\", \"install @sentry\u002Fnextjs\", or configure error monitoring, tracing, session replay, logging, profiling, AI monitoring, or crons for Next.js applications. Supports Next.js 13+ with App Router and Pages Router.\nlicense: Apache-2.0\ncategory: sdk-setup\nparent: sentry-sdk-setup\ndisable-model-invocation: true\n---\n\n> [All Skills](..\u002F..\u002FSKILL_TREE.md) > [SDK Setup](..\u002Fsentry-sdk-setup\u002FSKILL.md) > Next.js SDK\n\n# Sentry Next.js SDK\n\nOpinionated wizard that scans your Next.js project and guides you through complete Sentry setup across all three runtimes: browser, Node.js server, and Edge.\n\n## Invoke This Skill When\n\n- User asks to \"add Sentry to Next.js\" or \"set up Sentry\" in a Next.js app\n- User wants to install or configure `@sentry\u002Fnextjs`\n- User wants error monitoring, tracing, session replay, logging, or profiling for Next.js\n- User asks about `instrumentation.ts`, `withSentryConfig()`, or `global-error.tsx`\n- User wants to capture server actions, server component errors, or edge runtime errors\n\n> **Note:** SDK versions and APIs below reflect current Sentry docs at time of writing (`@sentry\u002Fnextjs` ≥8.28.0).\n> Always verify against [docs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002F) before implementing.\n\n---\n\n## Phase 1: Detect\n\nRun these commands to understand the project before making any recommendations:\n\n```bash\n# Detect Next.js version and existing Sentry\ncat package.json | grep -E '\"next\"|\"@sentry\u002F'\n\n# Detect router type (App Router vs Pages Router)\nls src\u002Fapp app src\u002Fpages pages 2>\u002Fdev\u002Fnull\n\n# Check for existing Sentry config files\nls instrumentation.ts instrumentation-client.ts sentry.server.config.ts sentry.edge.config.ts 2>\u002Fdev\u002Fnull\nls src\u002Finstrumentation.ts src\u002Finstrumentation-client.ts 2>\u002Fdev\u002Fnull\n\n# Check next.config\nls next.config.ts next.config.js next.config.mjs 2>\u002Fdev\u002Fnull\n\n# Check for existing error boundaries\nfind . -name \"global-error.tsx\" -o -name \"_error.tsx\" 2>\u002Fdev\u002Fnull | grep -v node_modules\n\n# Check build tool\ncat package.json | grep -E '\"turbopack\"|\"webpack\"'\n\n# Check for logging libraries\ncat package.json | grep -E '\"pino\"|\"winston\"|\"bunyan\"'\n\n# Check for companion backend\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002FGemfile 2>\u002Fdev\u002Fnull | head -3\n```\n\n**What to determine:**\n\n| Question | Impact |\n|----------|--------|\n| Next.js version? | 13+ required; 15+ needed for Turbopack support |\n| App Router or Pages Router? | Determines error boundary files needed (`global-error.tsx` vs `_error.tsx`) |\n| `@sentry\u002Fnextjs` already present? | Skip install, go to feature config |\n| Existing `instrumentation.ts`? | Merge Sentry into it rather than replace |\n| Turbopack in use? | Tree-shaking in `withSentryConfig` is webpack-only |\n| Logging library detected? | Recommend Sentry Logs integration |\n| Backend directory found? | Trigger Phase 4 cross-link suggestion |\n\n---\n\n## Phase 2: Recommend\n\nPresent a concrete recommendation based on what you found. Don't ask open-ended questions — lead with a proposal:\n\n**Recommended (core coverage):**\n- ✅ **Error Monitoring** — always; captures server errors, client errors, server actions, and unhandled promise rejections\n- ✅ **Tracing** — server-side request tracing + client-side navigation spans across all runtimes\n- ✅ **Session Replay** — recommended for user-facing apps; records sessions around errors\n\n**Optional (enhanced observability):**\n- ⚡ **Logging** — structured logs via `Sentry.logger.*`; recommend when `pino`\u002F`winston` or log search is needed\n- ⚡ **Profiling** — continuous profiling; requires `Document-Policy: js-profiling` header\n- ⚡ **AI Monitoring** — OpenAI, Vercel AI SDK, Anthropic; recommend when AI\u002FLLM calls detected\n- ⚡ **Crons** — detect missed\u002Ffailed scheduled jobs; recommend when cron patterns detected\n- ⚡ **Metrics** — custom metrics via `Sentry.metrics.*`; recommend when custom KPIs or business metrics needed\n\n**Recommendation logic:**\n\n| Feature | Recommend when... |\n|---------|------------------|\n| Error Monitoring | **Always** — non-negotiable baseline |\n| Tracing | **Always for Next.js** — server route tracing + client navigation are high-value |\n| Session Replay | User-facing app, login flows, or checkout pages |\n| Logging | App uses structured logging or needs log-to-trace correlation |\n| Profiling | Performance-critical app; client sets `Document-Policy: js-profiling` |\n| AI Monitoring | App makes OpenAI, Vercel AI SDK, or Anthropic calls |\n| Crons | App has Vercel Cron jobs, scheduled API routes, or `node-cron` usage |\n| Metrics | App needs custom counters, gauges, or histograms via `Sentry.metrics.*` |\n\nPropose: *\"I recommend setting up Error Monitoring + Tracing + Session Replay. Want me to also add Logging or Profiling?\"*\n\n---\n\n## Phase 3: Guide\n\n### Option 1: Wizard (Recommended)\n\n> **You need to run this yourself** — the wizard opens a browser for login and requires interactive input that the agent can't handle. Copy-paste into your terminal:\n>\n> ```\n> npx @sentry\u002Fwizard@latest -i nextjs\n> ```\n>\n> It handles login, org\u002Fproject selection, SDK installation, config files (`instrumentation-client.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`, `instrumentation.ts`), `next.config.ts` wrapping, source map upload, and adds a `\u002Fsentry-example-page`.\n>\n> **Once it finishes, come back and skip to [Verification](#verification).**\n\nIf the user skips the wizard, proceed with Option 2 (Manual Setup) below.\n\n---\n\n### Option 2: Manual Setup\n\n#### Install\n\n```bash\nnpm install @sentry\u002Fnextjs --save\n```\n\n#### Create `instrumentation-client.ts` — Browser \u002F Client Runtime\n\n> Older docs used `sentry.client.config.ts` — the current pattern is `instrumentation-client.ts`.\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nSentry.init({\n  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN ?? \"___PUBLIC_DSN___\",\n\n  dataCollection: {\n    \u002F\u002F To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit:\n    \u002F\u002F https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n\n  \u002F\u002F 100% in dev, 10% in production\n  tracesSampleRate: process.env.NODE_ENV === \"development\" ? 1.0 : 0.1,\n\n  \u002F\u002F Session Replay: 10% of all sessions, 100% of sessions with errors\n  replaysSessionSampleRate: 0.1,\n  replaysOnErrorSampleRate: 1.0,\n\n  enableLogs: true,\n\n  integrations: [\n    Sentry.replayIntegration(),\n    \u002F\u002F Optional: user feedback widget\n    \u002F\u002F Sentry.feedbackIntegration({ colorScheme: \"system\" }),\n  ],\n});\n\n\u002F\u002F Hook into App Router navigation transitions (App Router only)\nexport const onRouterTransitionStart = Sentry.captureRouterTransitionStart;\n```\n\n#### Create `sentry.server.config.ts` — Node.js Server Runtime\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nSentry.init({\n  dsn: process.env.SENTRY_DSN ?? \"___DSN___\",\n\n  dataCollection: {\n    \u002F\u002F To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit:\n    \u002F\u002F https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n  tracesSampleRate: process.env.NODE_ENV === \"development\" ? 1.0 : 0.1,\n\n  \u002F\u002F Attach local variable values to stack frames\n  includeLocalVariables: true,\n\n  enableLogs: true,\n});\n```\n\n#### Create `sentry.edge.config.ts` — Edge Runtime\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nSentry.init({\n  dsn: process.env.SENTRY_DSN ?? \"___DSN___\",\n\n  dataCollection: {\n    \u002F\u002F To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit:\n    \u002F\u002F https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n  tracesSampleRate: process.env.NODE_ENV === \"development\" ? 1.0 : 0.1,\n\n  enableLogs: true,\n});\n```\n\n#### Create `instrumentation.ts` — Server-Side Registration Hook\n\n> Requires `experimental.instrumentationHook: true` in `next.config` for Next.js \u003C 14.0.4. It's stable in 14.0.4+.\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nexport async function register() {\n  if (process.env.NEXT_RUNTIME === \"nodejs\") {\n    await import(\".\u002Fsentry.server.config\");\n  }\n\n  if (process.env.NEXT_RUNTIME === \"edge\") {\n    await import(\".\u002Fsentry.edge.config\");\n  }\n}\n\n\u002F\u002F Automatically captures all unhandled server-side request errors\n\u002F\u002F Requires @sentry\u002Fnextjs >= 8.28.0\nexport const onRequestError = Sentry.captureRequestError;\n```\n\n**Runtime dispatch:**\n\n| `NEXT_RUNTIME` | Config file loaded |\n|---|---|\n| `\"nodejs\"` | `sentry.server.config.ts` |\n| `\"edge\"` | `sentry.edge.config.ts` |\n| *(client bundle)* | `instrumentation-client.ts` (Next.js handles this directly) |\n\n#### App Router: Create `app\u002Fglobal-error.tsx`\n\nThis catches errors in the root layout and React render errors:\n\n```tsx\n\"use client\";\n\nimport * as Sentry from \"@sentry\u002Fnextjs\";\nimport NextError from \"next\u002Ferror\";\nimport { useEffect } from \"react\";\n\nexport default function GlobalError({\n  error,\n}: {\n  error: Error & { digest?: string };\n}) {\n  useEffect(() => {\n    Sentry.captureException(error);\n  }, [error]);\n\n  return (\n    \u003Chtml>\n      \u003Cbody>\n        \u003CNextError statusCode={0} \u002F>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  );\n}\n```\n\n#### Pages Router: Update `pages\u002F_error.tsx`\n\n```tsx\nimport * as Sentry from \"@sentry\u002Fnextjs\";\nimport type { NextPageContext } from \"next\";\nimport NextErrorComponent from \"next\u002Ferror\";\n\ntype ErrorProps = { statusCode: number };\n\nexport default function CustomError({ statusCode }: ErrorProps) {\n  return \u003CNextErrorComponent statusCode={statusCode} \u002F>;\n}\n\nCustomError.getInitialProps = async (ctx: NextPageContext) => {\n  await Sentry.captureUnderscoreErrorException(ctx);\n  return NextErrorComponent.getInitialProps(ctx);\n};\n```\n\n#### Wrap `next.config.ts` with `withSentryConfig()`\n\n```typescript\nimport type { NextConfig } from \"next\";\nimport { withSentryConfig } from \"@sentry\u002Fnextjs\";\n\nconst nextConfig: NextConfig = {\n  \u002F\u002F your existing Next.js config\n};\n\nexport default withSentryConfig(nextConfig, {\n  org: \"___ORG_SLUG___\",\n  project: \"___PROJECT_SLUG___\",\n\n  \u002F\u002F Source map upload auth token (see Source Maps section below)\n  authToken: process.env.SENTRY_AUTH_TOKEN,\n\n  \u002F\u002F Upload wider set of client source files for better stack trace resolution\n  widenClientFileUpload: true,\n\n  \u002F\u002F Create a proxy API route to bypass ad-blockers\n  tunnelRoute: \"\u002Fmonitoring\",\n\n  \u002F\u002F Suppress non-CI output\n  silent: !process.env.CI,\n});\n```\n\n#### Exclude Tunnel Route from Middleware\n\nIf you have `middleware.ts`, exclude the tunnel path from auth or redirect logic:\n\n```typescript\n\u002F\u002F middleware.ts\nexport const config = {\n  matcher: [\n    \u002F\u002F Exclude monitoring route, Next.js internals, and static files\n    \"\u002F((?!monitoring|_next\u002Fstatic|_next\u002Fimage|favicon.ico).*)\",\n  ],\n};\n```\n\n---\n\n### Source Maps Setup\n\n`withSentryConfig` uploads source maps on production builds so stack traces show your original code instead of minified output. The SDK-specific wiring is the `authToken` (plus `widenClientFileUpload`, which improves client stack traces) in `next.config.ts`:\n\n```typescript\nwithSentryConfig(nextConfig, {\n  org: \"my-org\",\n  project: \"my-project\",\n  authToken: process.env.SENTRY_AUTH_TOKEN, \u002F\u002F from CI env or a gitignored .env.sentry-build-plugin\n  widenClientFileUpload: true,\n});\n```\n\n`SENTRY_AUTH_TOKEN` is a build-time secret, distinct from the DSN. For creating the token, wiring it into CI, and troubleshooting minified traces, see [`sentry-source-maps`](..\u002Fsentry-source-maps\u002FSKILL.md).\n\nSource maps are uploaded automatically on every `next build`.\n\n---\n\n### For Each Agreed Feature\n\nLoad the corresponding reference file and follow its steps:\n\n| Feature | Reference file | Load when... |\n|---------|---------------|-------------|\n| Error Monitoring | `references\u002Ferror-monitoring.md` | Always (baseline) — App Router error boundaries, Pages Router `_error.tsx`, server action wrapping |\n| Tracing | `references\u002Ftracing.md` | Server-side request tracing, client navigation, distributed tracing, `tracePropagationTargets` |\n| Session Replay | `references\u002Fsession-replay.md` | User-facing app; privacy masking, canvas recording, network capture |\n| Logging | `references\u002Flogging.md` | Structured logs, `Sentry.logger.*`, log-to-trace correlation |\n| Profiling | `references\u002Fprofiling.md` | Continuous profiling, `Document-Policy` header, `nodeProfilingIntegration` |\n| AI Monitoring | `references\u002Fai-monitoring.md` | App uses OpenAI, Vercel AI SDK, or Anthropic |\n| Crons | `references\u002Fcrons.md` | Vercel Cron, scheduled API routes, `node-cron` |\n| Metrics | `references\u002Fmetrics.md` | Custom counters, gauges, distributions via `Sentry.metrics.*` |\n\nFor each feature: read the reference file, follow its steps exactly, and verify before moving on.\n\n---\n\n## Configuration Reference\n\n### `Sentry.init()` Options\n\n| Option | Type | Default | Notes |\n|--------|------|---------|-------|\n| `dsn` | `string` | — | Required. Use `NEXT_PUBLIC_SENTRY_DSN` for client, `SENTRY_DSN` for server |\n| `tracesSampleRate` | `number` | — | 0–1; 1.0 in dev, 0.1 in prod recommended |\n| `replaysSessionSampleRate` | `number` | `0.1` | Fraction of all sessions recorded |\n| `replaysOnErrorSampleRate` | `number` | `1.0` | Fraction of error sessions recorded |\n| `dataCollection` | `object` | conservative unless set | Fine-grained control over auto-collected categories (`userInfo`, `cookies`, `httpHeaders`, `httpBodies`, `queryParams`, `genAI`). When omitted, the SDK falls back to `sendDefaultPii` (default `false`). Passing the object — even `{}` — flips unset categories to their permissive defaults; opt out per category. |\n| `includeLocalVariables` | `boolean` | `false` | Attach local variable values to stack frames (server only) |\n| `enableLogs` | `boolean` | `false` | Enable Sentry Logs product |\n| `environment` | `string` | auto | `\"production\"`, `\"staging\"`, etc. |\n| `release` | `string` | auto | Set to commit SHA or version tag |\n| `debug` | `boolean` | `false` | Log SDK activity to console |\n\n### `withSentryConfig()` Options\n\n| Option | Type | Notes |\n|--------|------|-------|\n| `org` | `string` | Sentry organization slug |\n| `project` | `string` | Sentry project slug |\n| `authToken` | `string` | Source map upload token (`SENTRY_AUTH_TOKEN`) |\n| `widenClientFileUpload` | `boolean` | Upload more client files for better stack traces |\n| `tunnelRoute` | `string` | API route path for ad-blocker bypass (e.g. `\"\u002Fmonitoring\"`) |\n| `silent` | `boolean` | Suppress build output (`!process.env.CI` recommended) |\n| `webpack.treeshake.*` | `object` | Tree-shake SDK features (webpack only, not Turbopack) |\n\n### Environment Variables\n\n| Variable | Runtime | Purpose |\n|----------|---------|---------|\n| `NEXT_PUBLIC_SENTRY_DSN` | Client | DSN for browser Sentry init (public) |\n| `SENTRY_DSN` | Server \u002F Edge | DSN for server\u002Fedge Sentry init |\n| `SENTRY_AUTH_TOKEN` | Build | Source map upload auth token (secret) |\n| `SENTRY_ORG` | Build | Org slug (alternative to `org` in config) |\n| `SENTRY_PROJECT` | Build | Project slug (alternative to `project` in config) |\n| `SENTRY_RELEASE` | Server | Release version string (auto-detected from git) |\n| `NEXT_RUNTIME` | Server \u002F Edge | `\"nodejs\"` or `\"edge\"` (set by Next.js internally) |\n\n---\n\n## Verification\n\nAfter wizard or manual setup, verify Sentry is working:\n\n```typescript\n\u002F\u002F Add temporarily to a server action or API route, then remove\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nthrow new Error(\"Sentry test error — delete me\");\n\u002F\u002F or\nSentry.captureException(new Error(\"Sentry test error — delete me\"));\n```\n\nThen check your [Sentry Issues dashboard](https:\u002F\u002Fsentry.io\u002Fissues\u002F) — the error should appear within ~30 seconds.\n\n**Verification checklist:**\n\n| Check | How |\n|-------|-----|\n| Client errors captured | Throw in a client component, verify in Sentry |\n| Server errors captured | Throw in a server action or API route |\n| Edge errors captured | Throw in middleware or edge route handler |\n| Source maps working | Check stack trace shows readable file names |\n| Session Replay working | Check Replays tab in Sentry dashboard |\n\n---\n\n## Phase 4: Cross-Link\n\nAfter completing Next.js setup, check for companion services:\n\n```bash\n# Check for backend services in adjacent directories\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi ..\u002Fservices 2>\u002Fdev\u002Fnull\n\n# Check for backend language indicators\ncat ..\u002Fgo.mod 2>\u002Fdev\u002Fnull | head -3\ncat ..\u002Frequirements.txt ..\u002Fpyproject.toml 2>\u002Fdev\u002Fnull | head -3\ncat ..\u002FGemfile 2>\u002Fdev\u002Fnull | head -3\ncat ..\u002Fpom.xml ..\u002Fbuild.gradle 2>\u002Fdev\u002Fnull | head -3\n```\n\nIf a backend is found, suggest the matching SDK skill:\n\n| Backend detected | Suggest skill |\n|-----------------|--------------|\n| Go (`go.mod`) | `sentry-go-sdk` |\n| Python (`requirements.txt`, `pyproject.toml`) | `sentry-python-sdk` |\n| Ruby (`Gemfile`) | `sentry-ruby-sdk` |\n| Java\u002FKotlin (`pom.xml`, `build.gradle`) | See [docs.sentry.io\u002Fplatforms\u002Fjava\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjava\u002F) |\n| Node.js (Express, Fastify, Hapi) | `@sentry\u002Fnode` — see [docs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fexpress\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fexpress\u002F) |\n\nConnecting frontend and backend with the same DSN or linked projects enables **distributed tracing** — stack traces that span your browser, Next.js server, and backend API in a single trace view.\n\n---\n\n## Troubleshooting\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Events not appearing | DSN misconfigured or `debug: false` hiding errors | Set `debug: true` temporarily; check browser network tab for requests to `sentry.io` |\n| Stack traces show minified code | Source maps not uploading | Check `SENTRY_AUTH_TOKEN` is set; run `next build` and look for \"Source Maps\" in build output |\n| `onRequestError` not firing | SDK version \u003C 8.28.0 | Upgrade: `npm install @sentry\u002Fnextjs@latest` |\n| Edge runtime errors missing | `sentry.edge.config.ts` not loaded | Verify `instrumentation.ts` imports it when `NEXT_RUNTIME === \"edge\"` |\n| Tunnel route returns 404 | `tunnelRoute` set but Next.js route missing | The plugin creates it automatically; check you ran `next build` after adding `tunnelRoute` |\n| `withSentryConfig` tree-shaking breaks build | Turbopack in use | Tree-shaking options only work with webpack; remove `webpack.treeshake` options when using Turbopack |\n| `global-error.tsx` not catching errors | Missing `\"use client\"` directive | Add `\"use client\"` as the very first line of `global-error.tsx` |\n| Session Replay not recording | `replayIntegration()` missing from client init | Add `Sentry.replayIntegration()` to `integrations` in `instrumentation-client.ts` |\n","> [All Skills](..\u002F..\u002FSKILL_TREE.md) > [SDK Setup](..\u002Fsentry-sdk-setup\u002FSKILL.md) > Next.js SDK\n\n# Sentry Next.js SDK\n\nOpinionated wizard that scans your Next.js project and guides you through complete Sentry setup across all three runtimes: browser, Node.js server, and Edge.\n\n## Invoke This Skill When\n\n- User asks to \"add Sentry to Next.js\" or \"set up Sentry\" in a Next.js app\n- User wants to install or configure `@sentry\u002Fnextjs`\n- User wants error monitoring, tracing, session replay, logging, or profiling for Next.js\n- User asks about `instrumentation.ts`, `withSentryConfig()`, or `global-error.tsx`\n- User wants to capture server actions, server component errors, or edge runtime errors\n\n> **Note:** SDK versions and APIs below reflect current Sentry docs at time of writing (`@sentry\u002Fnextjs` ≥8.28.0).\n> Always verify against [docs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002F) before implementing.\n\n---\n\n## Phase 1: Detect\n\nRun these commands to understand the project before making any recommendations:\n\n```bash\n# Detect Next.js version and existing Sentry\ncat package.json | grep -E '\"next\"|\"@sentry\u002F'\n\n# Detect router type (App Router vs Pages Router)\nls src\u002Fapp app src\u002Fpages pages 2>\u002Fdev\u002Fnull\n\n# Check for existing Sentry config files\nls instrumentation.ts instrumentation-client.ts sentry.server.config.ts sentry.edge.config.ts 2>\u002Fdev\u002Fnull\nls src\u002Finstrumentation.ts src\u002Finstrumentation-client.ts 2>\u002Fdev\u002Fnull\n\n# Check next.config\nls next.config.ts next.config.js next.config.mjs 2>\u002Fdev\u002Fnull\n\n# Check for existing error boundaries\nfind . -name \"global-error.tsx\" -o -name \"_error.tsx\" 2>\u002Fdev\u002Fnull | grep -v node_modules\n\n# Check build tool\ncat package.json | grep -E '\"turbopack\"|\"webpack\"'\n\n# Check for logging libraries\ncat package.json | grep -E '\"pino\"|\"winston\"|\"bunyan\"'\n\n# Check for companion backend\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002FGemfile 2>\u002Fdev\u002Fnull | head -3\n```\n\n**What to determine:**\n\n| Question | Impact |\n|----------|--------|\n| Next.js version? | 13+ required; 15+ needed for Turbopack support |\n| App Router or Pages Router? | Determines error boundary files needed (`global-error.tsx` vs `_error.tsx`) |\n| `@sentry\u002Fnextjs` already present? | Skip install, go to feature config |\n| Existing `instrumentation.ts`? | Merge Sentry into it rather than replace |\n| Turbopack in use? | Tree-shaking in `withSentryConfig` is webpack-only |\n| Logging library detected? | Recommend Sentry Logs integration |\n| Backend directory found? | Trigger Phase 4 cross-link suggestion |\n\n---\n\n## Phase 2: Recommend\n\nPresent a concrete recommendation based on what you found. Don't ask open-ended questions — lead with a proposal:\n\n**Recommended (core coverage):**\n- ✅ **Error Monitoring** — always; captures server errors, client errors, server actions, and unhandled promise rejections\n- ✅ **Tracing** — server-side request tracing + client-side navigation spans across all runtimes\n- ✅ **Session Replay** — recommended for user-facing apps; records sessions around errors\n\n**Optional (enhanced observability):**\n- ⚡ **Logging** — structured logs via `Sentry.logger.*`; recommend when `pino`\u002F`winston` or log search is needed\n- ⚡ **Profiling** — continuous profiling; requires `Document-Policy: js-profiling` header\n- ⚡ **AI Monitoring** — OpenAI, Vercel AI SDK, Anthropic; recommend when AI\u002FLLM calls detected\n- ⚡ **Crons** — detect missed\u002Ffailed scheduled jobs; recommend when cron patterns detected\n- ⚡ **Metrics** — custom metrics via `Sentry.metrics.*`; recommend when custom KPIs or business metrics needed\n\n**Recommendation logic:**\n\n| Feature | Recommend when... |\n|---------|------------------|\n| Error Monitoring | **Always** — non-negotiable baseline |\n| Tracing | **Always for Next.js** — server route tracing + client navigation are high-value |\n| Session Replay | User-facing app, login flows, or checkout pages |\n| Logging | App uses structured logging or needs log-to-trace correlation |\n| Profiling | Performance-critical app; client sets `Document-Policy: js-profiling` |\n| AI Monitoring | App makes OpenAI, Vercel AI SDK, or Anthropic calls |\n| Crons | App has Vercel Cron jobs, scheduled API routes, or `node-cron` usage |\n| Metrics | App needs custom counters, gauges, or histograms via `Sentry.metrics.*` |\n\nPropose: *\"I recommend setting up Error Monitoring + Tracing + Session Replay. Want me to also add Logging or Profiling?\"*\n\n---\n\n## Phase 3: Guide\n\n### Option 1: Wizard (Recommended)\n\n> **You need to run this yourself** — the wizard opens a browser for login and requires interactive input that the agent can't handle. Copy-paste into your terminal:\n>\n> ```\n> npx @sentry\u002Fwizard@latest -i nextjs\n> ```\n>\n> It handles login, org\u002Fproject selection, SDK installation, config files (`instrumentation-client.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`, `instrumentation.ts`), `next.config.ts` wrapping, source map upload, and adds a `\u002Fsentry-example-page`.\n>\n> **Once it finishes, come back and skip to [Verification](#verification).**\n\nIf the user skips the wizard, proceed with Option 2 (Manual Setup) below.\n\n---\n\n### Option 2: Manual Setup\n\n#### Install\n\n```bash\nnpm install @sentry\u002Fnextjs --save\n```\n\n#### Create `instrumentation-client.ts` — Browser \u002F Client Runtime\n\n> Older docs used `sentry.client.config.ts` — the current pattern is `instrumentation-client.ts`.\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nSentry.init({\n  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN ?? \"___PUBLIC_DSN___\",\n\n  dataCollection: {\n    \u002F\u002F To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit:\n    \u002F\u002F https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n\n  \u002F\u002F 100% in dev, 10% in production\n  tracesSampleRate: process.env.NODE_ENV === \"development\" ? 1.0 : 0.1,\n\n  \u002F\u002F Session Replay: 10% of all sessions, 100% of sessions with errors\n  replaysSessionSampleRate: 0.1,\n  replaysOnErrorSampleRate: 1.0,\n\n  enableLogs: true,\n\n  integrations: [\n    Sentry.replayIntegration(),\n    \u002F\u002F Optional: user feedback widget\n    \u002F\u002F Sentry.feedbackIntegration({ colorScheme: \"system\" }),\n  ],\n});\n\n\u002F\u002F Hook into App Router navigation transitions (App Router only)\nexport const onRouterTransitionStart = Sentry.captureRouterTransitionStart;\n```\n\n#### Create `sentry.server.config.ts` — Node.js Server Runtime\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nSentry.init({\n  dsn: process.env.SENTRY_DSN ?? \"___DSN___\",\n\n  dataCollection: {\n    \u002F\u002F To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit:\n    \u002F\u002F https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n  tracesSampleRate: process.env.NODE_ENV === \"development\" ? 1.0 : 0.1,\n\n  \u002F\u002F Attach local variable values to stack frames\n  includeLocalVariables: true,\n\n  enableLogs: true,\n});\n```\n\n#### Create `sentry.edge.config.ts` — Edge Runtime\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nSentry.init({\n  dsn: process.env.SENTRY_DSN ?? \"___DSN___\",\n\n  dataCollection: {\n    \u002F\u002F To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit:\n    \u002F\u002F https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fnextjs\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n  tracesSampleRate: process.env.NODE_ENV === \"development\" ? 1.0 : 0.1,\n\n  enableLogs: true,\n});\n```\n\n#### Create `instrumentation.ts` — Server-Side Registration Hook\n\n> Requires `experimental.instrumentationHook: true` in `next.config` for Next.js \u003C 14.0.4. It's stable in 14.0.4+.\n\n```typescript\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nexport async function register() {\n  if (process.env.NEXT_RUNTIME === \"nodejs\") {\n    await import(\".\u002Fsentry.server.config\");\n  }\n\n  if (process.env.NEXT_RUNTIME === \"edge\") {\n    await import(\".\u002Fsentry.edge.config\");\n  }\n}\n\n\u002F\u002F Automatically captures all unhandled server-side request errors\n\u002F\u002F Requires @sentry\u002Fnextjs >= 8.28.0\nexport const onRequestError = Sentry.captureRequestError;\n```\n\n**Runtime dispatch:**\n\n| `NEXT_RUNTIME` | Config file loaded |\n|---|---|\n| `\"nodejs\"` | `sentry.server.config.ts` |\n| `\"edge\"` | `sentry.edge.config.ts` |\n| *(client bundle)* | `instrumentation-client.ts` (Next.js handles this directly) |\n\n#### App Router: Create `app\u002Fglobal-error.tsx`\n\nThis catches errors in the root layout and React render errors:\n\n```tsx\n\"use client\";\n\nimport * as Sentry from \"@sentry\u002Fnextjs\";\nimport NextError from \"next\u002Ferror\";\nimport { useEffect } from \"react\";\n\nexport default function GlobalError({\n  error,\n}: {\n  error: Error & { digest?: string };\n}) {\n  useEffect(() => {\n    Sentry.captureException(error);\n  }, [error]);\n\n  return (\n    \u003Chtml>\n      \u003Cbody>\n        \u003CNextError statusCode={0} \u002F>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  );\n}\n```\n\n#### Pages Router: Update `pages\u002F_error.tsx`\n\n```tsx\nimport * as Sentry from \"@sentry\u002Fnextjs\";\nimport type { NextPageContext } from \"next\";\nimport NextErrorComponent from \"next\u002Ferror\";\n\ntype ErrorProps = { statusCode: number };\n\nexport default function CustomError({ statusCode }: ErrorProps) {\n  return \u003CNextErrorComponent statusCode={statusCode} \u002F>;\n}\n\nCustomError.getInitialProps = async (ctx: NextPageContext) => {\n  await Sentry.captureUnderscoreErrorException(ctx);\n  return NextErrorComponent.getInitialProps(ctx);\n};\n```\n\n#### Wrap `next.config.ts` with `withSentryConfig()`\n\n```typescript\nimport type { NextConfig } from \"next\";\nimport { withSentryConfig } from \"@sentry\u002Fnextjs\";\n\nconst nextConfig: NextConfig = {\n  \u002F\u002F your existing Next.js config\n};\n\nexport default withSentryConfig(nextConfig, {\n  org: \"___ORG_SLUG___\",\n  project: \"___PROJECT_SLUG___\",\n\n  \u002F\u002F Source map upload auth token (see Source Maps section below)\n  authToken: process.env.SENTRY_AUTH_TOKEN,\n\n  \u002F\u002F Upload wider set of client source files for better stack trace resolution\n  widenClientFileUpload: true,\n\n  \u002F\u002F Create a proxy API route to bypass ad-blockers\n  tunnelRoute: \"\u002Fmonitoring\",\n\n  \u002F\u002F Suppress non-CI output\n  silent: !process.env.CI,\n});\n```\n\n#### Exclude Tunnel Route from Middleware\n\nIf you have `middleware.ts`, exclude the tunnel path from auth or redirect logic:\n\n```typescript\n\u002F\u002F middleware.ts\nexport const config = {\n  matcher: [\n    \u002F\u002F Exclude monitoring route, Next.js internals, and static files\n    \"\u002F((?!monitoring|_next\u002Fstatic|_next\u002Fimage|favicon.ico).*)\",\n  ],\n};\n```\n\n---\n\n### Source Maps Setup\n\n`withSentryConfig` uploads source maps on production builds so stack traces show your original code instead of minified output. The SDK-specific wiring is the `authToken` (plus `widenClientFileUpload`, which improves client stack traces) in `next.config.ts`:\n\n```typescript\nwithSentryConfig(nextConfig, {\n  org: \"my-org\",\n  project: \"my-project\",\n  authToken: process.env.SENTRY_AUTH_TOKEN, \u002F\u002F from CI env or a gitignored .env.sentry-build-plugin\n  widenClientFileUpload: true,\n});\n```\n\n`SENTRY_AUTH_TOKEN` is a build-time secret, distinct from the DSN. For creating the token, wiring it into CI, and troubleshooting minified traces, see [`sentry-source-maps`](..\u002Fsentry-source-maps\u002FSKILL.md).\n\nSource maps are uploaded automatically on every `next build`.\n\n---\n\n### For Each Agreed Feature\n\nLoad the corresponding reference file and follow its steps:\n\n| Feature | Reference file | Load when... |\n|---------|---------------|-------------|\n| Error Monitoring | `references\u002Ferror-monitoring.md` | Always (baseline) — App Router error boundaries, Pages Router `_error.tsx`, server action wrapping |\n| Tracing | `references\u002Ftracing.md` | Server-side request tracing, client navigation, distributed tracing, `tracePropagationTargets` |\n| Session Replay | `references\u002Fsession-replay.md` | User-facing app; privacy masking, canvas recording, network capture |\n| Logging | `references\u002Flogging.md` | Structured logs, `Sentry.logger.*`, log-to-trace correlation |\n| Profiling | `references\u002Fprofiling.md` | Continuous profiling, `Document-Policy` header, `nodeProfilingIntegration` |\n| AI Monitoring | `references\u002Fai-monitoring.md` | App uses OpenAI, Vercel AI SDK, or Anthropic |\n| Crons | `references\u002Fcrons.md` | Vercel Cron, scheduled API routes, `node-cron` |\n| Metrics | `references\u002Fmetrics.md` | Custom counters, gauges, distributions via `Sentry.metrics.*` |\n\nFor each feature: read the reference file, follow its steps exactly, and verify before moving on.\n\n---\n\n## Configuration Reference\n\n### `Sentry.init()` Options\n\n| Option | Type | Default | Notes |\n|--------|------|---------|-------|\n| `dsn` | `string` | — | Required. Use `NEXT_PUBLIC_SENTRY_DSN` for client, `SENTRY_DSN` for server |\n| `tracesSampleRate` | `number` | — | 0–1; 1.0 in dev, 0.1 in prod recommended |\n| `replaysSessionSampleRate` | `number` | `0.1` | Fraction of all sessions recorded |\n| `replaysOnErrorSampleRate` | `number` | `1.0` | Fraction of error sessions recorded |\n| `dataCollection` | `object` | conservative unless set | Fine-grained control over auto-collected categories (`userInfo`, `cookies`, `httpHeaders`, `httpBodies`, `queryParams`, `genAI`). When omitted, the SDK falls back to `sendDefaultPii` (default `false`). Passing the object — even `{}` — flips unset categories to their permissive defaults; opt out per category. |\n| `includeLocalVariables` | `boolean` | `false` | Attach local variable values to stack frames (server only) |\n| `enableLogs` | `boolean` | `false` | Enable Sentry Logs product |\n| `environment` | `string` | auto | `\"production\"`, `\"staging\"`, etc. |\n| `release` | `string` | auto | Set to commit SHA or version tag |\n| `debug` | `boolean` | `false` | Log SDK activity to console |\n\n### `withSentryConfig()` Options\n\n| Option | Type | Notes |\n|--------|------|-------|\n| `org` | `string` | Sentry organization slug |\n| `project` | `string` | Sentry project slug |\n| `authToken` | `string` | Source map upload token (`SENTRY_AUTH_TOKEN`) |\n| `widenClientFileUpload` | `boolean` | Upload more client files for better stack traces |\n| `tunnelRoute` | `string` | API route path for ad-blocker bypass (e.g. `\"\u002Fmonitoring\"`) |\n| `silent` | `boolean` | Suppress build output (`!process.env.CI` recommended) |\n| `webpack.treeshake.*` | `object` | Tree-shake SDK features (webpack only, not Turbopack) |\n\n### Environment Variables\n\n| Variable | Runtime | Purpose |\n|----------|---------|---------|\n| `NEXT_PUBLIC_SENTRY_DSN` | Client | DSN for browser Sentry init (public) |\n| `SENTRY_DSN` | Server \u002F Edge | DSN for server\u002Fedge Sentry init |\n| `SENTRY_AUTH_TOKEN` | Build | Source map upload auth token (secret) |\n| `SENTRY_ORG` | Build | Org slug (alternative to `org` in config) |\n| `SENTRY_PROJECT` | Build | Project slug (alternative to `project` in config) |\n| `SENTRY_RELEASE` | Server | Release version string (auto-detected from git) |\n| `NEXT_RUNTIME` | Server \u002F Edge | `\"nodejs\"` or `\"edge\"` (set by Next.js internally) |\n\n---\n\n## Verification\n\nAfter wizard or manual setup, verify Sentry is working:\n\n```typescript\n\u002F\u002F Add temporarily to a server action or API route, then remove\nimport * as Sentry from \"@sentry\u002Fnextjs\";\n\nthrow new Error(\"Sentry test error — delete me\");\n\u002F\u002F or\nSentry.captureException(new Error(\"Sentry test error — delete me\"));\n```\n\nThen check your [Sentry Issues dashboard](https:\u002F\u002Fsentry.io\u002Fissues\u002F) — the error should appear within ~30 seconds.\n\n**Verification checklist:**\n\n| Check | How |\n|-------|-----|\n| Client errors captured | Throw in a client component, verify in Sentry |\n| Server errors captured | Throw in a server action or API route |\n| Edge errors captured | Throw in middleware or edge route handler |\n| Source maps working | Check stack trace shows readable file names |\n| Session Replay working | Check Replays tab in Sentry dashboard |\n\n---\n\n## Phase 4: Cross-Link\n\nAfter completing Next.js setup, check for companion services:\n\n```bash\n# Check for backend services in adjacent directories\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi ..\u002Fservices 2>\u002Fdev\u002Fnull\n\n# Check for backend language indicators\ncat ..\u002Fgo.mod 2>\u002Fdev\u002Fnull | head -3\ncat ..\u002Frequirements.txt ..\u002Fpyproject.toml 2>\u002Fdev\u002Fnull | head -3\ncat ..\u002FGemfile 2>\u002Fdev\u002Fnull | head -3\ncat ..\u002Fpom.xml ..\u002Fbuild.gradle 2>\u002Fdev\u002Fnull | head -3\n```\n\nIf a backend is found, suggest the matching SDK skill:\n\n| Backend detected | Suggest skill |\n|-----------------|--------------|\n| Go (`go.mod`) | `sentry-go-sdk` |\n| Python (`requirements.txt`, `pyproject.toml`) | `sentry-python-sdk` |\n| Ruby (`Gemfile`) | `sentry-ruby-sdk` |\n| Java\u002FKotlin (`pom.xml`, `build.gradle`) | See [docs.sentry.io\u002Fplatforms\u002Fjava\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjava\u002F) |\n| Node.js (Express, Fastify, Hapi) | `@sentry\u002Fnode` — see [docs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fexpress\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Fexpress\u002F) |\n\nConnecting frontend and backend with the same DSN or linked projects enables **distributed tracing** — stack traces that span your browser, Next.js server, and backend API in a single trace view.\n\n---\n\n## Troubleshooting\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Events not appearing | DSN misconfigured or `debug: false` hiding errors | Set `debug: true` temporarily; check browser network tab for requests to `sentry.io` |\n| Stack traces show minified code | Source maps not uploading | Check `SENTRY_AUTH_TOKEN` is set; run `next build` and look for \"Source Maps\" in build output |\n| `onRequestError` not firing | SDK version \u003C 8.28.0 | Upgrade: `npm install @sentry\u002Fnextjs@latest` |\n| Edge runtime errors missing | `sentry.edge.config.ts` not loaded | Verify `instrumentation.ts` imports it when `NEXT_RUNTIME === \"edge\"` |\n| Tunnel route returns 404 | `tunnelRoute` set but Next.js route missing | The plugin creates it automatically; check you ran `next build` after adding `tunnelRoute` |\n| `withSentryConfig` tree-shaking breaks build | Turbopack in use | Tree-shaking options only work with webpack; remove `webpack.treeshake` options when using Turbopack |\n| `global-error.tsx` not catching errors | Missing `\"use client\"` directive | Add `\"use client\"` as the very first line of `global-error.tsx` |\n| Session Replay not recording | `replayIntegration()` missing from client init | Add `Sentry.replayIntegration()` to `integrations` in `instrumentation-client.ts` |\n",{"name":5,"parent":44,"license":15,"category":45,"description":7,"disable-model-invocation":46},"sentry-sdk-setup","sdk-setup",true,"main","e6ee720f466a8344a52abd87679191fadde3b63f",".agents\u002Fskills\u002Fsentry-nextjs-sdk","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills","https:\u002F\u002Fgithub.com\u002Fpatinaproject","https:\u002F\u002Fwww.patinaproject.com","The best way to pick your next pair of boots or shoes.","2026-11-12 00:44:02",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":46},[57,60,63],{"tool":58,"command":59},"npx","npx skills add patinaproject\u002Fskills --skill sentry-nextjs-sdk",{"tool":61,"command":62},"bunx","bunx skills add patinaproject\u002Fskills --skill sentry-nextjs-sdk",{"tool":64,"command":65},"pnpm","pnpm dlx skills add patinaproject\u002Fskills --skill sentry-nextjs-sdk","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002FSKILL.md",[68,74,78,82,86,90,94,98],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fai-monitoring.md","REFERENCE","参考文档",15985,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Fai-monitoring.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fcrons.md",9652,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Fcrons.md",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Ferror-monitoring.md",28702,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Ferror-monitoring.md",{"path":83,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Flogging.md",11829,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Flogging.md",{"path":87,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fmetrics.md",12499,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Fmetrics.md",{"path":91,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fprofiling.md",12363,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Fprofiling.md",{"path":95,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fsession-replay.md",15749,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Fsession-replay.md",{"path":99,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Ftracing.md",19307,"https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-nextjs-sdk\u002Freferences\u002Ftracing.md",[103,112,119,126,145,155],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":111},"01M72KHWMPNYS336P41Y6VEDSH","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","MIT","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fwork\u002Fskills\u002Fgrilling\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":111},"01M72KBHG0R062ZYH7J06H8YV1","social","When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter\u002FX, Instagram, TikTok, Facebook, or other platforms, or wants to do social listening and engagement triage. Also use when the user mentions 'LinkedIn post,' 'Twitter thread,' 'social media,' 'content calendar,' 'social scheduling,' 'engagement,' 'viral content,' 'what should I post,' 'repurpose this content,' 'tweet ideas,' 'LinkedIn carousel,' 'social media strategy,' 'grow my following,' 'TikTok video,' 'Reels,' 'Shorts,' 'video script,' 'video hook,' 'short-form video,' 'create a reel,' 'social listening,' 'brand mentions,' 'competitor monitoring,' 'top posts to comment on,' 'find people asking for,' 'carousel,' 'slide-by-slide,' or 'document post.' Use this for social media content creation, repurposing, scheduling, short-form video scripting, and social listening. For broader content strategy, see content-strategy. For paid ads, see ad-creative. For earned media, see public-relations.","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsocial\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":111},"01M72KDQJR99954NE224VB3KZ2","code-review","Review the changes since a fixed point (commit, branch, tag, or merge-base) along five axes: Standards (does the code follow this repo's documented coding standards?), Spec (does the code match what the originating issue\u002Fspec asked for?), Evidence (does each claim in the pull request have evidence that shows it?), Bugs (does the changed code have logic errors, unhandled states, races, or regressions?), and Security (does the change open injection, auth, secret, input, or CI workflow holes?). Runs the reviews in parallel sub-agents, tags every finding Important, Nit, or Pre-existing, and reports them side by side with what blocks merge. Given an earlier reviewed head and its findings, it reviews only the newer commits, rechecks the earlier findings, and never repeats one. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\".","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fcode\u002Fskills\u002Fcode-review\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":39},"01M71ESEDVHD9EXN6787XHP7HD","writing-for-pstack","Write or tighten an operator prompt for a patina-mode run. Use when the operator asks to write, revise, or review a prompt that will be passed to patina-mode.","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fwork\u002Fskills\u002Fwriting-for-pstack\u002FSKILL.md",[],[133,36,134,135,136,137,138,139,140,141,142,143,38,144],"writing for pstack","pstack","writing","operator","write","mode","run","review","use","tighten","prompt","revise",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":39},"01M71ESCJ0SSJFFENF8HYDKBTJ","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fwork\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[36,152,135,38,153,141,154],"writing for agents","documents","editing",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":39},"01M71ESA1NN9WVMD2HA5Z1RRDY","wizard","Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.","https:\u002F\u002Fgithub.com\u002Fpatinaproject\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fwork\u002Fskills\u002Fwizard\u002FSKILL.md",[],[157,38,162,163,36,164,165,166,167,141,168,169,170,171,172,173,174,175,176,177],"running","setting","up","ci","provisioning infrastructure","only","invoke","secrets","Bash","one","interactive","can","credentials","dashboard","generate","human"]