sentry-sdk-skill-creator by getsentry/sentry-for-ai
npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-sdk-skill-creator所有技能 > SDK 技能创建器
生成一个完整的、经过研究支持的 SDK 技能包——一个主要的向导 SKILL.md 文件,加上 SDK 支持的每个功能支柱的深度参考文件。
sentry-<platform>-sdk 技能包首先阅读
${SKILL_ROOT}/references/philosophy.md——它定义了此技能实现的包架构、向导流程和设计原则。
确定你要为其构建技能的 SDK:
# 什么 SDK?包名是什么?
# 示例:sentry-go, @sentry/sveltekit, sentry-python, sentry-ruby, sentry-cocoa
建立功能矩阵——此 SDK 支持哪些 Sentry 支柱?
| 支柱 | 检查文档 |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 备注 |
|---|
| 错误监控 | 始终可用 | 不可协商的基线 |
| 追踪/性能 | 通常可用 | 检查是否有 span API |
| 性能分析 | 因 SDK 而异 | 可能已移除或处于实验阶段 |
| 日志记录 | 较新的功能 | 检查最低版本 |
| 指标 | 较新的功能 | 可能处于测试/实验阶段 |
| 定时任务 | 仅限后端 | 前端 SDK 不可用 |
| 会话回放 | 仅限前端 | 后端 SDK 不可用 |
| AI 监控 | 部分 SDK | 通常仅限 JS + Python |
参考现有的 SDK 技能以了解目标质量水平:
ls skills/sentry-*-sdk/ 2>/dev/null
# 阅读 1-2 个现有的 SDK 技能以参考模式
这是最关键的阶段。 技能质量完全取决于准确、最新的 API 知识。切勿凭记忆编写技能——请针对官方文档研究每个功能。
分拆并行研究任务(使用带有 outputFile 的 claude 工具)——每个功能领域一个。每个任务应:
阅读 ${SKILL_ROOT}/references/research-playbook.md 以获取详细的研究执行计划,包括提示模板和文件命名约定。
在深入研究功能之前,检查 Sentry 向导 CLI 是否支持此框架:
# 检查该 SDK 的文档首页是否有向导说明
# 访问:https://docs.sentry.io/platforms/<platform>/
# 查找:"npx @sentry/wizard@latest -i <integration>"
如果存在向导集成:
-i 标志为什么这很重要: 向导自动处理整个身份验证流程(登录、组织/项目选择、身份验证令牌)和源映射上传配置。没有源映射,生产环境堆栈跟踪显示的是压缩后的代码——使得 Sentry 对前端调试几乎无用。而没有身份验证令牌,源映射根本无法上传。向导是在单个步骤中正确完成这两项工作的最可靠方法。
按主题领域批处理研究任务。尽可能并行运行它们:
| 批次 | 主题 | 输出文件 |
|---|---|---|
| 1 | 设置、配置、所有初始化选项、框架检测 | research/<sdk>-setup-config.md |
| 2 | 错误监控、恐慌/异常捕获、作用域、数据丰富 | research/<sdk>-error-monitoring.md |
| 3 | 追踪、性能分析(如果支持) | research/<sdk>-tracing-profiling.md |
| 4 | 日志记录、指标、定时任务(如果支持) | research/<sdk>-logging-metrics-crons.md |
| 5 | 会话回放(仅限前端)、AI 监控(如果支持) | research/<sdk>-replay-ai.md |
重要提示: 告诉每个研究任务将其输出写入文件(outputFile 参数)。请勿内联使用研究结果——它们很大(每个 500–1200 行)。后续工作进程将从磁盘读取它们。
在继续之前,验证每个研究文件:
具有实际内容(不仅仅是 Claude 的过程记录)
包含带有真实 API 名称的代码示例
包含最低 SDK 版本
涵盖特定于框架的变体
for f in research/<sdk>-*.md; do echo "=== $(basename $f) ===" wc -l "$f" grep -c "^#" "$f" # 应该有多个标题 done
重新运行任何生成少于 100 行的研究任务——它很可能静默失败了。
主 SKILL.md 文件实现了哲学文档中的四阶段向导。保持其重点——主文件应涵盖向导流程、快速启动配置、框架表格和参考调度。单个功能的深度详细信息属于 references/ 文件,而不是这里。要彻底但不要冗余。
在编写之前,运行侦察或阅读现有技能以了解约定:
---
name: sentry-<platform>-sdk
description: <Platform> 的完整 Sentry SDK 设置。当被要求“为 <platform> 添加 Sentry”、“安装 <package>”或为 <Platform> 应用程序配置错误监控、追踪、[功能] 时使用。支持 [框架]。
license: Apache-2.0
---
# Sentry <Platform> SDK
## 在以下情况下调用此技能
[触发短语]
## 阶段 1:检测
[扫描项目的 bash 命令——包管理器、框架、现有 Sentry、前端/后端]
## 阶段 2:推荐
[带有“始终 / 检测到时 / 可选”逻辑的权威功能矩阵]
## 阶段 3:指导
### 选项 1:向导(推荐) ← 如果此框架存在向导
[引用块,告诉用户自己运行向导——它需要交互式浏览器登录。在引用块内的可复制粘贴代码块中包含命令。告诉他们完成后返回。在引用块后添加一行:“如果用户跳过向导,请继续下面的选项 2(手动设置)。”]
### 选项 2:手动设置 ← 始终包含
### 安装
### 快速启动——推荐的初始化
### 源映射设置 ← 前端/移动端 SDK 必需
### 框架中间件(如果适用)
### 对于每个已同意的功能
[参考调度表:功能 → ${SKILL_ROOT}/references/<feature>.md]
## 配置参考
[关键初始化选项表,环境变量]
## 验证
[测试代码片段]
## 阶段 4:交叉链接
[检测配套的前端/后端,建议匹配的 SDK 技能]
## 故障排除
[常见问题表]
${SKILL_ROOT}/references/philosophy.md 了解完整模式。SDK 支持的每个功能支柱一个参考文件。这些是深度研究——它们可以比主 SKILL.md 文件更长。
# <功能> — Sentry <Platform> SDK
> 最低 SDK:`<package>` vX.Y.Z+
## 配置
## 代码示例
### 基本用法
### 高级模式
### 特定于框架的说明(如果适用)
## 最佳实践
## 故障排除
| 问题 | 解决方案 |
|-------|----------|
阅读 ${SKILL_ROOT}/references/quality-checklist.md 以获取完整的质量标准。
要点:
| 功能 | 需要涵盖的关键事项 |
|---|---|
| 错误监控 | 捕获 API、恐慌/异常恢复、作用域、数据丰富(标签/用户/面包屑)、错误链、BeforeSend、指纹 |
| 追踪 | 采样率、自定义跨度、分布式追踪、框架中间件、操作类型 |
| 性能分析 | 采样率配置、如何附加到追踪,或诚实地说明“已移除/不可用” |
| 日志记录 | 启用标志、记录器 API、与流行日志记录库的集成、过滤 |
| 指标 | 计数器/仪表/分布 API、单位、属性、基数的最佳实践 |
| 定时任务 | 签到 API、监控器配置、计划类型、心跳模式 |
| 会话回放 | 回放集成、采样率、隐私屏蔽、画布/网络记录 |
对于前端/移动端 SDK 的注意事项: 源映射上传配置属于主 SKILL.md(阶段 3:指导),而不是参考文件。它是核心设置流程的一部分——每个前端生产环境部署都需要它。涵盖构建工具插件、所需的环境变量(
SENTRY_AUTH_TOKEN、SENTRY_ORG、SENTRY_PROJECT),并将.env添加到.gitignore。
切勿跳过此阶段。 SDK API 经常变化。研究可能会产生幻觉。工作进程可能会捏造配置键。
针对 SDK 的实际源代码运行专门的验证过程:
Research prompt: "Verify these specific API names and signatures against
the <SDK> GitHub repo source code: [list every API from the skill files]"
常见的问题:
SendDefaultPii 与 SendDefaultPII)experimental.tracing——验证其真实性)configureScope → getIsolationScope)对完整的技能包运行审查:
按优先级分类处理:
技能通过审查后:
每个主要部分都有自己的提交:
feat(<platform>-sdk): add sentry-<platform>-sdk main SKILL.md wizardfeat(<platform>-sdk): add reference deep-dives for all feature pillarsdocs(readme): add sentry-<platform>-sdk to available skillsfix(skills): address review findings(如果有)在宣布技能完成之前:
每周安装次数
200
仓库
GitHub 星标数
82
首次出现
2026年3月1日
安全审计
安装于
gemini-cli198
github-copilot198
cursor198
codex198
kimi-cli197
amp197
All Skills > SDK Skill Creator
Produce a complete, research-backed SDK skill bundle — a main wizard SKILL.md plus deep-dive reference files for every feature pillar the SDK supports.
sentry-<platform>-sdk skill bundleRead
${SKILL_ROOT}/references/philosophy.mdfirst — it defines the bundle architecture, wizard flow, and design principles this skill implements.
Determine what you're building a skill for:
# What SDK? What's the package name?
# Examples: sentry-go, @sentry/sveltekit, sentry-python, sentry-ruby, sentry-cocoa
Establish the feature matrix — which Sentry pillars does this SDK support?
| Pillar | Check docs | Notes |
|---|---|---|
| Error Monitoring | Always available | Non-negotiable baseline |
| Tracing/Performance | Usually available | Check for span API |
| Profiling | Varies | May be removed or experimental |
| Logging | Newer feature | Check minimum version |
| Metrics | Newer feature | May be beta/experimental |
| Crons | Backend only | Not available for frontend SDKs |
| Session Replay | Frontend only | Not available for backend SDKs |
| AI Monitoring | Some SDKs | Usually JS + Python only |
Reference existing SDK skills to understand the target quality level:
ls skills/sentry-*-sdk/ 2>/dev/null
# Read 1-2 existing SDK skills for pattern reference
This is the most critical phase. Skill quality depends entirely on accurate, current API knowledge. Do NOT write skills from memory — research every feature against official docs.
Spin off parallel research tasks (using the claude tool with outputFile) — one per feature area. Each task should:
Read ${SKILL_ROOT}/references/research-playbook.md for the detailed research execution plan, including prompt templates and file naming conventions.
Before diving into feature research, check whether the Sentry wizard CLI supports this framework:
# Check the SDK's docs landing page for wizard instructions
# Visit: https://docs.sentry.io/platforms/<platform>/
# Look for: "npx @sentry/wizard@latest -i <integration>"
If a wizard integration exists:
-i flagWhy this matters: The wizard handles the entire auth flow (login, org/project selection, auth token) and source map upload configuration automatically. Without source maps, production stack traces show minified code — making Sentry nearly useless for frontend debugging. And without the auth token, source maps can't be uploaded at all. The wizard is the most reliable way to get both right in a single step.
Batch research tasks by topic area. Run them in parallel where possible:
| Batch | Topics | Output file |
|---|---|---|
| 1 | Setup, configuration, all init options, framework detection | research/<sdk>-setup-config.md |
| 2 | Error monitoring, panic/exception capture, scopes, enrichment | research/<sdk>-error-monitoring.md |
| 3 | Tracing, profiling (if supported) | research/<sdk>-tracing-profiling.md |
| 4 | Logging, metrics, crons (if supported) | research/<sdk>-logging-metrics-crons.md |
| 5 | Session replay (frontend only), AI monitoring (if supported) |
Important: Tell each research task to write its output to a file (outputFile parameter). Do NOT consume research results inline — they're large (500–1200 lines each). Workers will read them from disk later.
Before proceeding, verify each research file:
Has actual content (not just Claude's process notes)
Contains code examples with real API names
Includes minimum SDK versions
Covers framework-specific variations
for f in research/<sdk>-*.md; do echo "=== $(basename $f) ===" wc -l "$f" grep -c "^#" "$f" # should have multiple headings done
Re-run any research task that produced fewer than 100 lines — it likely failed silently.
The main SKILL.md implements the four-phase wizard from the philosophy doc. Keep it focused — the main file should cover the wizard flow, quick start config, framework tables, and reference dispatch. Deep-dive details for individual features belong in references/ files, not here. Be thorough but not redundant.
Before writing, run a scout or read existing skills to understand conventions:
---
name: sentry-<platform>-sdk
description: Full Sentry SDK setup for <Platform>. Use when asked to "add Sentry
to <platform>", "install <package>", or configure error monitoring, tracing,
[features] for <Platform> applications. Supports [frameworks].
license: Apache-2.0
---
# Sentry <Platform> SDK
## Invoke This Skill When
[trigger phrases]
## Phase 1: Detect
[bash commands to scan project — package manager, framework, existing Sentry, frontend/backend]
## Phase 2: Recommend
[opinionated feature matrix with "always / when detected / optional" logic]
## Phase 3: Guide
### Option 1: Wizard (Recommended) ← if wizard exists for this framework
[blockquote telling the user to run the wizard themselves — it requires interactive browser login. Include the command in a copy-pasteable code block inside the blockquote. Tell them to come back when done. Add a line after the blockquote: "If the user skips the wizard, proceed with Option 2 (Manual Setup) below."]
### Option 2: Manual Setup ← always include
### Install
### Quick Start — Recommended Init
### Source Maps Setup ← required for frontend/mobile SDKs
### Framework Middleware (if applicable)
### For Each Agreed Feature
[reference dispatch table: feature → ${SKILL_ROOT}/references/<feature>.md]
## Configuration Reference
[key init options table, environment variables]
## Verification
[test snippet]
## Phase 4: Cross-Link
[detect companion frontend/backend, suggest matching SDK skills]
## Troubleshooting
[common issues table]
${SKILL_ROOT}/references/philosophy.md for the full pattern.One reference file per feature pillar the SDK supports. These are deep dives — they can be longer than the main SKILL.md.
# <Feature> — Sentry <Platform> SDK
> Minimum SDK: `<package>` vX.Y.Z+
## Configuration
## Code Examples
### Basic usage
### Advanced patterns
### Framework-specific notes (if applicable)
## Best Practices
## Troubleshooting
| Issue | Solution |
|-------|----------|
Read ${SKILL_ROOT}/references/quality-checklist.md for the full quality rubric.
Key points:
| Feature | Key things to cover |
|---|---|
| Error Monitoring | Capture APIs, panic/exception recovery, scopes, enrichment (tags/user/breadcrumbs), error chains, BeforeSend, fingerprinting |
| Tracing | Sample rates, custom spans, distributed tracing, framework middleware, operation types |
| Profiling | Sample rate config, how it attaches to traces, or honest "removed/not available" |
| Logging | Enable flag, logger API, integration with popular logging libraries, filtering |
| Metrics | Counter/gauge/distribution APIs, units, attributes, best practices for cardinality |
| Crons | Check-in API, monitor config, schedule types, heartbeat patterns |
| Session Replay | Replay integration, sample rates, privacy masking, canvas/network recording |
Note for frontend/mobile SDKs: Source map upload configuration belongs in the main SKILL.md (Phase 3: Guide), not in a reference file. It's part of the core setup flow — every frontend production deployment needs it. Cover the build tool plugin, the required env vars (
SENTRY_AUTH_TOKEN,SENTRY_ORG,SENTRY_PROJECT), and add.envto.gitignore.
Do NOT skip this phase. SDK APIs change frequently. Research can hallucinate. Workers can fabricate config keys.
Run a dedicated verification pass against the SDK's actual source code:
Research prompt: "Verify these specific API names and signatures against
the <SDK> GitHub repo source code: [list every API from the skill files]"
Things that commonly go wrong:
SendDefaultPii vs SendDefaultPII)experimental.tracing — verify it's real)configureScope → getIsolationScope)Run a reviewer on the complete skill bundle:
Triage by priority:
After the skill passes review:
Each major piece gets its own commit:
feat(<platform>-sdk): add sentry-<platform>-sdk main SKILL.md wizardfeat(<platform>-sdk): add reference deep-dives for all feature pillarsdocs(readme): add sentry-<platform>-sdk to available skillsfix(skills): address review findings (if any)Before declaring the skill complete:
Weekly Installs
200
Repository
GitHub Stars
82
First Seen
Mar 1, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli198
github-copilot198
cursor198
codex198
kimi-cli197
amp197
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
113,700 周安装
Optimoroute自动化集成:通过Rube MCP实现物流路线优化与自动化操作
1 周安装
Neutrino自动化工具包:通过Rube MCP实现Neutrino操作自动化
1 周安装
Nano Nets自动化指南:通过Rube MCP和Composio实现AI工作流自动化
1 周安装
More Trees自动化工具包 - 通过Rube MCP实现Composio生态自动化操作
1 周安装
执行加速器:克服分析瘫痪,快速决策与发布的速度框架 | 创业生产力工具
139 周安装
Mopinion自动化集成:通过Rube MCP和Composio实现反馈管理自动化
1 周安装
research/<sdk>-replay-ai.md |