Creates a Pull Request from current changes for OneKey app-monorepo. Use when user wants to create PR, submit changes, or merge feature branch. Handles branch creation, commit, push, and PR creation with conversation context extraction for code review AI.
72
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Automates the complete PR creation workflow for OneKey app-monorepo changes.
| Step | Action | Commands |
|---|---|---|
| 1 | Check status | git status, git branch --show-current |
| 2 | Determine base branch | Auto-detect or ask user |
| 3 | Create branch (if on x or release/*) | git checkout -b <branch-name> |
| 4 | Agent check | yarn agent:check --profile commit |
| 5 | Stage & commit | git add ., git commit -m "type: description" |
| 6 | Push to remote | git push -u origin <branch-name> |
| 7 | Extract context | Analyze conversation for intent, decisions, risks |
| 8 | Create PR | gh pr create --base <base> --title "..." --body "..." |
| 9 | Update branch | gh pr update-branch <number> |
| 10 | Enable auto-merge | gh pr merge <number> --auto --squash |
| 11 | Return PR URL | Share the PR URL with the user |
git status
git branch --show-currentThe PR base branch depends on where the current branch was created from.
Auto-detection logic:
VERSION=$(grep -E '^VERSION=' .env.version | cut -d '=' -f 2)
RELEASE_BRANCH="release/v${VERSION}"
# Compare distance to both candidate base branches
# (--is-ancestor would give false positives when release branch just forked from x)
release_distance=$(git rev-list --count "origin/$RELEASE_BRANCH"..HEAD 2>/dev/null || echo 999999)
x_distance=$(git rev-list --count origin/x..HEAD 2>/dev/null || echo 999999)
if [ "$release_distance" -lt "$x_distance" ]; then
BASE="$RELEASE_BRANCH"
else
BASE="x"
fiIf on x or release/* directly (not a feature branch), auto-detection is ambiguous. In this case, ask the user before creating the feature branch:
"You're on
$current_branchdirectly. Where should the PR target?"
x— normal development (non-bundle)$RELEASE_BRANCH— bundle releaseThis determines which branch to base your feature branch on.
If on x or release/* branch (not a feature branch):
feat/ - new featuresfix/ - bug fixesrefactor/ - refactoringchore/ - maintenance tasksgit checkout -b <branch-name>
x, branch from current xrelease/*, fetch latest and branch from origin/$RELEASE_BRANCHIf already on feature branch: Skip branch creation, use auto-detected base
yarn agent:check --profile commitFix any reported lint or type errors before committing. Use lower-level
lint/typecheck commands only when debugging the log path reported by
agent:check.
git add .
git commit -m "<type>: <description>"Commit format:
git push -u origin <branch-name>After a PR exists, use the unified PR readiness check:
yarn agent:check --profile prBefore creating the PR, analyze the full conversation history to extract:
OK-{number} issue IDs mentioned in conversationContext extraction guidelines:
gh pr create --base $BASE --title "<title>" --body "<description>"Use the $BASE determined in step 2 (either x or release/v{X.Y.Z}).
Issue ID handling:
OK-{number} from commit summary/description and conversation historyfix: description(OK-49185)PR Body Template:
The PR body MUST use this template. Omit sections that don't apply (don't write "N/A").
## Summary
<1-3 bullet points describing WHAT changed>
## Intent & Context
<WHY these changes were made. What problem was being solved? What was the user's original request or the bug report that triggered this work?>
## Root Cause
<For bug fixes: What was the root cause? How was it diagnosed?>
## Design Decisions
<Key decisions made during implementation and WHY. Alternatives considered and reasons for the chosen approach.>
## Changes Detail
<Brief description of each significant file change and its purpose>
## Risk Assessment
- **Risk Level**: Low / Medium / High
- **Affected Platforms**: Extension / Mobile / Desktop / Web
- **Risk Areas**: <Which parts of the change are riskiest?>
## Test plan
- [ ] <Testing steps to verify the changes>Sync the PR branch with the latest base branch to ensure CI runs on the merged state:
gh pr update-branch <PR_NUMBER>This is equivalent to clicking "Update branch" button on GitHub PR page.
gh pr merge <PR_NUMBER> --auto --squashDisplay PR URL to user and open in browser:
open <PR_URL>release/* for bundle release branches, x for everything else. When on x or release/* directly, ask the user which target to use before creating the feature branch.type: descriptiond71e6b7
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.