ワンクリックで
bitbucket
REQUIRED helper functions (never raw curl), workspace/repo_slug patterns, suggestion block syntax for code review
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
REQUIRED helper functions (never raw curl), workspace/repo_slug patterns, suggestion block syntax for code review
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | bitbucket |
| description | REQUIRED helper functions (never raw curl), workspace/repo_slug patterns, suggestion block syntax for code review |
| connection_type | bitbucket |
| preload | false |
Execute Bitbucket helper functions with proper authentication via OAuth token.
You must source the helpers before use:
source ./_skills/connections/bitbucket/bitbucket/scripts/bitbucket_helpers.sh
DO NOT write raw curl/HTTP requests like:
# ❌ WRONG - Never do this
curl -s -H "Authorization: Bearer ${BITBUCKET_TOKEN}" "https://api.bitbucket.org/2.0/..."
ALWAYS use the provided helper functions:
# ✅ CORRECT - Use helper functions
bitbucket_test # Test connection
bitbucket_user # Get current user
bitbucket_pr myworkspace myrepo 123 # Get PR details
The helper functions handle authentication, error handling, retries, and output formatting automatically.
ALL commands require explicit workspace and repo_slug as parameters.
bitbucket_pr myworkspace myrepo 123 # Get PR details
bitbucket_pr_diff myworkspace myrepo 123 # Get PR diff
Inline comment with suggestion block:
bitbucket_create_pr_comment myworkspace myrepo 123 "file.py" 45 'Comment text
```suggestion
fixed code
```
'
Discussion comment (not line-specific):
bitbucket_create_pr_discussion myworkspace myrepo 123 'Overall review summary'
✅ CORRECT - Single quotes preserve backticks:
bitbucket_create_pr_comment myworkspace myrepo 123 "src/app.py" 45 '🔴 CRITICAL: Issue
```suggestion
if not input:
raise ValueError("Required")
```
'
❌ WRONG - Escaped backticks break rendering:
bitbucket_create_pr_comment myworkspace myrepo 123 "src/app.py" 45 "\`\`\`suggestion
code
\`\`\`"
Key rules:
```suggestionConnection and user info:
bitbucket_test # Test connection
bitbucket_user # Get current user info
bitbucket_workspaces # List accessible workspaces
Repository info:
bitbucket_repo myworkspace myrepo # Get repository details
bitbucket_repos myworkspace # List repositories in workspace
bitbucket_branches myworkspace myrepo # List branches
Pull request info:
bitbucket_pr myworkspace myrepo 123 # Get PR details
bitbucket_pr_diff myworkspace myrepo 123 # Get PR diff
bitbucket_pr_comments myworkspace myrepo 123 # Get PR comments
Pipeline info:
bitbucket_pipeline myworkspace myrepo PIPELINE_UUID # Get pipeline details
bitbucket_pipeline_steps myworkspace myrepo PIPELINE_UUID # Get pipeline steps
Required parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDExample:
bitbucket_pr myworkspace myrepo 123
Required parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDReturns: Unified diff text
Required parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDReturns: JSON array of comment objects
Required parameters:
workspace : Workspace slugOptional parameters:
Example:
bitbucket_repos myworkspace 50 # Get up to 50 repos
Required parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDfile_path : Path to file (e.g., 'src/app.py')line_number : Line number on NEW side of diffbody : Comment text (use single quotes for markdown)Example with suggestion:
bitbucket_create_pr_comment myworkspace myrepo 123 "src/auth.py" 45 'Add input validation
```suggestion
if not validate_input(data):
raise ValueError("Invalid input")
```
'
Required parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDbody : Comment textUse this for:
Example:
bitbucket_create_pr_discussion myworkspace myrepo 123 'Code Review Summary
Looks good overall:
- 3 files reviewed
- 2 inline comments posted
- Ready for merge'
Required parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDcomment_id : Comment ID to updatebody : New comment textRequired parameters:
workspace : Workspace slugrepo_slug : Repository slugpr_id : Pull request IDcomment_id : Comment ID to deletebitbucket_create_pr_commentbitbucket_pr workspace1 frontend-repo 45
bitbucket_pr workspace1 backend-repo 67
| Problem | Solution |
|---|---|
| "401 Unauthorized" | Token expired, refresh OAuth token |
| "404 Not Found" | Check workspace/repo_slug spelling |
| "Rate limit exceeded" | Helper auto-retries, wait a few seconds |
| "line not in diff" | Use bitbucket_create_pr_discussion instead |
| Empty response | Check if PR/resource exists |
⚠️ NEVER do these without explicit user instruction:
bitbucket_delete_comment - Only on explicit requestPresent results as a structured report:
Bitbucket Report
════════════════
Resources discovered: [count]
Resource Status Key Metric Issues
──────────────────────────────────────────────
[name] [ok/warn] [value] [findings]
Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical
Action Items: [list of prioritized findings]
Target ≤50 lines of output. Use tables for multi-resource comparisons.
--help output.| Shortcut | Counter | Why |
|---|---|---|
| "I'll skip discovery and check known resources" | Always run Phase 1 discovery first | Resource names change, new resources appear — assumed names cause errors |
| "The user only asked for a quick check" | Follow the full discovery → analysis flow | Quick checks miss critical issues; structured analysis catches silent failures |
| "Default configuration is probably fine" | Audit configuration explicitly | Defaults often leave logging, security, and optimization features disabled |
| "Metrics aren't needed for this" | Always check relevant metrics when available | API/CLI responses show current state; metrics reveal trends and intermittent issues |
| "I don't have access to that" | Try the command and report the actual error | Assumed permission failures prevent useful investigation; actual errors are informative |
Cloudflare GraphQL Analytics for zone traffic, firewall events, Workers metrics, and schema exploration. Use when querying Cloudflare analytics data or exploring the GraphQL API.
PostgreSQL database analysis, performance tuning, and health monitoring. You MUST read this entire skill document before executing any PostgreSQL operations — it contains mandatory workflows, safety constraints, and two-phase execution rules that prevent common errors like hallucinated column names and unsafe queries.
SonarQube code quality and security analysis. Use when working with code quality metrics, security hotspots, quality gates, or issue tracking in SonarQube Cloud or Server.
Use when working with Aws Billing — analyze, break down, and report AWS costs and bills. Covers cost breakdown by service, account, or usage type; monthly/daily billing trends; cost anomaly detection; RI/SP utilization; cost forecasting; credit/discount analysis; and multi-account cost comparison. Uses anti-hallucination rules, mandatory currency/credit detection workflow, and reusable Cost Explorer functions.
Use when working with Aws Idle Resources — detect unused and idle AWS resources that incur cost without providing value. Covers detached EBS volumes, idle load balancers, unused Elastic IPs, stopped EC2 instances, idle NAT Gateways, old snapshots, and unused ENIs. Includes estimated monthly waste per resource and anti-hallucination rules for safe detection.
Use when working with Aws Pricing — aWS pricing helper for cost queries. ALWAYS use get_aws_cost script for pricing questions. Use when: - User asks about AWS resource costs or pricing - User wants to compare pricing across regions - User needs spot, on-demand, or reserved pricing info Triggers: aws pricing, aws cost, how much does, ec2 price, rds cost, s3 pricing.