Claude Skill for Backblaze B2 Cloud Storage management from the terminal. Manage buckets, list and search files, audit storage usage, detect stale or large objects, review security posture, and safely clean up data using natural language. Built on the Agent Skills specification and compatible with Claude Code and other skills-based agents.
# Add to your Claude Code skills
git clone https://github.com/backblaze-labs/claude-skill-b2-cloud-storageA Claude Code skill for managing Backblaze B2 cloud storage directly from your terminal — list files, audit buckets, clean up stale data, and review security posture.
No comments yet. Be the first to share your thoughts!
Built on the open Agent Skills specification. Compatible with Claude Code, Codex CLI, Cursor, Gemini CLI, and other skills-compatible agents.
| Badge | Meaning |
|---|---|
| CI | GitHub Actions runs lint, tests, frontmatter validation, and pre-commit on every PR across Python 3.10–3.14. |
| License: MIT | Permissive open-source license — free to fork, modify, and ship. |
| Python 3.10–3.14 | Tested on every currently-supported CPython version. Python 3.9 reached EOL in October 2025 and is no longer in the matrix. |
| Ruff | Linted and formatted with Astral's Ruff. Enforced via pre-commit. |
| Checked with mypy | Static type-checked. The audit script's public surface and the B2 JSON inputs are fully annotated. |
| pre-commit | Hooks for whitespace, JSON/YAML validity, ruff, markdownlint, yamllint, cspell, and mypy run on every commit. |
| Spell-checked: cspell | Markdown and Python prose are spell-checked with a project-specific allowlist. |
| Claude Code | First-class compatibility with Claude Code — auto-invoked when you mention B2 in chat. |
| Agent Skills | Conforms to the open Agent Skills SKILL.md specification — works in any compatible agent (Codex CLI, Cursor, Gemini CLI, etc.). |
| Backblaze B2 | Targets the Backblaze B2 Cloud Storage platform via the official b2 CLI v4+. |
| GitHub stars | Community signal — give it a ⭐ if it's useful. |
contentSha1 (true duplicates, not same-name)--stale-days and --large-mb thresholds--json flag for downstream analysisPick whichever fits your tooling. All methods install the same skill folder; only the delivery differs.
npx skills add — open spec CLI (recommended cross-agent)Works with any Agent Skills-compatible client (Claude Code, Codex CLI, Cursor, Gemini CLI, Goose, OpenCode, etc.).
npx skills add backblaze-labs/claude-skill-b2-cloud-storage -g # global
npx skills add backblaze-labs/claude-skill-b2-cloud-storage # current project only
The -g flag installs system-wide (~/.claude/skills/ for Claude Code). Without it, the skill is scoped to the current project.
Inside Claude Code:
/plugin marketplace add backblaze-labs/claude-skill-b2-cloud-storage
/plugin install b2-cloud-storage
This reads the .claude-plugin/marketplace.json in the repo and installs the skill plus any future plugins shipped from the same source.
Latest (always points at the most recent release):
curl -L https://github.com/backblaze-labs/claude-skill-b2-cloud-storage/releases/latest/download/b2-cloud-storage.tar.gz \
| tar xz -C ~/.claude/skills/
Pinned to a specific version (deterministic deploys, air-gapped environments):
# Substitute the tag you want — see https://github.com/backblaze-labs/claude-skill-b2-cloud-storage/releases
TAG=vX.Y.Z
curl -L "https://github.com/backblaze-labs/claude-skill-b2-cloud-storage/releases/download/${TAG}/b2-cloud-storage-${TAG}.tar.gz" \
| tar xz -C ~/.claude/skills/
Each release ships four artifacts: an unversioned b2-cloud-storage.tar.gz / .zip (used by the latest URL) and a -<tag> versioned pair for pinning.
When you want to edit the skill in place or test changes locally:
git clone https://github.com/backblaze-labs/claude-skill-b2-cloud-storage.git /tmp/b2-skill \
&& cp -r /tmp/b2-skill/b2-cloud-storage ~/.claude/skills/b2-cloud-storage \
&& rm -rf /tmp/b2-skill
Or, if you've already cloned the repo, from the repo root:
cp -r b2-cloud-storage ~/.claude/skills/b2-cloud-storage
Once the skill is listed on the respective directory:
npx @skill-hub/cli install b2-cloud-storage # SkillHub
lhm install b2-cloud-storage # LobeHub (lobehub-cli)
See RELEASE.md for the full list of directories and their listing status.
ls ~/.claude/skills/b2-cloud-storage/SKILL.md
Then in Claude Code, restart the session and try > audit my-bucket for stale files — the skill is auto-invoked when you mention B2 in natural language.
The skill is auto-invoked when you mention B2 in natural language, or you can call it explicitly with /b2-cloud-storage:
> help me set up B2
> list everything in my-bucket
> audit my-bucket for stale files, duplicates, and unfinished uploads
> clean up files older than 90 days in my-bucket/logs
> run a security review on my public buckets
The audit script can also be run directly:
python ~/.claude/skills/b2-cloud-storage/scripts/storage_audit.py <bucket>
python ~/.claude/skills/b2-cloud-storage/scripts/storage_audit.py <bucket> --json
python ~/.claude/skills/b2-cloud-storage/scripts/storage_audit.py <bucket> \
--stale-days 180 --large-mb 500 --prefix-depth 2
Note: You may need to restart Claude Code after installing the skill for it to be recognized.
The skill handles setup automatically on first use:
pip install b2)listBuckets, listFiles, readFiles for read-only)keyID and applicationKeyb2 account authorize interactively (keys stay in your terminal, never in chat)b2 lsCredentials are stored by the B2 CLI in ~/.b2_account_info. The skill never sees or stores your keys.
Different projects can use different B2 buckets and credentials. On first use in a project, the skill asks which bucket to use and saves a config file at .claude/b2-config.json in your project root:
{
"bucket": "my-project-bucket",
"prefix": "",
"accountInfoPath": "~/.b2_account_info"
}
| Field | Purpose |
|-------|---------|
| bucket | Default bucket for this project |
| prefix | Scope all operations to a prefix (e.g. data/models/) |
| accountInfoPath | Path to B2 credential file — use different keys per project |
To use separate credentials per project, authorize into a project-specific file:
B2_ACCOUNT_INFO=~/.b2_account_info_myproject b2 account authorize
Then set accountInfoPath to ~/.b2_account_info_myproject in your project's config.
An example config file is included at b2-cloud-storage/b2-config.example.json.
Note: This config file stores bucket names and file paths only — never API keys or secrets. Add .claude/b2-config.json to your .gitignore.
b2 account get and