Skip to content

chore(ai): Add /create-java-pr Claude Code skill#5119

Open
adinauer wants to merge 2 commits intomainfrom
feat/create-java-pr-skill
Open

chore(ai): Add /create-java-pr Claude Code skill#5119
adinauer wants to merge 2 commits intomainfrom
feat/create-java-pr-skill

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Feb 26, 2026

📜 Description

Add a create-java-pr Claude Code skill that automates the PR creation workflow for sentry-java: branch creation, code formatting, API dump, committing, pushing, PR creation, and changelog updates.

💡 Motivation and Context

Standardizes the PR workflow so Claude Code follows the same steps every time, reducing manual effort and ensuring nothing is missed (formatting, API dump, changelog, etc.).

#skip-changelog

💚 How did you test it?

Invoked /create-java-pr in Claude Code and confirmed it follows all steps.

📝 Checklist

  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@adinauer adinauer marked this pull request as ready for review February 26, 2026 10:30
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable autofix in the Cursor dashboard.

git add CHANGELOG.md
git commit -m "changelog"
git push
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skill always adds changelog entry, ignores #skip-changelog

Medium Severity

Step 6 always instructs adding a changelog entry, but the repo uses #skip-changelog in PR descriptions for meta changes (CI, tooling, skills) that should not appear in the changelog. The skill never checks for or mentions this convention, so it will add changelog entries for PRs that should skip them, contradicting Sentry's craft changelog behavior.

Fix in Cursor Fix in Web

```

If the push fails due to diverged history, ask the user how to proceed rather than force-pushing.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing check for empty branch before push

Medium Severity

The skill never verifies that the branch has changes to include in the PR. If the user runs it with no uncommitted changes and no commits ahead of main, the workflow still pushes, creates an empty PR, and adds a changelog entry for it, producing a meaningless PR and changelog pollution.

Fix in Cursor Fix in Web

- <Short description of the change> ([#<PR_NUMBER>](https://github.com/getsentry/sentry-java/pull/<PR_NUMBER>))
```

Use the PR number returned by `sentry-skills:create-pr`. Match the style of existing entries — sentence case, ending with the PR link, no trailing period.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No validation of PR creation before changelog step

Medium Severity

Step 6 always runs after Step 5 and uses the PR number from sentry-skills:create-pr.

If create-pr fails or does not return a PR number, the skill still proceeds to Step 6 and adds a changelog entry with a missing or invalid PR number, producing a malformed changelog link.

Fix in Cursor Fix in Web

@adinauer adinauer changed the title ci: add create-java-pr Claude Code skill chore(ai): Add /create-java-pr Claude Code skill Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant