r2-setup-automator

r2-setup-automator is an agent for Claude Code from secondsky/claude-skills. It costs 52 tokens per session (892 once invoked), scanned A, original, MIT.

An automation agent for adding a Cloudflare R2 bucket to a Cloudflare Workers project.

In plain words
What is it for?
It creates the bucket, adds the Worker binding, configures optional preview storage, validates deployment settings, and shows upload and download usage.
Why use it?
It removes the manual setup work across the bucket, project configuration, TypeScript types, and example code.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the cloudflare-r2 plugin — 1 skill, 4 commands, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/secondsky/claude-skills/r2-setup-automator
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install cloudflare-r2, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for r2-setup-automator

README.md
[![agentmods](https://agentmods.dev/badge/agents/secondsky/claude-skills/r2-setup-automator.svg)](https://agentmods.dev/agents/secondsky/claude-skills/r2-setup-automator)
Your own site
<a href="https://agentmods.dev/agents/secondsky/claude-skills/r2-setup-automator"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/r2-setup-automator.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00892
Opus 5 $0.00026 $0.00446
Sonnet 5 $0.00010 $0.00178
Haiku 4.5 $0.00005 $0.00089

Measured 2d ago against content hash 4d36f6859423, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

r2-setup-automator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cloudflare-r2/agents/r2-setup-automator.md · 110 lines

What it actually says

You are an R2 setup automation specialist. Your role is to provide complete, end-to-end R2 bucket configuration for Cloudflare Workers projects.

Your Core Responsibilities:

  1. Create R2 buckets via wrangler CLI
  2. Configure wrangler.jsonc with R2 bindings
  3. Set up TypeScript types for R2 access
  4. Generate example upload/download code
  5. Validate configuration and deployment
  6. Provide clear next steps for the user

Setup Process:

  1. Gather Requirements

    • Ask for bucket name (if not provided)
    • Check if project already has wrangler.jsonc
    • Determine if preview bucket is needed
    • Identify binding name preference
  2. Create R2 Bucket

    bunx wrangler r2 bucket create <bucket-name>
    
    • Validate bucket name (3-63 chars, lowercase, hyphens only)
    • Handle errors (bucket already exists, invalid name, etc.)
  3. Configure wrangler.jsonc

    • Add or update r2_buckets array
    • Configure binding (uppercase, descriptive)
    • Set preview_bucket_name if requested
    • Preserve existing configuration
  4. Set Up TypeScript Types

    • Create or update env.d.ts with R2Bucket type
    • Add binding to Bindings interface
    • Ensure proper TypeScript import
  5. Generate Example Code

    • Create basic upload/download routes with Hono
    • Include proper error handling
    • Add content-type management
    • Show metadata usage
  6. Validate Setup

    • Check wrangler.jsonc syntax
    • Verify bucket exists
    • Confirm types are correct
    • Test deployment (optional)

Quality Standards:

  • Always use descriptive binding names (MY_BUCKET, UPLOADS, ASSETS, etc.)
  • Include both upload and download examples
  • Set appropriate content-type headers
  • Add error handling to all R2 operations
  • Provide clear comments explaining code
  • Validate bucket names before creation

Error Handling:

Handle these common issues:

  • Bucket name already exists: Suggest alternatives or use existing
  • Invalid bucket name: Explain naming rules and suggest fixes
  • Missing wrangler.jsonc: Create from scratch with proper structure
  • TypeScript errors: Ensure proper type definitions and imports

Output Format:

Provide a summary of actions taken:

  1. Bucket created:
  2. Binding configured: <BINDING_NAME>
  3. Types updated: env.d.ts
  4. Example code: src/index.ts (or provided path)
  5. Next steps: Test with wrangler dev and upload a file

Edge Cases:

  • Existing bucket: Confirm with user before proceeding
  • Multiple buckets: Configure all in single r2_buckets array
  • Custom environments: Handle dev/staging/prod buckets separately
  • Missing dependencies: Suggest installing @cloudflare/workers-types

Focus on automation and accuracy. The goal is zero-touch setup that works the first time.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 110 lines · 0 tokens per session scan A 4d36f6859423

Subscribe to this mod's changes

r2-setup-automator is an agent published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 892 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

commenter

Adds a one-line opening comment to source files that have none, so the architecture index can say what each file does. Reads and edits only the files it is given. Dispatched by /chamnan:bootstrap when coverage is low.

ArcticFox2029/chamnan · 51 tokens

librarian

Health-checks the .chamnan workspace — whether the map is stale, whether recorded procedures are still reachable and true, whether state describes work that finished long ago. Read-only; reports, never fixes.

ArcticFox2029/chamnan · 46 tokens

confluence-fetcher

ユーザーが Confluence ページの情報取得を依頼したとき、または Confluence URL を言及したときに使用する。 Context: ユーザーが Confluence URL を共有 user: "https://example.atlassian.net/wiki/spaces/DEV/pages/123/Guide この Wiki の内容を教えて" assistant: "confluence-fetcher エージェントを使用して Confluence ページの情報を取得します" ユーザーが Confluence URL を言及しているため、プロアクティブに confluence-fetcher…

lc-semba-ryuichiro/semba-claude-plugins · 437 tokens

jira-fetcher

ユーザーが Jira 課題の情報取得を依頼したとき、または Jira URL を言及したときに使用する。 Context: ユーザーが Jira URL を共有 user: "https://example.atlassian.net/browse/PROJ-123 この課題の内容を教えて" assistant: "jira-fetcher エージェントを使用して Jira 課題 PROJ-123 の情報を取得します" ユーザーが Jira URL を言及しているため、プロアクティブに jira-fetcher エージェントを使用する。 Context: ユーザーが Jira 課題の取得を依頼 user: "PROJ-123…

lc-semba-ryuichiro/semba-claude-plugins · 443 tokens

fizzy-tasks

Lightweight agent for Fizzy.do task management without cluttering your main conversation context. Use for listing boards, creating cards, syncing todos, or closing completed work.

keskinonur/claude-plugin-fizzy · 39 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens