bitbucket-receiving-code-review/SKILL.md
Monitor an open Bitbucket pull request for reviewer feedback, respond to comments, apply fixes, resolve threads via API, and drive the PR to a ready state. Use after creating a Bitbucket PR or when the user asks to check review status, "check my PR", or respond to feedback on a Bitbucket-hosted PR.
npx skillsauth add juanjosegongi/skills bitbucket-receiving-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Author-side companion to bitbucket-code-review. If the repo defines its own bot ready-gate (e.g. betico via bot: ready / bot: not ready), this skill respects it.
creating-bitbucket-prs on an hourly cadence during working hours on weekdays.Identify the PR (from the current branch or a URL). Then fetch:
REMOTE_URL=$(git remote get-url origin)
REPO_PATH=$(echo "$REMOTE_URL" | sed -E 's#.*/([^/]+/[^/]+?)(\.git)?$#\1#')
# Pipeline status
PIPELINE_UUID=$(bkt pipeline list --json \
--jq '[.[] | select(.target.ref_name == "'"$(git branch --show-current)"'")][0].uuid')
bkt pipeline view "$PIPELINE_UUID" --json --jq '.state.name, .state.result.name'
# Unresolved review comments
bkt api "/repositories/${REPO_PATH}/pullrequests/${PR_ID}/comments" \
--method GET --paginate \
| jq '[.values[] | select(.deleted == false and .resolution == null)]'
Bucket results into: new feedback, pending author response, blocking (needs code change), informational.
Stale-resolution gotcha: the list endpoint sometimes shows child comments with resolution: null even when the thread root has resolution: comment_resolution. Treat resolution at the thread-root level, not per-comment.
For each unresolved thread:
Always respond on Bitbucket even when the conversation moved to chat or a call.
Every time a thread reaches a conclusion — a fix landed, the disagreement closed, the reviewer confirmed the answer — mark it resolved through the API. Same action as clicking the Resolve button, but programmatic so automation has an audit trail and nothing silently drifts to "resolved by click".
bkt api "/repositories/${REPO_PATH}/pullrequests/${PR_ID}/comments/<COMMENT_ID>/resolve" \
--method POST
Only inline comments are API-resolvable. Top-level comments (inline.path == null) cannot be resolved through the resolve endpoint — they live until the PR closes.
Never resolve from the UI. The API call is the source of truth.
If the repo uses a bot ready-gate (betico-style), post the top-level bot: ready comment ONLY when ALL of these are true:
bot: not ready, no exceptions.COMPLETED with SUCCESSFUL result.bkt api "/repositories/${REPO_PATH}/pullrequests/${PR_ID}/comments" \
--method POST \
--input '{"content": {"raw": "bot: ready"}}'
If something regresses (pipeline fails, new comment lands, bug found) while the PR is already in ready state, post:
bkt api "/repositories/${REPO_PATH}/pullrequests/${PR_ID}/comments" \
--method POST \
--input '{"content": {"raw": "bot: not ready"}}'
Race-condition guard: before posting bot: ready, re-read the source commit hash. If it changed since your checks, restart from Step 1 — a new push invalidates the green pipeline you just observed.
If the bot owns the PR title, never edit the title manually.
When launched by creating-bitbucket-prs, this skill runs every hour between 09:00 and 18:00 local time, Monday–Friday. Outside that window, it sleeps until the next work-hour slot. Stop the cadence once the PR is merged or closed.
Each run, summarize for the user:
development
Guides Dockerfile creation and optimization. Use when Dockerfile or Docker Compose is detected. Supports multi-stage builds, cache optimization, security hardening, and image size minimization.
development
Provides comprehensive testing and TDD guidance. Use for writing tests before implementing new features (TDD, test-driven development, red-green-refactor), creating reproduction tests for bug fixes, running regression tests during refactoring, and checking test coverage during code reviews. Enforces AAA pattern, test-first workflow, and 100% business logic coverage goal. Also covers testing anti-patterns, mock discipline, and testable design.
data-ai
A completely different skill for database operations. Use when working with PostgreSQL queries, schema design, or database migrations.
testing
Another sample skill for testing. Use when the user wants to create widgets with advanced features or mentions beta testing.