bitbucket
БесплатноБез исполняемых скриптовНе проверенManage repositories, pipelines, and code review with Bitbucket Cloud. Use when a user asks to set up Bitbucket repositories, configure Bitbucket Pipelines for…
Об этом скилле
Bitbucket
Overview
Automate and extend Bitbucket Cloud — Atlassian's Git platform with built-in CI/CD. This skill covers repository management, Bitbucket Pipelines configuration, pull request workflows, branch permissions, deployment environments, the REST API 2.0, webhooks, Jira integration, and merge checks.
Instructions
Step 1: Authentication
// App passwords are deprecated: use an API token (Personal settings > Security >
// API tokens). It needs an expiry date (max 1 year) and scopes chosen at creation;
// scopes do not imply each other, so list every one you need, e.g.
// read:repository:bitbucket, write:repository:bitbucket (files, branches),
// admin:repository:bitbucket (create repos, branch restrictions),
// read:pullrequest:bitbucket, write:pullrequest:bitbucket,
// read:pipeline:bitbucket, write:pipeline:bitbucket (run pipelines),
// admin:pipeline:bitbucket (pipeline variables), write:webhook:bitbucket.
// Auth is Basic: your Atlassian account email + the token. (OAuth 2.0 access
// tokens go to api.bitbucket.org in an `Authorization: Bearer` header instead.)
const BB_BASE = "https://api.bitbucket.org/2.0";
const AUTH = Buffer.from(
`${process.env.BB_EMAIL}:${process.env.BB_API_TOKEN}`
).toString("base64");
async function bb(method: string, path: string, body?: any) {
const res = await fetch(`${BB_BASE}${path}`, {
method,
headers: {
Authorization: `Basic ${AUTH}`,
"Content-Type": "application/json",
},
body: body ? JSON.stringify(body) : undefined,
});
if (!res.ok) throw new Error(`BB ${method} ${path}: ${res.status} ${await res.text()}`);
return res.status === 204 ? null : res.json();
}
Step 2: Repositories
// Create a repository
const repo = await bb("POST", `/repositories/my-workspace/my-new-repo`, {
scm: "git",
is_private: true,
description: "Backend API service",
project: { key: "ENG" },
mainbranch: { name: "main" },
fork_policy: "no_public_forks",
});
// List, get details, list branches
const repos = await bb("GET", `/repositories/my-workspace?q=project.key="ENG"&sort=-updated_on&pagelen=25`);
const repoInfo = await bb("GET", `/repositories/my-workspace/my-repo`);
const branches = await bb("GET", `/repositories/my-workspace/my-repo/refs/branches?sort=-target.date&pagelen=25`);
// Get file content / browse tree
const fileContent = await fetch(
`${BB_BASE}/repositories/my-workspace/my-repo/src/main/README.md`,
{ headers: { Authorization: `Basic ${AUTH}` } }
).then(r => r.text());
Step 3: Pull Requests
// Create a pull request (Jira keys like ENG-142 in description auto-link)
const pr = await bb("POST", `/repositories/my-workspace/my-repo/pullrequests`, {
title: "feat: add user authentication module",
description: "Implements OAuth2 login.\n\nCloses ENG-142",
source: { branch: { name: "feature/auth" } },
destination: { branch: { name: "main" } },
close_source_branch: true,
reviewers: [{ account_id: "5f1234abc..." }],
});
// List, approve, request changes
const openPRs = await bb("GET", `/repositories/my-workspace/my-repo/pullrequests?state=OPEN&pagelen=50`);
await bb("POST", `/repositories/my-workspace/my-repo/pullrequests/${pr.id}/approve`);
await bb("POST", `/repositories/my-workspace/my-repo/pullrequests/${pr.id}/request-changes`);
// Comments (general and inline on a specific file/line)
await bb("POST", `/repositories/my-workspace/my-repo/pullrequests/${pr.id}/comments`, {
content: { raw: "Looks good! One suggestion on the token expiry logic." },
});
await bb("POST", `/repositories/my-workspace/my-repo/pullrequests/${pr.id}/comments`, {
content: { raw: "Use `crypto.timingSafeEqual` here to prevent timing attacks." },
inline: { path: "src/auth/jwt.ts", to: 42 },
});
// Merge: "merge_commit" | "squash" | "fast_forward" | "squash_fast_forward" | "rebase_fast_forward" | "rebase_merge"
await bb("POST", `/repositories/my-workspace/my-repo/pullrequests/${pr.id}/merge`, {
merge_strategy: "squash",
message: "feat: add user authentication module (#142)",
close_source_branch: true,
});
Step 4: Branch Permissions & Merge Checks
// Pattern supports globs: release/*. The approval/build/task rules are merge checks:
// without the Premium plan they only warn, they do not block the merge.
// Require 2 approvals to merge to main
await bb("POST", `/repositories/my-workspace/my-repo/branch-restrictions`, {
kind: "require_approvals_to_merge", pattern: "main", value: 2,
});
// Prevent direct pushes (force PRs)
await bb("POST", `/repositories/my-workspace/my-repo/branch-restrictions`, {
kind: "push", pattern: "main", users: [], groups: [],
});
// Require passing builds and resolved tasks before merge
await bb("POST", `/repositories/my-workspace/my-repo/branch-restrictions`, {
kind: "require_passing_builds_to_merge", pattern: "main", value: 1,
});
await bb("POST", `/repositories/my-workspace/my-repo/branch-restrictions
Установить bitbucket в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bitbucket?
Manage repositories, pipelines, and code review with Bitbucket Cloud. Use when a user asks to set up Bitbucket repositories, configure Bitbucket Pipelines for CI/CD, manage pull requests, set up branch permissions, use Bitbucket REST API 2.0, create webhooks, manage deployment environments, set up code review workflows, integrate with Jira, configure merge checks, or automate repository operations. Covers repository management, CI/CD pipelines, code review, deployments, and Atlassian ecosystem integration.
Как установить скилл bitbucket?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bitbucket запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic