← 返回 Skills 市场
pejovicvuk

Bitbucket

作者 Vuk Pejović · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
176
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install atlassian-bitbucket
功能描述
Browse Bitbucket Cloud repos, review pull requests, read diffs, check branches. Use when user mentions PRs, code changes, diffs, branches, Bitbucket, or repo...
使用说明 (SKILL.md)

\r \r

Bitbucket Cloud (Read-Only)\r

\r Browse repos, review PRs, read diffs and source code via a bash CLI wrapper. Read-only access — the agent cannot create, merge, or modify anything. No jq required — uses python3 for JSON parsing.\r \r Script location: {baseDir}/bitbucket-cli.sh\r \r

Setup\r

\r Set these environment variables on your OpenClaw gateway:\r \r

  • ATLASSIAN_EMAIL — the Atlassian account email\r
  • BITBUCKET_API_TOKEN — a scoped API token with Repositories: Read and Pull requests: Read only. Create at id.atlassian.com/manage-profile/security/api-tokens, select Bitbucket as the app.\r
  • BITBUCKET_WORKSPACE — the workspace slug from your Bitbucket URLs (e.g. mycompany from bitbucket.org/mycompany/repo)\r \r Security note: Use a separate read-only scoped token for Bitbucket, not the same token as Jira/Confluence. This ensures the agent cannot write to repositories even if instructed to.\r \r Make the script executable: chmod +x {baseDir}/bitbucket-cli.sh\r \r

Commands\r

\r

List repositories\r

\r

