Analyzes your changes and creates a pull request with AI-generated title and description focusing on WHY changes were made
Creates pull requests with AI-generated descriptions focused on why changes were made.
/plugin marketplace add keboola/ai-kit/plugin install developer@keboola-claude-kitbase-branchAnalyze current branch changes, understand the motivation and context, and create a pull request with a description that explains WHY the changes were made, not just what was changed.
Checks for PR Template
.github/pull_request_template.mdAnalyzes Your Changes
Generates PR Content
Creates the PR
gh)# Create PR against default branch (usually main/master)
/create-pr
# Create PR against specific branch
/create-pr develop
# Create draft PR
/create-pr main draft
gh) must be installed and authenticatedCheck if .github/pull_request_template.md exists:
# Primary PR template location
test -f .github/pull_request_template.md && cat .github/pull_request_template.md
If found, read the template and use its structure. The template may have:
Use the template's structure exactly - fill in the sections it defines rather than using a generic format.
Run these commands in parallel:
# Get current branch
git branch --show-current
# Check if branch is pushed to remote
git status -sb
# Get default branch
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
# Check if gh is installed and authenticated
gh auth status
$1 (first argument), use that as base branchmain or master)# Get commit messages for context
git log $BASE_BRANCH..HEAD --format="%s%n%b"
# Get the diff (but don't list it in PR description)
git diff $BASE_BRANCH...HEAD
Focus on understanding:
DO NOT include:
Title Format:
Good Examples:
feat: add OAuth2 authentication to improve securityfix: resolve race condition causing payment failuresrefactor: simplify error handling for better maintainabilityBad Examples:
fix: update users.ts (too vague, mentions file)feat: changes to API (unclear what this does)If PR Template Exists: Follow the template structure and fill in each section appropriately.
If No Template, Use This Structure:
## Why
[Explain the motivation. What problem does this solve? What requirement does it address? Why is this change needed now?]
## Context
[Provide background. Is there a related issue? Was there a user report? What was the previous behavior or limitation?]
## Approach
[High-level explanation of the solution. What strategy did you take? Why this approach over alternatives? Any important architectural decisions?]
## Impact
[What does this enable? How does it improve things? Are there breaking changes? Performance implications? Security considerations?]
## Testing
[How was this tested? What should reviewers verify? Are there edge cases to consider?]
## Notes
[Any additional context, caveats, deployment requirements, or follow-up work needed?]
---
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Key Principles:
# Check if branch is tracked
git rev-parse --abbrev-ref --symbolic-full-name @{u}
# If not tracked, push with -u flag
git push -u origin $(git branch --show-current)
# If already tracked but behind, push
git push
# Create PR with generated title and description
gh pr create \
--base $BASE_BRANCH \
--title "$PR_TITLE" \
--body "$(cat <<'EOF'
$PR_DESCRIPTION
EOF
)"
# Or create draft PR if "draft" in arguments
gh pr create \
--base $BASE_BRANCH \
--title "$PR_TITLE" \
--body "$PR_DESCRIPTION" \
--draft
Display the PR URL and a success message:
ā
Pull Request Created!
Title: [PR Title]
Base: [base-branch] ā [current-branch]
URL: [PR URL]
Next Steps:
- Review the PR description and edit if needed
- Request reviewers: gh pr edit --add-reviewer @username
- Add labels: gh pr edit --add-label "enhancement"
ā No changes to create PR for.
Your branch is up to date with '$BASE_BRANCH'.
ā Not on a branch.
Create a branch first: git checkout -b feature/my-branch
ā GitHub CLI (gh) not found.
Install it: https://cli.github.com/
ā No GitHub remote found.
Add remote: git remote add origin <url>
If commit messages or branch names mention issues, include them:
User can specify "draft" in arguments:
/create-pr main draft
If user provides additional context as $2 or beyond, incorporate it into the "Context" or "Notes" section.
## Why
Users were experiencing authentication failures when using OAuth providers due to token expiration handling. This was causing ~5% of logins to fail, requiring users to re-authenticate multiple times.
## Context
We received multiple support tickets reporting intermittent login failures. Investigation revealed that our OAuth token refresh logic wasn't properly handling edge cases where tokens expired during the refresh process itself.
## Approach
Implemented a retry mechanism with exponential backoff for token refresh operations. Added a token validation step before critical operations to proactively refresh tokens that are about to expire. This prevents the race condition that was causing failures.
## Impact
- Eliminates the authentication failure case that was affecting users
- Improves UX by making authentication more reliable
- Reduces support ticket volume related to login issues
- No breaking changes - fully backward compatible
## Testing
- Tested with Google, GitHub, and Microsoft OAuth providers
- Simulated token expiration scenarios in integration tests
- Verified existing sessions continue to work
- Load tested with 1000 concurrent authentications
## Notes
Monitoring should be added to track token refresh success rates in production. This will help us identify if similar issues occur with other OAuth providers.
---
š¤ Generated with [Claude Code](https://claude.com/claude-code)
## Changes
- Updated auth.ts
- Modified token-service.ts
- Added new test file
- Changed 15 files with 234 additions and 67 deletions
## Files Modified
- src/auth/auth.ts
- src/auth/token-service.ts
- src/tests/auth.test.ts
[...list of all files...]
## Code Changes
- Added function `refreshTokenWithRetry()`
- Modified `authenticate()` method
- Updated imports
ā This is bad because:
gh pr create for consistency/create-prCreate a new branch, commit changes, and submit a pull request with automatic commit splitting