Token导航 LogoToken导航

Agent Skill · 研究检索

sentry-cloudflare-sdk(Sentry Cloudflare SDK 搜索)

sentry-cloudflare-sdk 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

sentry-cloudflare-sdk 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 69,749。

总安装 216周安装 9GitHub Stars 155下载 72核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sentry-cloudflare-sdk(Sentry Cloudflare SDK 搜索)
来源仓库:https://github.com/getsentry/sentry-for-claude
仓库路径:skills/sentry-cloudflare-sdk
安装命令:
npx skills add https://github.com/getsentry/sentry-for-claude --skill sentry-cloudflare-sdk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/getsentry/sentry-for-claude --skill sentry-cloudflare-sdk

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

sentry-cloudflare-sdk 用于查找、检索和筛选相关信息,适合快速定位候选结果。适用于需要根据关键词或任务场景从来源线索中筛选信息的场景。通过 npx skills add 命令安装指定 GitHub 仓库中的技能模块。安装前需确认权限范围和维护状态,注意可能触发联网或文件读写操作。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/sentry-cloudflare-sdk

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/getsentry/sentry-for-claude --skill sentry-clo…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

sentry-cloudflare-sdk 怎么安装?

在终端执行 npx skills add https://github.com/getsentry/sentry-for-claude --skill sentry-cloudflare-sd…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

sentry-cloudflare-sdk 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

sentry-cloudflare-sdk 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

sentry-cloudflare-sdk 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

sentry-cloudflare-sdk 用的人多吗?

公开数据是累计安装 216 次,近一周安装 9 次,下载 72 次,GitHub 155 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

sentry-cloudflare-sdk 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
sentry-cloudflare-sdk

Sentry Cloudflare SDK 搜索 · 本页

216155接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

All Skills > SDK Setup > Cloudflare SDK

Sentry Cloudflare SDK

Opinionated wizard that scans your Cloudflare project and guides you through complete Sentry setup for Workers, Pages, Durable Objects, Queues, Workflows, and Hono.

Invoke This Skill When

  • User asks to "add Sentry to Cloudflare Workers" or "set up Sentry" in a Cloudflare project
  • User wants to install or configure @sentry/cloudflare
  • User wants error monitoring, tracing, logging, crons, or AI monitoring for Cloudflare Workers or Pages
  • User asks about withSentry, sentryPagesPlugin, instrumentDurableObjectWithSentry, or instrumentD1WithSentry
  • User wants to monitor Durable Objects, Queues, Workflows, Scheduled handlers, or Email handlers on Cloudflare
Note: SDK versions and APIs below reflect current Sentry docs at time of writing (@sentry/cloudflare v10.43.0). Always verify against docs.sentry.io/platforms/javascript/guides/cloudflare/ before implementing.

Phase 1: Detect

Run these commands to understand the project before making any recommendations:

# Detect Cloudflare project
ls wrangler.toml wrangler.jsonc wrangler.json 2>/dev/null

# Detect existing Sentry
cat package.json 2>/dev/null | grep -E '"@sentry/'

# Detect project type (Workers vs Pages)
ls functions/ functions/_middleware.js functions/_middleware.ts 2>/dev/null && echo "Pages detected"
cat wrangler.toml 2>/dev/null | grep -E 'main|pages_build_output_dir'

# Detect framework
cat package.json 2>/dev/null | grep -E '"hono"|"remix"|"astro"|"svelte"'

# Detect Durable Objects
cat wrangler.toml 2>/dev/null | grep -i 'durable_objects'

# Detect D1 databases
cat wrangler.toml 2>/dev/null | grep -i 'd1_databases'

# Detect Queues
cat wrangler.toml 2>/dev/null | grep -i 'queues'

# Detect Workflows
cat wrangler.toml 2>/dev/null | grep -i 'workflows'

# Detect Scheduled handlers (cron triggers)
cat wrangler.toml 2>/dev/null | grep -i 'crons\|triggers'

# Detect compatibility flags
cat wrangler.toml 2>/dev/null | grep -i 'compatibility_flags'
cat wrangler.jsonc 2>/dev/null | grep -i 'compatibility_flags'

# Detect AI/LLM libraries
cat package.json 2>/dev/null | grep -E '"openai"|"@anthropic-ai"|"ai"|"@google/generative-ai"|"@langchain"'

# Detect logging libraries
cat package.json 2>/dev/null | grep -E '"pino"|"winston"'

# Check for companion frontend
ls frontend/ web/ client/ 2>/dev/null
cat package.json 2>/dev/null | grep -E '"react"|"vue"|"svelte"|"next"'

What to determine:

QuestionImpact
Workers or Pages?Determines wrapper: withSentry vs sentryPagesPlugin
Hono framework?Automatic Hono error handler integration via honoIntegration
@sentry/cloudflare already installed?Skip install, go to feature config
Durable Objects configured?Recommend instrumentDurableObjectWithSentry
D1 databases bound?Recommend instrumentD1WithSentry
Queues configured?withSentry auto-instruments queue handlers
Workflows configured?Recommend instrumentWorkflowWithSentry
Cron triggers configured?withSentry auto-instruments scheduled handlers; recommend Crons monitoring
nodejs_als or nodejs_compat flag set?Required — SDK needs AsyncLocalStorage
AI/LLM libraries?Recommend AI Monitoring integrations
Companion frontend?Trigger Phase 4 cross-link

Phase 2: Recommend

Present a concrete recommendation based on what you found. Don't ask open-ended questions — lead with a proposal:

Recommended (core coverage):

  • ✅ Error Monitoring — always; captures unhandled exceptions in fetch, scheduled, queue, email, and Durable Object handlers
  • ✅ Tracing — automatic HTTP request spans, outbound fetch tracing, D1 query spans

Optional (enhanced observability):

  • ⚡ Logging — structured logs via Sentry.logger.*; recommend when log search is needed
  • ⚡ Crons — detect missed/failed scheduled jobs; recommend when cron triggers are configured
  • ⚡ D1 Instrumentation — automatic query spans and breadcrumbs; recommend when D1 is bound
  • ⚡ Durable Objects — automatic error capture and spans for DO methods; recommend when DOs are configured
  • ⚡ Workflows — automatic span creation for workflow steps; recommend when Workflows are configured
  • ⚡ AI Monitoring — Vercel AI SDK, OpenAI, Anthropic, LangChain; recommend when AI libraries detected

Recommendation logic:

FeatureRecommend when...
Error MonitoringAlways — non-negotiable baseline
TracingAlways — HTTP request tracing and outbound fetch are high-value
LoggingApp needs structured log search or log-to-trace correlation
CronsCron triggers configured in wrangler.toml
D1 InstrumentationD1 database bindings present
Durable ObjectsDurable Object bindings configured
WorkflowsWorkflow bindings configured
AI MonitoringApp uses Vercel AI SDK, OpenAI, Anthropic, or LangChain
MetricsApp needs custom counters, gauges, or distributions

Propose: *"I recommend setting up Error Monitoring + Tracing. Want me to also add D1 instrumentation and Crons monitoring?"*


Phase 3: Guide

Option 1: Source Maps Wizard

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: `` npx @sentry/wizard@latest -i sourcemaps `` This sets up source map uploading so your production stack traces show readable code. It does not set up the SDK initialization — you still need to follow Option 2 below for the actual SDK setup. Once it finishes, continue with Option 2 for SDK setup.
Note: Unlike framework SDKs (Next.js, SvelteKit), there is no Cloudflare-specific wizard integration. The sourcemaps wizard only handles source map upload configuration.

Option 2: Manual Setup

Prerequisites: Compatibility Flags

The SDK requires AsyncLocalStorage. Add one of these flags to your Wrangler config:

wrangler.toml:

