用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/polarsource/polar --skill fix-sentry命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | fix-sentry |
| description | Analyze and fix issues reported by Sentry in the Polar codebase. |
| user-invocable | true |
| allowed-tools | Bash(gh:*) Bash(git:*) logfire_polar* sentry_polar* github* |
You're responsible for analyzing and fixing issues reported by Sentry in the Polar codebase. This involves investigating the Sentry reports, identifying the root causes of the issues, and implementing fixes to resolve them.
If not provided in the invocation prompt, you should ask the user for the a Sentry issue ID or a link to the Sentry issue. This will allow you to access the details of the issue and begin your analysis.
The Sentry organization ID of Polar is 4505046560538624 and its slug is polar-sh.
Using the sentry_polar tools, access the details of the Sentry issue provided by the user. This includes the error message, stack trace, and any additional context or metadata associated with the issue.
Extract the correlation_id tag from the Sentry issue. If available, use it to search for related logs in Logfire using the logfire_polar tools. This can provide additional context and insights into the events leading up to the issue, helping you to further understand the root cause.
The clause will look like this: attributes->>'correlation_id' = '<correlation_id>'
If any logs has source_correlation_id, query those logs as well.
Look up for relevant code in the codebase using the information from the Sentry issue and the Logfire logs. This may involve searching for specific error messages, function names, or other relevant keywords in the codebase.
Synthetize the information gathered from the Sentry issue, Logfire logs, and source code search to formulate a hypothesis about the root cause of the issue.
Important: If your analysis indicates that the issue involves heavy architectural changes, or if you are unsure about the best way to implement a fix, do not proceed with implementing a fix on your own. Instead, open an issue on polarsource/polar with your findings and analysis.
Always start by creating a git worktree for the work you are about to do. This will allow you to keep your changes organized and separate from the main codebase until they are ready to be merged. Run the following script:
./dev/create-worktree <branch-name>
This will create a worktree and prepare the environment for you to work on the issue. Make sure to replace <branch-name> with a descriptive name for your branch, using only lowercase letters, digits, and underscores. The worktree is created in the ./worktrees directory, and you can navigate to it using cd ./worktrees/<branch-name>.
IMPORTANT: From now on, all your changes and commands should be executed within the context of the worktree you just created. This ensures that your changes are isolated and can be easily managed.
cd ./worktrees/<branch-name>
Based on your analysis, implement a fix to resolve the issue. This may involve modifying existing code, adding new code, or making configuration changes.
Check linting, type checking, and tests before committing your changes, as detailed in AGENTS.md.
Commit your changes to the branch you created in the worktree. Make sure to write a clear and descriptive commit message that explains the changes you made and the reason for those changes.
Open a pull request on polarsource/polar using github tools, detailing your analysis, adding relevant links to the Sentry issue and Logfire logs, and describing the changes you made to fix the issue.