bitbucket-cli
Skill8 starsChanged 7 months agoApache-2.0View on GitHub
Perform Bitbucket operations using the Bitbucket REST API via curl. Use for repositories, pull requests, pipelines, and issues. ALSO use this skill when asked to review a Bitbucket PR — when a Bitbucket PR URL or PR ID is provided, fetch and review the diff instead of the code-review skill.
In this repository54 other files it gives its agents.
- alibabacloud-cliSkill
- ansible-cliSkill
- appdynamics-cliSkill
- argocd-cliSkill
- aws-cliSkill
- aws-cloudwatch-cliSkill
- azure-cliSkill
- bash-lintingSkill
- betterstack-cliSkill
- chef-cliSkill
- code-reviewSkill
- commit-codeSkill
- create-dockerfileSkill
- create-terraform-helm-upgrade-planSkill
- datadog-cliSkill
- digitalocean-cliSkill
- dockerfile-lintingSkill
- dynatrace-cliSkill
- elasticsearch-cliSkill
- gcp-cliSkill
- github-cliSkill
- gitlab-cliSkill
- go-lintingSkill
- grafana-cliSkill
- grafana-loki-cliSkill
- graylog-cliSkill
- helm-cliSkill
- hetzner-cliSkill
- huaweicloud-cliSkill
- jaeger-cliSkill
- jenkins-cliSkill
- jira-and-confluence-cliSkill
- kibana-cliSkill
- kubernetes-cliSkill
- loggly-cliSkill
- maintenance-check-aws-eksSkill
- maintenance-create-ticket-on-jiraSkill
- ms-teams-cliSkill
- mysql-cliSkill
- newrelic-cliSkill
- oci-cliSkill
- packer-cliSkill
- papertrail-cliSkill
- postgresql-cliSkill
- prometheus-cliSkill
- python-lintingSkill
- rollbar-cliSkill
- salesforce-cliSkill
- sentry-cliSkill
- slack-cliSkill
- splunk-cliSkill
- terraform-cliSkill
- terraform-lintingSkill
- vault-cliSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 12
Update the workspace below before using this skill:
- Distinctive: line 19
If the target workspace is unclear, ask the user before running any command.
- Very specific: line 23
Create an App Password with Repositories: Read (and Write/Pull requests: Write if mutations are needed), then save …
- Very specific: line 31
All API calls use curl with basic auth read from the credential file:
- Distinctive: line 78
NEVER target any Bitbucket workspace other than the one configured above.
- Very specific: line 79
NEVER print, display, log, or store the contents of ~/.bitbucket/token or any credential value.
- Very specific: line 80
Always read the credential inline with $(cat ~/.bitbucket/token) — never hardcode it in a command.
- Very specific: line 81
All list endpoints are paginated (next field in the response) — follow the next URL until it is absent to fetch all pages.
- Distinctive: line 82
NEVER merge, decline, or delete a pull request/repository without explicit user instruction.
- Distinctive: line 83
If a repo slug or PR ID is unfamiliar, look it up with a read-only call first.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bitbucket CLI Skill
Bitbucket Cloud has no official first-party CLI equivalent to gh/glab — use the REST API via curl for all operations.
Configuration
Update the workspace below before using this skill:
| Setting | Value |
| Bitbucket Workspace | <your-workspace> |
| Credential File | ~/.bitbucket/token |
If the target workspace is unclear, ask the user before running any command.
Prerequisites (one-time setup by user)
Create an App Password with Repositories: Read (and Write/Pull requests: Write if mutations are needed), then save <username>:<app-password> to the credential file. Never print or display the credential value. Do not perform these steps yourself.
mkdir -p ~/.bitbucket && echo "<username>:<app-password>" > ~/.bitbucket/token && chmod 600 ~/.bitbucket/tokenCommand Format
All API calls use curl with basic auth read from the credential file:
curl -s -u "$(cat ~/.bitbucket/token)" \
"https://api.bitbucket.org/2.0/<endpoint>" | jq .PR Code Review
When asked to review a Bitbucket PR (URL or PR ID provided), extract the <workspace/repo> and <PR_ID> from the URL (ask the user if the repo is missing), then fetch the PR metadata (GET /2.0/repositories/<workspace>/<repo>/pullrequests/<PR_ID>) and its diff (GET /2.0/repositories/<workspace>/<repo>/pullrequests/<PR_ID>/diff). To fully understand the context and impact of all code changes, read the complete source branch codebase — the diff alone does not capture the surrounding logic, dependencies, or broader design that the changes interact with. Report the PR title, author, and branches, then review all changed files for: secrets/injection/XSS (security), inefficient algorithms/memory leaks (performance), code smells/dead code (quality), missing error handling, excessive or sensitive logging, and missing/outdated documentation. For each finding, include the file path, line number(s), the problematic snippet, and a suggested fix. If nothing is wrong, summarize what was reviewed and state it looks good.
Available API Endpoints
Read-only (safe, no confirmation needed)
| Endpoint | Method | Description |
/2.0/repositories/<workspace> | GET | List repositories in the workspace |
/2.0/repositories/<workspace>/<repo> | GET | Get repository details |
/2.0/repositories/<workspace>/<repo>/pullrequests | GET | List pull requests |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id> | GET | Get a pull request |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/diff | GET | Get PR diff |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/commits | GET | List PR commits |
/2.0/repositories/<workspace>/<repo>/pipelines/ | GET | List pipeline runs |
/2.0/repositories/<workspace>/<repo>/issues | GET | List issues |
Mutating operations (confirm with user before running)
| Endpoint | Method | Description |
/2.0/repositories/<workspace>/<repo>/pullrequests | POST | Create a pull request |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id> | PUT | Update a pull request |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/comments | POST | Comment on a pull request |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/merge | POST | Merge a pull request |
/2.0/repositories/<workspace>/<repo>/pipelines/ | POST | Trigger a pipeline run |
Never run — requires explicit human approval
| Endpoint | Method | Reason |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/decline | POST | Closes a PR without merging |
/2.0/repositories/<workspace>/<repo> | DELETE | Irreversibly deletes the repository |
/2.0/repositories/<workspace>/<repo>/pullrequests/<id> | DELETE | Irreversible PR deletion |
/2.0/repositories/<workspace>/<repo>/branch-restrictions/<id> | DELETE | Removes branch protection rules |
Rules
- NEVER target any Bitbucket workspace other than the one configured above. If a URL references a different workspace, stop and ask the user to confirm.
- NEVER print, display, log, or store the contents of
~/.bitbucket/tokenor any credential value. - Always read the credential inline with
$(cat ~/.bitbucket/token)— never hardcode it in a command. - All list endpoints are paginated (
nextfield in the response) — follow thenextURL until it is absent to fetch all pages. - NEVER merge, decline, or delete a pull request/repository without explicit user instruction.
- If a repo slug or PR ID is unfamiliar, look it up with a read-only call first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