compatibility_flags = ["nodejs_als"]
# or: compatibility_flags = ["nodejs_compat"]

wrangler.jsonc:

{
  "compatibility_flags": ["nodejs_als"]
}
nodejs_als is lighter — it only enables AsyncLocalStorage. Use nodejs_compat if your code also needs other Node.js APIs.
Install
npm install @sentry/cloudflare
Workers Setup

Wrap your handler with withSentry. This automatically instruments fetch, scheduled, queue, email, and tail handlers:

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

export default Sentry.withSentry(
  (env: Env) => ({
    dsn: env.SENTRY_DSN,
    sendDefaultPii: true,
    tracesSampleRate: 1.0,
    enableLogs: true,
  }),
  {
    async fetch(request, env, ctx) {
      return new Response("Hello World!");
    },
  } satisfies ExportedHandler<Env>,
);

Key points:

  • The first argument is a callback that receives env — use this to read secrets like SENTRY_DSN
  • The SDK reads DSN, environment, release, debug, tunnel, and traces sample rate from env automatically (see Environment Variables)
  • withSentry wraps all exported handlers — you do not need separate wrappers for scheduled, queue, etc.
Pages Setup

Use sentryPagesPlugin as middleware:

// functions/_middleware.ts
import * as Sentry from "@sentry/cloudflare";

export const onRequest = Sentry.sentryPagesPlugin((context) => ({
  dsn: context.env.SENTRY_DSN,
  sendDefaultPii: true,
  tracesSampleRate: 1.0,
  enableLogs: true,
}));

Chaining multiple middlewares:

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

export const onRequest = [
  // Sentry must be first
  Sentry.sentryPagesPlugin((context) => ({
    dsn: context.env.SENTRY_DSN,
    tracesSampleRate: 1.0,
  })),
  // Add more middlewares here
];

Using wrapRequestHandler directly (for frameworks like SvelteKit on Cloudflare Pages):

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

export const handle = ({ event, resolve }) => {
  return Sentry.wrapRequestHandler(
    {
      options: {
        dsn: event.platform.env.SENTRY_DSN,
        tracesSampleRate: 1.0,
      },
      request: event.request,
      context: event.platform.ctx,
    },
    () => resolve(event),
  );
};
Hono on Cloudflare Workers

Hono apps are objects with a fetch method — wrap them with withSentry directly:

import { Hono } from "hono";
import * as Sentry from "@sentry/cloudflare";

const app = new Hono();

app.get("/", (ctx) => ctx.json({ message: "Hello" }));

app.get("/error", () => {
  throw new Error("Test error");
});

app.onError((err, ctx) => {
  return ctx.json({ error: err.message }, 500);
});

export default Sentry.withSentry(
  (env: Env) => ({
    dsn: env.SENTRY_DSN,
    tracesSampleRate: 1.0,
  }),
  app,
);

The honoIntegration (enabled by default) automatically captures errors from Hono's onError handler and sets the correct transaction name with the route path.

Set Up the SENTRY_DSN Secret

Store your DSN as a Cloudflare secret — do not hardcode it:

# Local development: add to .dev.vars
echo 'SENTRY_DSN="https://examplePublicKey@o0.ingest.sentry.io/0"' >> .dev.vars

# Production: set as a secret
npx wrangler secret put SENTRY_DSN

Add the binding to your Env type:

interface Env {
  SENTRY_DSN: string;
  // ... other bindings
}
Source Maps Setup

Source maps make production stack traces readable. Without them, you see minified/bundled code.

Step 1: Generate a Sentry auth token

Go to sentry.io/settings/auth-tokens/ and create a token with project:releases and org:read scopes.

Step 2: Install the Sentry Vite plugin (most Cloudflare projects use Vite via Wrangler):

npm install @sentry/vite-plugin --save-dev

Step 3: Configure vite.config.ts (if your project has one):

import { defineConfig } from "vite";
import { sentryVitePlugin } from "@sentry/vite-plugin";

