[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DQ36TAWMEVHS3P1GY46VYC":3,"skill-same:01M7DQ36TAWMEVHS3P1GY46VYC":73},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":46},"01M7DQ36TAWMEVHS3P1GY46VYC","sentry-tanstack-start-sdk",null,"Full Sentry SDK setup for TanStack Start React. Use when asked to \"add Sentry to TanStack Start\", \"install @sentry\u002Ftanstackstart-react\", or configure error monitoring, tracing, session replay, logs, or user feedback in a TanStack Start React app.","Hazek-dc\u002FPresensiGuru_FaceNet_EMAR","Hazek-dc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F75208960?v=4","01M7DEQV5B4YGS86A81DYH81DR","Hazek","01M7DEQV5XP4TM0C6NTHXCXCHR",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sentry-tanstack-start-sdk\ndescription: Full Sentry SDK setup for TanStack Start React. Use when asked to \"add Sentry to TanStack Start\", \"install @sentry\u002Ftanstackstart-react\", or configure error monitoring, tracing, session replay, logs, or user feedback in a TanStack Start React app.\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) > TanStack Start React SDK\n\n# Sentry TanStack Start React SDK\n\nOpinionated wizard that scans your TanStack Start React project and guides you through complete Sentry setup for browser and server runtimes.\n\n## Invoke This Skill When\n\n- User asks to \"add Sentry to TanStack Start\" or \"set up Sentry\" in a TanStack Start React app\n- User wants to install or configure `@sentry\u002Ftanstackstart-react`\n- User wants error monitoring, tracing, session replay, logs, or user feedback for TanStack Start React\n- User asks about `sentryTanstackStart`, `wrapFetchWithSentry`, `instrument.server.mjs`, or TanStack Start middleware instrumentation\n\n> **Note:** This SDK is currently alpha and documented as compatible with TanStack Start `1.0 RC`.\n> Always verify against [docs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Ftanstackstart-react\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Ftanstackstart-react\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 TanStack Start \u002F Router and existing Sentry\ncat package.json | grep -E '\"@tanstack\u002Freact-start\"|\"@tanstack\u002Freact-router\"|\"@sentry\u002Ftanstackstart-react\"'\n\n# Check if Sentry is already present\ncat package.json | grep '\"@sentry\u002F'\n\n# Detect key files used by the TanStack Start setup\nls src\u002Frouter.tsx src\u002Fstart.ts src\u002Fserver.ts instrument.server.mjs vite.config.ts vite.config.js 2>\u002Fdev\u002Fnull\n\n# Check whether source map upload credentials are configured\ncat .env .env.local .env.sentry-build-plugin 2>\u002Fdev\u002Fnull | grep \"SENTRY_AUTH_TOKEN\"\n\n# Detect deployment hints in scripts\ncat package.json | grep -E '\"dev\"|\"build\"|\"start\"|NODE_OPTIONS|--import'\n\n# Detect logging libraries\ncat package.json | grep -E '\"pino\"|\"winston\"|\"loglevel\"'\n\n# Detect companion backend directories\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002FGemfile ..\u002Fpom.xml 2>\u002Fdev\u002Fnull | head -3\n```\n\n**What to determine:**\n\n| Question | Impact |\n|----------|--------|\n| `@tanstack\u002Freact-start` present? | Confirms this skill is the right setup path |\n| `@sentry\u002Ftanstackstart-react` already installed? | Skip install and go to feature tuning |\n| `src\u002Frouter.tsx` exists? | Client-side `Sentry.init` placement |\n| `src\u002Fstart.ts` exists? | Global middleware setup for server-side errors |\n| `src\u002Fserver.ts` exists? | Server entry instrumentation placement |\n| `instrument.server.mjs` exists? | Runtime startup instrumentation path |\n| `vite.config.ts` exists? | Add `sentryTanstackStart` plugin and source maps |\n| `SENTRY_AUTH_TOKEN` configured? | Source map upload readiness |\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. Do not ask open-ended questions — lead with a proposal:\n\n**Recommended (core coverage):**\n- ✅ **Error Monitoring** — always; captures unhandled client and server errors\n- ✅ **Tracing** — high-value for request and route timing across browser and server\n- ✅ **Session Replay** — recommended for user-facing apps\n\n**Optional (enhanced observability):**\n- ⚡ **Logs** — recommend when structured log search and log-to-trace correlation are needed\n- ⚡ **User Feedback** — recommend when product teams want in-app issue reports\n\n**Recommendation logic:**\n\n| Feature | Recommend when... |\n|---------|------------------|\n| Error Monitoring | **Always** — non-negotiable baseline |\n| Tracing | **Usually yes** for TanStack Start; route + fetch instrumentation gives immediate value |\n| Session Replay | User-facing app, login flows, checkout flows, or hard-to-reproduce UX bugs |\n| Logs | Existing logging strategy, support workflow, or trace\u002Flog correlation needs |\n| User Feedback | Team wants direct user reports without leaving the app |\n\nPropose: *\"I recommend Error Monitoring + Tracing + Session Replay. Want me to also enable Logs and User Feedback?\"*\n\n---\n\n## Phase 3: Guide\n\n### Install\n\n```bash\nnpm install @sentry\u002Ftanstackstart-react --save\n```\n\n### Configure Client-Side Sentry in `src\u002Frouter.tsx`\n\nInitialize Sentry inside the router factory and gate it to the browser:\n\n```tsx\nimport * as Sentry from \"@sentry\u002Ftanstackstart-react\";\nimport { createRouter } from \"@tanstack\u002Freact-router\";\n\nexport const getRouter = () => {\n  const router = createRouter();\n\n  if (!router.isServer) {\n    Sentry.init({\n      dsn: \"___PUBLIC_DSN___\",\n      dataCollection: {\n        \u002F\u002F userInfo: false,\n        \u002F\u002F httpBodies: [],\n      },\n\n      integrations: [\n        Sentry.tanstackRouterBrowserTracingIntegration(router),\n        Sentry.replayIntegration(),\n        Sentry.feedbackIntegration({\n          colorScheme: \"system\",\n        }),\n      ],\n\n      enableLogs: true,\n      tracesSampleRate: 1.0,\n      replaysSessionSampleRate: 0.1,\n      replaysOnErrorSampleRate: 1.0,\n    });\n  }\n\n  return router;\n};\n```\n\n### Configure Server-Side Sentry in `instrument.server.mjs`\n\nCreate `instrument.server.mjs` in project root:\n\n```javascript\nimport * as Sentry from \"@sentry\u002Ftanstackstart-react\";\n\nSentry.init({\n  dsn: \"___PUBLIC_DSN___\",\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\u002Ftanstackstart-react\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n  enableLogs: true,\n  tracesSampleRate: 1.0,\n});\n```\n\n### Configure Vite Plugin in `vite.config.ts`\n\n`sentryTanstackStart` should be the last plugin:\n\n```typescript\nimport { defineConfig } from \"vite\";\nimport { sentryTanstackStart } from \"@sentry\u002Ftanstackstart-react\u002Fvite\";\nimport { tanstackStart } from \"@tanstack\u002Freact-start\u002Fplugin\u002Fvite\";\n\nexport default defineConfig({\n  plugins: [\n    tanstackStart(),\n    sentryTanstackStart({\n      org: \"___ORG_SLUG___\",\n      project: \"___PROJECT_SLUG___\",\n      authToken: process.env.SENTRY_AUTH_TOKEN,\n    }),\n  ],\n});\n```\n\nIf the token is stored in `.env`, load it with `loadEnv` in the Vite config before passing it to the plugin.\n\n### Instrument Server Entry Point in `src\u002Fserver.ts`\n\nWrap the fetch handler with `wrapFetchWithSentry`:\n\n```typescript\nimport { wrapFetchWithSentry } from \"@sentry\u002Ftanstackstart-react\";\nimport handler, { createServerEntry } from \"@tanstack\u002Freact-start\u002Fserver-entry\";\n\nexport default createServerEntry(\n  wrapFetchWithSentry({\n    fetch(request: Request) {\n      return handler.fetch(request);\n    },\n  }),\n);\n```\n\n### Add Global Server Middleware in `src\u002Fstart.ts`\n\nThese middleware capture server-side request and function errors:\n\n```tsx\nimport {\n  sentryGlobalFunctionMiddleware,\n  sentryGlobalRequestMiddleware,\n} from \"@sentry\u002Ftanstackstart-react\";\nimport { createStart } from \"@tanstack\u002Freact-start\";\n\nexport const startInstance = createStart(() => {\n  return {\n    requestMiddleware: [sentryGlobalRequestMiddleware],\n    functionMiddleware: [sentryGlobalFunctionMiddleware],\n  };\n});\n```\n\nSentry middleware should be first in each array.\n\n### Runtime Startup Patterns\n\nChoose one runtime method:\n\n| Runtime pattern | Use when... | Notes |\n|---|---|---|\n| `--import` flag | You can control Node startup flags | Preferred for production monitoring |\n| Direct import in `src\u002Fserver.ts` | Host restricts startup flags (for example serverless hosts) | Limits instrumentation to native Node APIs |\n\n`--import` examples:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"NODE_OPTIONS='--import .\u002Finstrument.server.mjs' vite dev --port 3000\",\n    \"build\": \"vite build && cp instrument.server.mjs .output\u002Fserver\",\n    \"start\": \"node --import .\u002F.output\u002Fserver\u002Finstrument.server.mjs .output\u002Fserver\u002Findex.mjs\"\n  }\n}\n```\n\nDirect import fallback (top of `src\u002Fserver.ts`):\n\n```typescript\nimport \"..\u002Finstrument.server.mjs\";\n```\n\n### For Each Agreed Feature\n\nWalk through features one at a time. Load the reference file, follow steps exactly, and verify before moving on:\n\n| Feature | Reference | Load when... |\n|---------|-----------|-------------|\n| Error Monitoring | `${SKILL_ROOT}\u002Freferences\u002Ferror-monitoring.md` | Always |\n| Tracing | `${SKILL_ROOT}\u002Freferences\u002Ftracing.md` | Route\u002FAPI performance visibility needed |\n| Session Replay | `${SKILL_ROOT}\u002Freferences\u002Fsession-replay.md` | User-facing app |\n| Logs | `${SKILL_ROOT}\u002Freferences\u002Flogging.md` | Structured logs and correlation needed |\n| User Feedback | `${SKILL_ROOT}\u002Freferences\u002Fuser-feedback.md` | In-app feedback collection needed |\n| TanStack Start Features | `${SKILL_ROOT}\u002Freferences\u002Ftanstackstart-features.md` | Server entry, Vite plugin, source maps, runtime startup |\n\nFor each feature: `Read ${SKILL_ROOT}\u002Freferences\u002F\u003Cfeature>.md`, follow steps exactly, verify it works.\n\n---\n\n## Configuration Reference\n\n### Key `Sentry.init()` Options\n\n| Option | Type | Default | Notes |\n|--------|------|---------|-------|\n| `dsn` | `string` | — | Required; SDK is disabled when empty |\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| `integrations` | `Integration[]` | SDK defaults | Include TanStack Router tracing, replay, feedback as needed |\n| `enableLogs` | `boolean` | `false` | Enables `Sentry.logger.*` APIs |\n| `tracesSampleRate` | `number` | — | `1.0` in development, lower in production |\n| `replaysSessionSampleRate` | `number` | — | Fraction of all sessions recorded |\n| `replaysOnErrorSampleRate` | `number` | — | Fraction of error sessions recorded |\n| `tunnel` | `string` | — | Optional ad-blocker bypass endpoint |\n| `debug` | `boolean` | `false` | SDK diagnostic logging |\n\n### TanStack Start-Specific APIs\n\n| API | Purpose |\n|-----|---------|\n| `tanstackRouterBrowserTracingIntegration(router)` | Browser navigation tracing |\n| `wrapFetchWithSentry(...)` | Server request tracing + error capture on fetch handler |\n| `sentryGlobalRequestMiddleware` | Captures request-level server errors |\n| `sentryGlobalFunctionMiddleware` | Captures server function errors |\n| `sentryTanstackStart({...})` | Vite plugin for source maps and middleware instrumentation |\n\n---\n\n## Verification\n\nTrigger test events to confirm Sentry receives data.\n\n### Issues Test (Frontend)\n\n```tsx\n\u003Cbutton\n  type=\"button\"\n  onClick={() => {\n    throw new Error(\"Sentry Test Error\");\n  }}\n>\n  Break the world\n\u003C\u002Fbutton>\n```\n\n### Tracing Test (Frontend + API Route)\n\n```tsx\n\u003Cbutton\n  type=\"button\"\n  onClick={async () => {\n    await Sentry.startSpan({ name: \"Example Frontend Span\", op: \"test\" }, async () => {\n      const res = await fetch(\"\u002Fapi\u002Fsentry-example\");\n      if (!res.ok) {\n        throw new Error(\"Sentry Example Frontend Error\");\n      }\n    });\n  }}\n>\n  Break the world\n\u003C\u002Fbutton>\n```\n\n### Logs Test\n\n```javascript\nSentry.logger.info(\"User example action completed\");\nSentry.logger.warn(\"Slow operation detected\", { operation: \"data_fetch\", duration: 3500 });\nSentry.logger.error(\"Validation failed\", { field: \"email\", reason: \"Invalid email\" });\n```\n\nConfirm in Sentry:\n- **Issues**: frontend\u002Fserver errors appear\n- **Traces**: browser and server spans appear\n- **Replays**: session replay appears when enabled\n- **Logs**: log lines appear when `enableLogs: true`\n- **User Feedback**: submissions appear when feedback integration is enabled\n\n---\n\n## Phase 4: Cross-Link\n\nAfter completing TanStack Start setup, check whether a companion backend exists without Sentry:\n\n```bash\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi ..\u002Fgo ..\u002Fpython 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002Fpyproject.toml ..\u002FGemfile ..\u002Fpom.xml 2>\u002Fdev\u002Fnull | head -5\n```\n\nIf a backend exists without Sentry configured, suggest the matching 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 (`pom.xml`, `build.gradle`) | Use `@sentry\u002Fjava` docs |\n| Node.js backend services | `sentry-node-sdk` |\n\n---\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| Events not appearing | Set `debug: true`, verify DSN, and ensure client\u002Fserver init files both run |\n| No server traces | Confirm `src\u002Fserver.ts` uses `wrapFetchWithSentry` and runtime loads `instrument.server.mjs` |\n| Server errors missing from route handlers | Ensure `sentryGlobalRequestMiddleware` and `sentryGlobalFunctionMiddleware` are first in arrays |\n| Source maps not resolving | Verify `SENTRY_AUTH_TOKEN`, `org`, and `project` in `sentryTanstackStart` config |\n| `SENTRY_AUTH_TOKEN` undefined in Vite config | Use `loadEnv(mode, process.cwd(), \"\")` or `.env.sentry-build-plugin` |\n| Replay not recording | Ensure `replayIntegration()` is in `integrations` and sample rates are non-zero |\n| Feedback widget not visible | Confirm `feedbackIntegration()` is configured and check CSS z-index conflicts |\n| Logs missing in Sentry | Set `enableLogs: true` and use `Sentry.logger.*` APIs |\n| Direct-import setup misses library spans | Prefer `--import` startup when possible; direct import supports native Node instrumentation only |\n| SSR rendering exceptions not auto-captured | Capture manually with `Sentry.captureException` in error boundaries \u002F fallback handlers |\n","> [All Skills](..\u002F..\u002FSKILL_TREE.md) > [SDK Setup](..\u002Fsentry-sdk-setup\u002FSKILL.md) > TanStack Start React SDK\n\n# Sentry TanStack Start React SDK\n\nOpinionated wizard that scans your TanStack Start React project and guides you through complete Sentry setup for browser and server runtimes.\n\n## Invoke This Skill When\n\n- User asks to \"add Sentry to TanStack Start\" or \"set up Sentry\" in a TanStack Start React app\n- User wants to install or configure `@sentry\u002Ftanstackstart-react`\n- User wants error monitoring, tracing, session replay, logs, or user feedback for TanStack Start React\n- User asks about `sentryTanstackStart`, `wrapFetchWithSentry`, `instrument.server.mjs`, or TanStack Start middleware instrumentation\n\n> **Note:** This SDK is currently alpha and documented as compatible with TanStack Start `1.0 RC`.\n> Always verify against [docs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Ftanstackstart-react\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fjavascript\u002Fguides\u002Ftanstackstart-react\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 TanStack Start \u002F Router and existing Sentry\ncat package.json | grep -E '\"@tanstack\u002Freact-start\"|\"@tanstack\u002Freact-router\"|\"@sentry\u002Ftanstackstart-react\"'\n\n# Check if Sentry is already present\ncat package.json | grep '\"@sentry\u002F'\n\n# Detect key files used by the TanStack Start setup\nls src\u002Frouter.tsx src\u002Fstart.ts src\u002Fserver.ts instrument.server.mjs vite.config.ts vite.config.js 2>\u002Fdev\u002Fnull\n\n# Check whether source map upload credentials are configured\ncat .env .env.local .env.sentry-build-plugin 2>\u002Fdev\u002Fnull | grep \"SENTRY_AUTH_TOKEN\"\n\n# Detect deployment hints in scripts\ncat package.json | grep -E '\"dev\"|\"build\"|\"start\"|NODE_OPTIONS|--import'\n\n# Detect logging libraries\ncat package.json | grep -E '\"pino\"|\"winston\"|\"loglevel\"'\n\n# Detect companion backend directories\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002FGemfile ..\u002Fpom.xml 2>\u002Fdev\u002Fnull | head -3\n```\n\n**What to determine:**\n\n| Question | Impact |\n|----------|--------|\n| `@tanstack\u002Freact-start` present? | Confirms this skill is the right setup path |\n| `@sentry\u002Ftanstackstart-react` already installed? | Skip install and go to feature tuning |\n| `src\u002Frouter.tsx` exists? | Client-side `Sentry.init` placement |\n| `src\u002Fstart.ts` exists? | Global middleware setup for server-side errors |\n| `src\u002Fserver.ts` exists? | Server entry instrumentation placement |\n| `instrument.server.mjs` exists? | Runtime startup instrumentation path |\n| `vite.config.ts` exists? | Add `sentryTanstackStart` plugin and source maps |\n| `SENTRY_AUTH_TOKEN` configured? | Source map upload readiness |\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. Do not ask open-ended questions — lead with a proposal:\n\n**Recommended (core coverage):**\n- ✅ **Error Monitoring** — always; captures unhandled client and server errors\n- ✅ **Tracing** — high-value for request and route timing across browser and server\n- ✅ **Session Replay** — recommended for user-facing apps\n\n**Optional (enhanced observability):**\n- ⚡ **Logs** — recommend when structured log search and log-to-trace correlation are needed\n- ⚡ **User Feedback** — recommend when product teams want in-app issue reports\n\n**Recommendation logic:**\n\n| Feature | Recommend when... |\n|---------|------------------|\n| Error Monitoring | **Always** — non-negotiable baseline |\n| Tracing | **Usually yes** for TanStack Start; route + fetch instrumentation gives immediate value |\n| Session Replay | User-facing app, login flows, checkout flows, or hard-to-reproduce UX bugs |\n| Logs | Existing logging strategy, support workflow, or trace\u002Flog correlation needs |\n| User Feedback | Team wants direct user reports without leaving the app |\n\nPropose: *\"I recommend Error Monitoring + Tracing + Session Replay. Want me to also enable Logs and User Feedback?\"*\n\n---\n\n## Phase 3: Guide\n\n### Install\n\n```bash\nnpm install @sentry\u002Ftanstackstart-react --save\n```\n\n### Configure Client-Side Sentry in `src\u002Frouter.tsx`\n\nInitialize Sentry inside the router factory and gate it to the browser:\n\n```tsx\nimport * as Sentry from \"@sentry\u002Ftanstackstart-react\";\nimport { createRouter } from \"@tanstack\u002Freact-router\";\n\nexport const getRouter = () => {\n  const router = createRouter();\n\n  if (!router.isServer) {\n    Sentry.init({\n      dsn: \"___PUBLIC_DSN___\",\n      dataCollection: {\n        \u002F\u002F userInfo: false,\n        \u002F\u002F httpBodies: [],\n      },\n\n      integrations: [\n        Sentry.tanstackRouterBrowserTracingIntegration(router),\n        Sentry.replayIntegration(),\n        Sentry.feedbackIntegration({\n          colorScheme: \"system\",\n        }),\n      ],\n\n      enableLogs: true,\n      tracesSampleRate: 1.0,\n      replaysSessionSampleRate: 0.1,\n      replaysOnErrorSampleRate: 1.0,\n    });\n  }\n\n  return router;\n};\n```\n\n### Configure Server-Side Sentry in `instrument.server.mjs`\n\nCreate `instrument.server.mjs` in project root:\n\n```javascript\nimport * as Sentry from \"@sentry\u002Ftanstackstart-react\";\n\nSentry.init({\n  dsn: \"___PUBLIC_DSN___\",\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\u002Ftanstackstart-react\u002Fconfiguration\u002Foptions\u002F#dataCollection\n    \u002F\u002F userInfo: false,\n    \u002F\u002F httpBodies: [],\n  },\n  enableLogs: true,\n  tracesSampleRate: 1.0,\n});\n```\n\n### Configure Vite Plugin in `vite.config.ts`\n\n`sentryTanstackStart` should be the last plugin:\n\n```typescript\nimport { defineConfig } from \"vite\";\nimport { sentryTanstackStart } from \"@sentry\u002Ftanstackstart-react\u002Fvite\";\nimport { tanstackStart } from \"@tanstack\u002Freact-start\u002Fplugin\u002Fvite\";\n\nexport default defineConfig({\n  plugins: [\n    tanstackStart(),\n    sentryTanstackStart({\n      org: \"___ORG_SLUG___\",\n      project: \"___PROJECT_SLUG___\",\n      authToken: process.env.SENTRY_AUTH_TOKEN,\n    }),\n  ],\n});\n```\n\nIf the token is stored in `.env`, load it with `loadEnv` in the Vite config before passing it to the plugin.\n\n### Instrument Server Entry Point in `src\u002Fserver.ts`\n\nWrap the fetch handler with `wrapFetchWithSentry`:\n\n```typescript\nimport { wrapFetchWithSentry } from \"@sentry\u002Ftanstackstart-react\";\nimport handler, { createServerEntry } from \"@tanstack\u002Freact-start\u002Fserver-entry\";\n\nexport default createServerEntry(\n  wrapFetchWithSentry({\n    fetch(request: Request) {\n      return handler.fetch(request);\n    },\n  }),\n);\n```\n\n### Add Global Server Middleware in `src\u002Fstart.ts`\n\nThese middleware capture server-side request and function errors:\n\n```tsx\nimport {\n  sentryGlobalFunctionMiddleware,\n  sentryGlobalRequestMiddleware,\n} from \"@sentry\u002Ftanstackstart-react\";\nimport { createStart } from \"@tanstack\u002Freact-start\";\n\nexport const startInstance = createStart(() => {\n  return {\n    requestMiddleware: [sentryGlobalRequestMiddleware],\n    functionMiddleware: [sentryGlobalFunctionMiddleware],\n  };\n});\n```\n\nSentry middleware should be first in each array.\n\n### Runtime Startup Patterns\n\nChoose one runtime method:\n\n| Runtime pattern | Use when... | Notes |\n|---|---|---|\n| `--import` flag | You can control Node startup flags | Preferred for production monitoring |\n| Direct import in `src\u002Fserver.ts` | Host restricts startup flags (for example serverless hosts) | Limits instrumentation to native Node APIs |\n\n`--import` examples:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"NODE_OPTIONS='--import .\u002Finstrument.server.mjs' vite dev --port 3000\",\n    \"build\": \"vite build && cp instrument.server.mjs .output\u002Fserver\",\n    \"start\": \"node --import .\u002F.output\u002Fserver\u002Finstrument.server.mjs .output\u002Fserver\u002Findex.mjs\"\n  }\n}\n```\n\nDirect import fallback (top of `src\u002Fserver.ts`):\n\n```typescript\nimport \"..\u002Finstrument.server.mjs\";\n```\n\n### For Each Agreed Feature\n\nWalk through features one at a time. Load the reference file, follow steps exactly, and verify before moving on:\n\n| Feature | Reference | Load when... |\n|---------|-----------|-------------|\n| Error Monitoring | `${SKILL_ROOT}\u002Freferences\u002Ferror-monitoring.md` | Always |\n| Tracing | `${SKILL_ROOT}\u002Freferences\u002Ftracing.md` | Route\u002FAPI performance visibility needed |\n| Session Replay | `${SKILL_ROOT}\u002Freferences\u002Fsession-replay.md` | User-facing app |\n| Logs | `${SKILL_ROOT}\u002Freferences\u002Flogging.md` | Structured logs and correlation needed |\n| User Feedback | `${SKILL_ROOT}\u002Freferences\u002Fuser-feedback.md` | In-app feedback collection needed |\n| TanStack Start Features | `${SKILL_ROOT}\u002Freferences\u002Ftanstackstart-features.md` | Server entry, Vite plugin, source maps, runtime startup |\n\nFor each feature: `Read ${SKILL_ROOT}\u002Freferences\u002F\u003Cfeature>.md`, follow steps exactly, verify it works.\n\n---\n\n## Configuration Reference\n\n### Key `Sentry.init()` Options\n\n| Option | Type | Default | Notes |\n|--------|------|---------|-------|\n| `dsn` | `string` | — | Required; SDK is disabled when empty |\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| `integrations` | `Integration[]` | SDK defaults | Include TanStack Router tracing, replay, feedback as needed |\n| `enableLogs` | `boolean` | `false` | Enables `Sentry.logger.*` APIs |\n| `tracesSampleRate` | `number` | — | `1.0` in development, lower in production |\n| `replaysSessionSampleRate` | `number` | — | Fraction of all sessions recorded |\n| `replaysOnErrorSampleRate` | `number` | — | Fraction of error sessions recorded |\n| `tunnel` | `string` | — | Optional ad-blocker bypass endpoint |\n| `debug` | `boolean` | `false` | SDK diagnostic logging |\n\n### TanStack Start-Specific APIs\n\n| API | Purpose |\n|-----|---------|\n| `tanstackRouterBrowserTracingIntegration(router)` | Browser navigation tracing |\n| `wrapFetchWithSentry(...)` | Server request tracing + error capture on fetch handler |\n| `sentryGlobalRequestMiddleware` | Captures request-level server errors |\n| `sentryGlobalFunctionMiddleware` | Captures server function errors |\n| `sentryTanstackStart({...})` | Vite plugin for source maps and middleware instrumentation |\n\n---\n\n## Verification\n\nTrigger test events to confirm Sentry receives data.\n\n### Issues Test (Frontend)\n\n```tsx\n\u003Cbutton\n  type=\"button\"\n  onClick={() => {\n    throw new Error(\"Sentry Test Error\");\n  }}\n>\n  Break the world\n\u003C\u002Fbutton>\n```\n\n### Tracing Test (Frontend + API Route)\n\n```tsx\n\u003Cbutton\n  type=\"button\"\n  onClick={async () => {\n    await Sentry.startSpan({ name: \"Example Frontend Span\", op: \"test\" }, async () => {\n      const res = await fetch(\"\u002Fapi\u002Fsentry-example\");\n      if (!res.ok) {\n        throw new Error(\"Sentry Example Frontend Error\");\n      }\n    });\n  }}\n>\n  Break the world\n\u003C\u002Fbutton>\n```\n\n### Logs Test\n\n```javascript\nSentry.logger.info(\"User example action completed\");\nSentry.logger.warn(\"Slow operation detected\", { operation: \"data_fetch\", duration: 3500 });\nSentry.logger.error(\"Validation failed\", { field: \"email\", reason: \"Invalid email\" });\n```\n\nConfirm in Sentry:\n- **Issues**: frontend\u002Fserver errors appear\n- **Traces**: browser and server spans appear\n- **Replays**: session replay appears when enabled\n- **Logs**: log lines appear when `enableLogs: true`\n- **User Feedback**: submissions appear when feedback integration is enabled\n\n---\n\n## Phase 4: Cross-Link\n\nAfter completing TanStack Start setup, check whether a companion backend exists without Sentry:\n\n```bash\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi ..\u002Fgo ..\u002Fpython 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002Fpyproject.toml ..\u002FGemfile ..\u002Fpom.xml 2>\u002Fdev\u002Fnull | head -5\n```\n\nIf a backend exists without Sentry configured, suggest the matching 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 (`pom.xml`, `build.gradle`) | Use `@sentry\u002Fjava` docs |\n| Node.js backend services | `sentry-node-sdk` |\n\n---\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| Events not appearing | Set `debug: true`, verify DSN, and ensure client\u002Fserver init files both run |\n| No server traces | Confirm `src\u002Fserver.ts` uses `wrapFetchWithSentry` and runtime loads `instrument.server.mjs` |\n| Server errors missing from route handlers | Ensure `sentryGlobalRequestMiddleware` and `sentryGlobalFunctionMiddleware` are first in arrays |\n| Source maps not resolving | Verify `SENTRY_AUTH_TOKEN`, `org`, and `project` in `sentryTanstackStart` config |\n| `SENTRY_AUTH_TOKEN` undefined in Vite config | Use `loadEnv(mode, process.cwd(), \"\")` or `.env.sentry-build-plugin` |\n| Replay not recording | Ensure `replayIntegration()` is in `integrations` and sample rates are non-zero |\n| Feedback widget not visible | Confirm `feedbackIntegration()` is configured and check CSS z-index conflicts |\n| Logs missing in Sentry | Set `enableLogs: true` and use `Sentry.logger.*` APIs |\n| Direct-import setup misses library spans | Prefer `--import` startup when possible; direct import supports native Node instrumentation only |\n| SSR rendering exceptions not auto-captured | Capture manually with `Sentry.captureException` in error boundaries \u002F fallback handlers |\n",{"name":5,"parent":24,"license":15,"category":25,"description":7,"disable-model-invocation":26},"sentry-sdk-setup","sdk-setup",true,"main","b1e4ffadb4f933bbbcaa03a83f8b9929171ac28b",".agents\u002Fskills\u002Fsentry-tanstack-start-sdk",0,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR","https:\u002F\u002Fgithub.com\u002FHazek-dc","2026-10-22 08:36:44",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":26},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill sentry-tanstack-start-sdk",{"tool":40,"command":41},"bunx","bunx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill sentry-tanstack-start-sdk",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill sentry-tanstack-start-sdk","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002FSKILL.md",[47,53,57,61,65,69],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Ferror-monitoring.md","REFERENCE","参考文档",3720,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002Freferences\u002Ferror-monitoring.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Flogging.md",1781,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002Freferences\u002Flogging.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fsession-replay.md",1999,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002Freferences\u002Fsession-replay.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Ftanstackstart-features.md",3066,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002Freferences\u002Ftanstackstart-features.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Ftracing.md",3094,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002Freferences\u002Ftracing.md",{"path":70,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fuser-feedback.md",1884,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-tanstack-start-sdk\u002Freferences\u002Fuser-feedback.md",[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7DS6GGYRZAYD33PFPS8Z2T3","testing-best-practices","Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.","MIT","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7DS6BC3AW7HTPRHE2TTVKWM","tailwindcss-development","Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex\u002Fgrid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3\u002Fv4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML\u002FCSS component, CSS file audits, build tool configuration, and vanilla CSS.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftailwindcss-development\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7DS66GE6B11MYJDVC74HXM4","laravel-best-practices","Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Flaravel-best-practices\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7DS5ZW717DMS6P1E90AQCKV","infer-conventions","Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai\u002Frules`, resolve mixed or conflicting patterns (e.g. \"are we using Form Requests or inline validation?\"), or onboard agents and teammates to \"how we do things here\". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, console), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai\u002Frules` files by hand.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finfer-conventions\u002FSKILL.md",[],[],{"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":78,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7DS5W12RGCVJTFQJ1N0GB8E","inertia-react-development","Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using \u003CLink>, \u003CForm>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finertia-react-development\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7DS5PVDPMPCWSK2RXPDC9BB","deploying-to-cloud","Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to Cloud, create or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Fdeploying-to-cloud\u002FSKILL.md",[],[]]