一键导入
bitbucket-pr
Create or update a Bitbucket Cloud pull request with auto-generated title and description from git diff.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create or update a Bitbucket Cloud pull request with auto-generated title and description from git diff.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | bitbucket-pr |
| description | Create or update a Bitbucket Cloud pull request with auto-generated title and description from git diff. |
Automatically creates or updates a Bitbucket Cloud pull request. It detects the repo context from git, analyzes the diff to generate a title and description, supports team PR conventions and repo PR templates, and fetches default reviewers.
$ARGUMENTS contains a Bitbucket PR URL (matching bitbucket.org/.*/pull-requests/\d+) → Update Mode$ARGUMENTS may optionally specify a target branch)/bitbucket-pr develop)/bitbucket-pr https://bitbucket.org/workspace/repo/pull-requests/123)$HOME/my-skills/.env):
ATLASSIAN_EMAIL — your Atlassian account emailBITBUCKET_API_TOKEN — Bitbucket App Password (scopes: Account: Read, Pull requests: Read, Pull requests: Write)BITBUCKET_PR_SPEC_PATH (optional) — path or URL to a PR conventions document$HOME/my-skills/scripts/detect_bitbucket_repo.sh$HOME/my-skills/scripts/create_bitbucket_pr.sh$HOME/my-skills/scripts/update_bitbucket_pr.shDetect repo context — Run $HOME/my-skills/scripts/detect_bitbucket_repo.sh and capture the JSON output.
branch equals defaultBranch (or branch is empty), STOP and warn the user: "You are on the default branch. Please switch to a feature branch first."Determine target branch — If $ARGUMENTS specifies a branch name (not a URL), use it as the target. Otherwise, ask the user which branch to target, suggesting defaultBranch from step 1 as the default.
Check remote push status — Run git log origin/<current-branch>..HEAD --oneline 2>/dev/null to check for unpushed commits.
origin/<current-branch> does not exist, warn the user that the branch has not been pushed to remote yet. STOP and ask them to push first.Get diff — Run these commands to gather change information:
git log origin/<target>..HEAD --oneline for commit listgit diff origin/<target>...HEAD for the full diffLoad PR spec document (optional) — If BITBUCKET_PR_SPEC_PATH is set in the environment:
http:// or https://, fetch it using WebFetch.Detect PR template — Check for a PR template file in the repository, in this order:
.bitbucket/PULL_REQUEST_TEMPLATE.mdPULL_REQUEST_TEMPLATE.mddocs/PULL_REQUEST_TEMPLATE.md.github/PULL_REQUEST_TEMPLATE.mdGenerate title and description — Analyze the diff, commit messages, and branch name:
feature/PROJ-123-add-login → PROJ-123), combine with a concise summary of changes. Maximum 72 characters.## Summary
<1-3 sentences describing the overall change>
## Changes
- <one bullet per logical change>
## Testing
- <testing approach or steps>
## Notes
- <additional context, migration steps, reviewer notes>
STOP and wait for user confirmation — Present the following for review:
Create the PR — Pipe the confirmed title and description as JSON to $HOME/my-skills/scripts/create_bitbucket_pr.sh:
echo '{"title":"...","description":"..."}' | $HOME/my-skills/scripts/create_bitbucket_pr.sh <workspace> <repo> <source> <dest>
Output result — Parse the API response and display:
links.html.href)Fetch current PR info — Use curl to get the PR details:
curl -s -u "$ATLASSIAN_EMAIL:$BITBUCKET_API_TOKEN" "https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/pullrequests/{id}"
Parse the workspace, repo, and PR ID from the provided URL using the same sed patterns as other Bitbucket scripts. Extract current title, description, source branch, and target branch.
Get diff — Run git diff origin/<target>...origin/<source> for the full diff between the PR branches.
git log origin/<target>..origin/<source> --oneline for the commit list.Load PR spec and template — Same as Create Mode steps 5-6.
Generate new title and description — Same logic as Create Mode step 7, but also show a comparison:
STOP and wait for user confirmation — Present the current vs proposed comparison. The user may choose to keep the current values, use the proposed values, or provide their own edits. Do NOT proceed without explicit approval.
Update the PR — Pipe the confirmed title and description as JSON to $HOME/my-skills/scripts/update_bitbucket_pr.sh:
echo '{"title":"...","description":"..."}' | $HOME/my-skills/scripts/update_bitbucket_pr.sh <pr-url>
Output result — Display the updated PR URL and confirm the changes were applied.
$HOME/my-skills/.env for credentials — never ask the user for passwords or tokens inline.# Create a new PR (auto-detect target branch)
/bitbucket-pr
# Create a PR targeting a specific branch
/bitbucket-pr develop
# Update an existing PR
/bitbucket-pr https://bitbucket.org/my-workspace/my-repo/pull-requests/42
Query and manage WooCommerce orders on flowers.fenny-studio.com. (1) Look up orders by product ID or Chinese keyword — e.g. "哪些訂單買了鬱金香材料包"、"4182 被誰訂了"、"查一下 DIY 材料包的訂單". (2) Look up orders by shipping tracking number (運送編號) — e.g. "P93479717606 是哪張單"、"查物流單 R53049771167". (3) Filter orders by 希望送達時間 (desired delivery date) — e.g. "明天要出哪些貨"、"4/15 要送的訂單"、"本週出貨清單". (4) Reissue ECPay C2C tracking number for expired logistics — e.g. "4372 重打綠界"、"物流單過期了重新產生"、"reissue tracking". (5) Query ECPay logistics status — e.g. "誰到店了"、"查物流狀態"、"列到店待取的訂單"、"已寄出的訂單目前狀況"、"4345 現在物流狀態".
Trigger a Bitbucket Cloud pipeline on the current branch, with interactive pipeline selection and variable support. Polls for completion and reports results.
Generate a slide deck from a topic or context, then convert it into a Google Slides presentation after user confirmation.
Query an Asana task by ID or title keyword via the Asana API, retrieve its title and description, then analyze and process it.
Fetch Bitbucket PR review comments, analyze whether code changes are needed, and reply after user confirmation.
Generate a D2 diagram (sequence diagram or flowchart) by tracing an API endpoint or method's execution flow in the current repository. Use when the user wants to visualize code flow.