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.
What this skill does
# 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
```typescript
// Bitbucket Cloud uses App Passwords (basic auth) or OAuth 2.0.
// Create an App Password at: https://bitbucket.org/account/settings/app-passwords/
const BB_BASE = "https://api.bitbucket.org/2.0";
const AUTH = Buffer.from(
`${process.env.BB_USERNAME}:${process.env.BB_APP_PASSWORD}`
).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
```typescript
// 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
```typescript
// 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"
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
```typescript
// Branch permissions require Premium plan. Pattern supports globs: release/*
// 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`, {
kind: "require_tasks_to_be_completed", pattern: "main",
});
```
### Step 5: Bitbucket Pipelines (CI/CD)
```yaml
# bitbucket-pipelines.yml — runs in Docker containers
image: node:20-slim
definitions:
steps:
- step: &test
name: Test
caches: [node]
script: [npm ci, npm run lint, npm run test:coverage]
artifacts: [coverage/**]
- step: &build
name: Build
caches: [node]
script: [npm ci, npm run build]
artifacts: [dist/**]
pipelines:
default:
- step: *test
branches:
main:
- step: *test
- step: *build
- step:
name: Deploy to Production
deployment: production
trigger: manual
script:
- pipe: atlassian/aws-ecs-deploy:1.0.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: "eu-west-1"
CLUSTER_NAME: "prod-cluster"
SERVICE_NAME: "api-service"
pull-requests:
'**':
- step: *test
custom:
run-migrations:
- step:
name: Run Database Migrations
script: [npm ci, npm run db:migrate]
```
```typescript
// Trigger a custom pipeline via API
const pipeline = await bb("POST", `/repositories/my-workspace/my-repo/pipelines/`, {
target: {
type: "pipeline_ref_target", ref_type: "branch", ref_name: "main",
selector: { type: "custom", pattern: "run-migrations" },
},
variables: [{ key: "MIGRATION_TARGET", value: "v2.1.0", secured: false }],
});
// Check status: state.name = "PENDING" | "IN_PROGRESS" | "COMPLETED"
const status = await bb("GET", `/repositories/my-workspace/my-repo/pipelines/${pipeline.uuid}`);
const pipelines = await bb("GET", `/repositories/my-workspace/my-repo/pipelines/?sort=-created_on&pagelen=10`);
```
### Step 6: Deployment Environments & Variables
```typescript
// Create environment: type name = "Test" | "Staging" | "Production"
const environment = await bb("POST", `/repositories/my-workspace/my-repo/environments/`, {
type: "deployment_environment",
name: "Production",
environment_type: { type: "deployment_environment_type", name: "Production" },
});
// Pipeline variables (secured=true encrypts, never shown in logs)
await bb("POST", `/repositories/my-workspace/my-repo/pipelines_config/variables/`, {
key: "AWS_ACCESS_KEY_ID", value: "AKIA...", secured: true,
});
// Per-environment variables
await bb("POST", `/repositories/my-workspace/my-repo/deployments_config/environments/${environment.uuid}/variables`, {
key: "API_URL", value: "https://api.production.example.com", secured: false,
});
```
### Step 7: Webhooks & Jira Integration
```typescript
// Register a webhook
const webhook = await bb("POST", `/repositories/my-workspace/my-repo/hooks`, {
description: "CI/CD event handler",
url: "https://your-app.com/webhook/bitbucket",
active: true,
events: ["repo:push", "pullrequest:created", "pullrequest:fulfilled"],
});
// Webhook handler — event type is in x-event-key header
app.post("/webhook/bitbucket", (req, res) => {
res.sendStatus(200);
const event = req.headers["x-event-key"];
if (event === "repo:push") console.log(`Push to ${req.body.push.changes[0].new.name}`);
if (event === "pullrequest:fulfilled") console.log(`PR merged: ${req.body.pullrequest.title}`);
});
// Jira integration: mention keys (ENG-142) in commits/branches/PRs for auto-linking.
// Smart commits: git commit -m "ENG-142 #time 2h #comment Fixed auth bug #done"
```
### Step 8: Code Search & Reports
```typescript
// Search code across workspace repositories
const searchResults = await bb("GET",
`/workRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.