create-pr
关于
This Claude Skill automates creating GitHub pull requests following Sentry's engineering conventions, including proper PR descriptions and change analysis. It guides developers through verifying branch state, reviewing changes, and structuring PR content according to Sentry's code review guidelines. The skill requires GitHub CLI authentication and helps maintain consistent PR practices when preparing changes for review.
快速安装
Claude Code
推荐/plugin add https://github.com/davila7/claude-code-templatesgit clone https://github.com/davila7/claude-code-templates.git ~/.claude/skills/create-pr在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Create Pull Request
Create pull requests following Sentry's engineering practices.
Requires: GitHub CLI (gh) authenticated and available.
Process
Step 1: Verify Branch State
# Check current branch and status
git status
git log main..HEAD --oneline
Ensure:
- All changes are committed
- Branch is up to date with remote
- Changes are rebased on main if needed
Step 2: Analyze Changes
Review what will be included in the PR:
# See all commits that will be in the PR
git log main..HEAD
# See the full diff
git diff main...HEAD
Understand the scope and purpose of all changes before writing the description.
Step 3: Write the PR Description
Follow this structure:
<brief description of what the PR does>
<why these changes are being made - the motivation>
<alternative approaches considered, if any>
<any additional context reviewers need>
Do NOT include:
- "Test plan" sections
- Checkbox lists of testing steps
- Redundant summaries of the diff
Do include:
- Clear explanation of what and why
- Links to relevant issues or tickets
- Context that isn't obvious from the code
- Notes on specific areas that need careful review
Step 4: Create the PR
gh pr create --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"
Title format follows commit conventions:
feat(scope): Add new featurefix(scope): Fix the bugref: Refactor something
Step 5: Add Reviewers (if known)
# Request review from specific people
gh pr edit --add-reviewer username1,username2
# Or request from a team
gh pr edit --add-reviewer @getsentry/team-name
Limit to 1-3 reviewers to maintain clear ownership.
PR Description Examples
Feature PR
Add Slack thread replies for alert notifications
When an alert is updated or resolved, we now post a reply to the original
Slack thread instead of creating a new message. This keeps related
notifications grouped and reduces channel noise.
Previously considered posting edits to the original message, but threading
better preserves the timeline of events and works when the original message
is older than Slack's edit window.
Refs SENTRY-1234
Bug Fix PR
Handle null response in user API endpoint
The user endpoint could return null for soft-deleted accounts, causing
dashboard crashes when accessing user properties. This adds a null check
and returns a proper 404 response.
Found while investigating SENTRY-5678.
Fixes SENTRY-5678
Refactor PR
Extract validation logic to shared module
Moves duplicate validation code from the alerts, issues, and projects
endpoints into a shared validator class. No behavior change.
This prepares for adding new validation rules in SENTRY-9999 without
duplicating logic across endpoints.
Issue References
Reference issues in the PR body:
| Syntax | Effect |
|---|---|
Fixes #1234 | Closes GitHub issue on merge |
Fixes SENTRY-1234 | Closes Sentry issue |
Refs GH-1234 | Links without closing |
Refs LINEAR-ABC-123 | Links Linear issue |
Guidelines
- One PR per feature/fix - Don't bundle unrelated changes
- Keep PRs reviewable - Smaller PRs get faster, better reviews
- Explain the why - Code shows what; description explains why
- Mark WIP early - Use draft PRs for early feedback
References
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
creating-opencode-plugins
元该Skill为开发者创建OpenCode插件提供指导,涵盖命令、文件、LSP等25+种事件类型。它详细说明了插件结构、事件API规范及JavaScript/TypeScript实现模式,帮助开发者构建事件驱动的模块。适用于需要拦截操作、扩展功能或自定义AI助手行为的插件开发场景。
langchain
元LangChain是一个用于构建LLM应用程序的框架,支持智能体、链和RAG应用开发。它提供多模型提供商支持、500+工具集成、记忆管理和向量检索等核心功能。开发者可用它快速构建聊天机器人、问答系统和自主代理,适用于从原型验证到生产部署的全流程。
Algorithmic Art Generation
元这个Claude Skill帮助开发者使用p5.js创建算法艺术,特别适用于生成式艺术和交互式可视化项目。它支持种子随机性、流场和粒子系统等关键技术,确保艺术作品的重复性和独特性。当讨论生成艺术、算法艺术或计算美学时,该技能会自动激活,指导开发者完成从概念设计到技术实现的全过程。