export default defineConfig({
  build: {
    sourcemap: true,
  },
  plugins: [
    sentryVitePlugin({
      org: "___ORG_SLUG___",
      project: "___PROJECT_SLUG___",
      authToken: process.env.SENTRY_AUTH_TOKEN,
    }),
  ],
});

Step 4: Set environment variables in CI

SENTRY_AUTH_TOKEN=sntrys_eyJ...
SENTRY_ORG=my-org
SENTRY_PROJECT=my-project

Step 5: Add to .gitignore

.dev.vars
.env.sentry-build-plugin

Automatic Release Detection

The SDK can automatically detect the release version via Cloudflare's version metadata binding:

wrangler.toml:

[version_metadata]
binding = "CF_VERSION_METADATA"

Release priority (highest to lowest):

  1. release option passed to Sentry.init()
  2. SENTRY_RELEASE environment variable
  3. CF_VERSION_METADATA.id binding

For Each Agreed Feature

Load the corresponding reference file and follow its steps:

FeatureReference fileLoad when...
Error Monitoringreferences/error-monitoring.mdAlways (baseline) — unhandled exceptions, manual capture, scopes, enrichment
Tracingreferences/tracing.mdHTTP request tracing, outbound fetch spans, D1 query spans, distributed tracing
Loggingreferences/logging.mdStructured logs via Sentry.logger.*, log-to-trace correlation
Cronsreferences/crons.mdScheduled handler monitoring, withMonitor, check-in API
Durable Objectsreferences/durable-objects.mdInstrument Durable Object classes for error capture and spans

For each feature: read the reference file, follow its steps exactly, and verify before moving on.


Verification

After setup, verify Sentry is working:

// Add temporarily to your fetch handler, then remove
export default Sentry.withSentry(
  (env: Env) => ({
    dsn: env.SENTRY_DSN,
    tracesSampleRate: 1.0,
  }),
  {
    async fetch(request, env, ctx) {
      throw new Error("Sentry test error — delete me");
    },
  } satisfies ExportedHandler<Env>,
);

Deploy and trigger the route, then check your Sentry Issues dashboard — the error should appear within ~30 seconds.

Verification checklist:

CheckHow
Errors capturedThrow in a fetch handler, verify in Sentry
Tracing workingCheck Performance tab for HTTP spans
Source maps workingCheck stack trace shows readable file/line names
D1 spans (if configured)Run a D1 query, check for db.query spans
Scheduled monitoring (if configured)Trigger a cron, check Crons dashboard

Config Reference

Sentry.init() Options

OptionTypeDefaultNotes
dsnstring—Required. Read from env.SENTRY_DSN automatically if not set
tracesSampleRatenumber—0–1; 1.0 in dev, lower in prod recommended
tracesSamplerfunction—Dynamic sampling function; mutually exclusive with tracesSampleRate
sendDefaultPiibooleanfalseInclude request headers and cookies in events
enableLogsbooleanfalseEnable Sentry Logs product
environmentstringautoRead from env.SENTRY_ENVIRONMENT if not set
releasestringautoDetected from CF_VERSION_METADATA.id or SENTRY_RELEASE
debugbooleanfalseRead from env.SENTRY_DEBUG if not set. Log SDK activity to console
tunnelstring—Read from env.SENTRY_TUNNEL if not set
beforeSendfunction—Filter/modify error events before sending
beforeSendTransactionfunction—Filter/modify transaction events before sending
beforeSendLogfunction—Filter/modify log entries before sending
tracePropagationTargets`(string\RegExp)[]`all URLsControl which outbound requests get trace headers
skipOpenTelemetrySetupbooleanfalseOpt-out of OpenTelemetry compatibility tracer
instrumentPrototypeMethods`boolean \string[]`falseDurable Object: instrument prototype methods for RPC spans

Environment Variables (Read from env)

The SDK reads these from the Cloudflare env object automatically:

