Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

PinMe Worker R2 Storage

A skill that guides Claude to build secure file upload, download, and delete APIs on PinMe-deployed Cloudflare Workers using only the injected env.R2 binding.

Web & APIIntermediate★ 3,750⑂ 273AI score 8/10Last updated: Sep 12, 2026

What it does

  • Assumes the env.R2 binding PinMe auto-injects into every deployed Worker, so no credentials, bucket names, or Wrangler edits are needed.
  • Ships route-level TypeScript for streaming uploads, Range/conditional downloads, HEAD metadata, deletes, and owner-prefixed listing.
  • Enforces one security sequence on every route: authenticate → authorize → validate size and media policy → generate a server-side key → call env.R2 → return a sanitized response.
  • Clarifies R2 vs D1 responsibilities (bodies in R2, searchable metadata in D1) with a pending → ready state-transition and compensation pattern.
  • Includes a status-code contract (400/411/412/413/416...) and an anti-pattern table to block common insecure implementations.

Who it's for

  • Developers shipping Cloudflare Worker backends through PinMe that need file or image storage.
  • Teams hardening upload APIs that currently trust client-supplied object keys or user IDs.
  • Anyone combining R2 and D1 who needs a consistency plan without shared transactions.

Examples

  1. "Add an image upload endpoint" → handler that prechecks Content-Length, enforces a MIME allowlist, streams request.body straight into env.R2.put, and re-verifies the stored size.
  2. "Video seeking is broken" → adds Range header validation, 206 responses with content-range/accept-ranges, and 412 on failed conditional requests.
  3. "List a user's files" → calls list() with only the authenticated owner's prefix and paginates on page.truncated rather than object count.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/glitternetwork/pinme/HEAD/skills/pinme-r2/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/pinme-r2 folder from the GitHub repo glitternetwork/pinme into my ~/.claude/skills/pinme-r2/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/glitternetwork/pinme.git && mkdir -p ~/.claude/skills && cp -r pinme/skills/pinme-r2 ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/glitternetwork/pinme.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r pinme/skills/pinme-r2 ~/.claude/skills/
  5. Confirm ~/.claude/skills/pinme-r2/SKILL.md exists.
  6. Restart Claude Code, then inside a PinMe Worker project ask something like "add an R2 file upload route" to trigger the skill.
  7. Because the skill assumes a PinMe-deployed Worker (pinme save / pinme update-worker), install the PinMe CLI first for the full workflow.