{baseDir}/bitbucket-cli.sh repos\r
```\r
\r
Returns: `[{ slug, name, full_name, language, updated, is_private, url }]`\r
\r
### List pull requests\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh prs my-repo\r
{baseDir}/bitbucket-cli.sh prs my-repo MERGED\r
```\r
\r
State: `OPEN` (default), `MERGED`, `DECLINED`.\r
\r
Returns: `{ total, pullrequests: [{ id, title, author, source, destination, state, created, updated, url }] }`\r
\r
### Get PR details\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh pr my-repo 42\r
```\r
\r
Returns: `{ id, title, description, author, source, destination, state, reviewers, created, updated, comment_count, url }`\r
\r
### Get PR diffstat (file change summary)\r
\r
Use this first to understand scope before reading the full diff.\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh diffstat my-repo 42\r
```\r
\r
Returns: `{ files_changed, total_added, total_removed, files: [{ path, status, lines_added, lines_removed }] }`\r
\r
### Get full diff\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh diff my-repo 42\r
```\r
\r
Returns raw unified diff text. For large PRs (500+ lines), read diffstat first.\r
\r
### Get PR comments\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh comments my-repo 42\r
```\r
\r
Returns: `{ count, comments: [{ id, author, content, inline, created }] }`\r
\r
Inline comments include `{ path, from, to }` showing which file and line.\r
\r
### List commits in a PR\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh pr-commits my-repo 42\r
```\r
\r
Returns: `[{ hash, message, author, date }]`\r
\r
### List branches\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh branches my-repo\r
{baseDir}/bitbucket-cli.sh branches my-repo "feature"\r
```\r
\r
Returns: `[{ name, hash, date, author }]`\r
\r
### Recent commits on a branch\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh commits my-repo main\r
```\r
\r
Returns: `[{ hash, message, author, date }]` (last 10)\r
\r
### Read file contents\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh file my-repo README.md\r
{baseDir}/bitbucket-cli.sh file my-repo src/main.py develop\r
```\r
\r
Returns raw file content. Default branch is `main` — always specify the branch explicitly if the user mentions a specific branch.\r
\r
### List directory contents\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh ls my-repo\r
{baseDir}/bitbucket-cli.sh ls my-repo src/\r
{baseDir}/bitbucket-cli.sh ls my-repo src/ develop\r
{baseDir}/bitbucket-cli.sh ls my-repo "" develop\r
```\r
\r
Returns: `[{ path, type, size }]`\r
\r
Default branch is `main`. To list root on a different branch, pass empty string as path.\r
\r
### Recursive directory listing\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh tree my-repo\r
{baseDir}/bitbucket-cli.sh tree my-repo src/\r
{baseDir}/bitbucket-cli.sh tree my-repo "" develop\r
```\r
\r
Returns one line per entry: `d` for directories, `f` for files. Sorted alphabetically. Use this to understand repo structure in a single call instead of calling `ls` on every subdirectory.\r
\r
### Search code\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh search "class UserService"\r
{baseDir}/bitbucket-cli.sh search "def process" my-repo\r
```\r
\r
Returns: `[{ file, repo, matched_lines }]`\r
\r
Searches across all repos in the workspace, or scoped to a specific repo.\r
\r
### Compare branches\r
\r
```bash\r
{baseDir}/bitbucket-cli.sh compare my-repo main develop\r
{baseDir}/bitbucket-cli.sh compare my-repo release/1.0 hotfix/bugfix\r
```\r
\r
Returns raw unified diff between two branches. Use when you need to see differences without an existing PR.\r
\r
## Repository Exploration\r
\r
When exploring a repository:\r
\r
1. **Always start with `tree`** to see the full directory structure in one call\r
2. **Read key files first**: README.md, package.json, requirements.txt, pom.xml, build.gradle, Makefile, Dockerfile, docker-compose.yml\r
3. **Never read every file** — pick the ones relevant to the task\r
4. **Specify the branch** — do not assume `main`. If the user mentions a branch, pass it to every command\r
5. For large repos, use `search` to find specific code instead of reading files one by one\r
\r
## Rules\r
\r
- This skill has READ-ONLY access. Never attempt to create, merge, approve, or decline PRs.\r
- For large diffs, always read diffstat before the full diff.\r
- All output is JSON to stdout (except `diff` and `file` which return raw text).\r
- Results are paginated: repos (max 50), PRs (max 25), branches (max 25), commits (max 10). If you need more, tell the user the results may be incomplete.\r
安全使用建议
This skill is coherent and implements a read-only Bitbucket Cloud explorer. Before installing: 1) Use a dedicated Bitbucket API token scoped to Repositories: Read and Pull requests: Read (do not reuse broader tokens). 2) Run the skill on an isolated gateway or container — the script supplies credentials to curl with -u "email:token", which can expose credentials in process listings on some hosts. If that is a concern, consider mitigating (run in an ephemeral container, restrict access to the host, or modify the script to reduce exposure). 3) Verify token scope and rotate the token if you stop using the skill. 4) Note the registry metadata missing a declared primary credential (minor bookkeeping issue).
功能分析
Type: OpenClaw Skill Name: atlassian-bitbucket Version: 1.0.2 The skill bundle provides a read-only interface for interacting with Bitbucket Cloud repositories and pull requests. The core logic in `bitbucket-cli.sh` uses standard `curl` commands and `python3` for JSON parsing, strictly utilizing GET requests to ensure read-only access as described in `SKILL.md`. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
Name/description match the code and SKILL.md. The script and instructions only reference Bitbucket Cloud APIs and require ATLASSIAN_EMAIL, BITBUCKET_API_TOKEN, and BITBUCKET_WORKSPACE, which are appropriate for a Bitbucket read-only client.
Instruction Scope
Instructions are narrowly scoped to Bitbucket read-only exploration and explain available commands. One operational security note: the script passes credentials to curl with -u "user:token"; on some host systems that can expose credentials in process listings (ps) while the command runs. The SKILL.md does not warn about that; consider running the gateway in an isolated environment or using a method that limits exposure.
Install Mechanism
No install spec (instruction-only skill) and the only shipped code is a single bash script. No downloads from external URLs or package installs are performed by the skill itself.
Credentials
The three required environment variables are expected and necessary for Bitbucket API access. The SKILL.md explicitly asks for a read-only-scoped API token, which is proportionate. Minor inconsistency: registry metadata lists no primary credential even though BITBUCKET_API_TOKEN is the main secret used — not a functional problem but worth noting for catalog accuracy.
Persistence & Privilege
always is false and the skill does not request any elevated persistence or system-wide changes. Autonomous invocation is allowed (platform default) and appropriate for this type of skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install atlassian-bitbucket
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /atlassian-bitbucket 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
atlassian-bitbucket v1.0.2 changelog - Documentation expanded with new usage recommendations for exploration and search. - Added command documentation for recursive directory listing (`tree`), code search (`search`), and branch comparison (`compare`). - Updated directory listing and file read commands to clarify handling of branches and root directory. - Added notes about command result pagination and result limits. - No code changes—documentation only.
v1.0.1
Added setup documentation
v1.0.0
Initial release: Read-only Bitbucket Cloud integration for browsing repositories and reviewing pull requests. - Browse Bitbucket Cloud repositories, branches, and directory contents. - Review pull requests: list PRs, view details, comments, commits, diffstat, and unified diffs. - Read file contents from any branch or commit. - All commands use a bash CLI wrapper (`bitbucket-cli.sh`) and require read-only API credentials. - No write/merge/approve actions supported — strictly read-only access.
元数据
Slug atlassian-bitbucket
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Bitbucket 是什么?

Browse Bitbucket Cloud repos, review pull requests, read diffs, check branches. Use when user mentions PRs, code changes, diffs, branches, Bitbucket, or repo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 176 次。

如何安装 Bitbucket?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install atlassian-bitbucket」即可一键安装,无需额外配置。

Bitbucket 是免费的吗?

是的,Bitbucket 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bitbucket 支持哪些平台?

Bitbucket 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bitbucket?

由 Vuk Pejović(@pejovicvuk)开发并维护,当前版本 v1.0.2。

💬 留言讨论