VariablePurpose
SENTRY_DSNDSN for Sentry init
SENTRY_RELEASERelease version string
SENTRY_ENVIRONMENTEnvironment name (production, staging)
SENTRY_TRACES_SAMPLE_RATETraces sample rate (parsed as float)
SENTRY_DEBUGEnable debug mode ("true" / "1")
SENTRY_TUNNELTunnel URL for event proxying
CF_VERSION_METADATACloudflare version metadata binding (auto-detected release)

Default Integrations

These are registered automatically by getDefaultIntegrations():

IntegrationPurpose
dedupeIntegrationPrevent duplicate events (disabled for Workflows)
inboundFiltersIntegrationFilter events by type, message, URL
functionToStringIntegrationPreserve original function names
linkedErrorsIntegrationFollow cause chains in errors
fetchIntegrationTrace outbound fetch() calls, create breadcrumbs
honoIntegrationAuto-capture Hono onError exceptions
requestDataIntegrationAttach request data to events
consoleIntegrationCapture console.* calls as breadcrumbs

Phase 4: Cross-Link

After completing Cloudflare setup, check for companion services:

# Check for companion frontend
ls frontend/ web/ client/ ui/ 2>/dev/null
cat package.json 2>/dev/null | grep -E '"react"|"vue"|"svelte"|"next"|"astro"'

# Check for companion backend in adjacent directories
ls ../backend ../server ../api 2>/dev/null
cat ../go.mod ../requirements.txt ../Gemfile 2>/dev/null | head -3

If a frontend is found, suggest the matching SDK skill:

Frontend detectedSuggest skill
Reactsentry-react-sdk
Next.jssentry-nextjs-sdk
Svelte/SvelteKitsentry-svelte-sdk
Vue/NuxtSee docs.sentry.io/platforms/javascript/guides/vue/

If a backend is found in a different directory:

Backend detectedSuggest skill
Go (go.mod)sentry-go-sdk
Python (requirements.txt, pyproject.toml)sentry-python-sdk
Ruby (Gemfile)sentry-ruby-sdk
Node.js (Express, Fastify)sentry-node-sdk

Connecting frontend and backend with linked Sentry projects enables distributed tracing — stack traces that span your browser, Cloudflare Worker, and backend API in a single trace view.


Troubleshooting

IssueCauseSolution
Events not appearingDSN not set or debug: false hiding errorsSet debug: true temporarily in init options; verify SENTRY_DSN secret is set with wrangler secret list
AsyncLocalStorage is not definedMissing compatibility flagAdd nodejs_als or nodejs_compat to compatibility_flags in wrangler.toml
Stack traces show minified codeSource maps not uploadedConfigure @sentry/vite-plugin or run npx @sentry/wizard -i sourcemaps; verify SENTRY_AUTH_TOKEN in CI
Events lost on short-lived requestsSDK not flushing before worker terminatesEnsure withSentry or sentryPagesPlugin wraps your handler — they use ctx.waitUntil() to flush
Hono errors not capturedHono app not wrapped with withSentryPass the Hono app as the second argument to Sentry.withSentry()
Durable Object errors missingDO class not instrumentedWrap class with Sentry.instrumentDurableObjectWithSentry() — see references/durable-objects.md
D1 queries not creating spansD1 binding not instrumentedWrap binding with Sentry.instrumentD1WithSentry(env.DB) before use
Scheduled handler not monitoredwithSentry not wrapping the handlerEnsure export default Sentry.withSentry(...) wraps your entire exported handler object
Release not auto-detectedCF_VERSION_METADATA binding not configuredAdd [version_metadata] with binding = "CF_VERSION_METADATA" to wrangler.toml
Duplicate events in WorkflowsDedupe integration filtering step failuresSDK automatically disables dedupe for Workflows; verify you use instrumentWorkflowWithSentry

平台分布

Codex

35.02%
按下载量换算25

Claude

31.27%
按下载量换算23

Cursor

16.92%
按下载量换算12

Gemini CLI

9.39%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills