Tooluck logoTooluck
SKILL.md

pinme-r2

Agent skill fromglitternetwork/pinme

Use when a PinMe Cloudflare Worker needs R2 object storage, including secure file or image upload, streaming download, metadata lookup, deletion, listing, Range requests, or R2+D1 coordination. Guides AI to use PinMe's automatically injected env.R2 binding without R2 credentials or manual Wrangler configuration.

How to install pinme-r2

install pinme-r2
# install the pinme pack with the skills CLI
npx skills add glitternetwork/pinme

# or add only this skill to Claude Code: copy the folder

skills/pinme-r2/

# into

~/.claude/skills/pinme-r2/ (all projects)

.claude/skills/pinme-r2/ (one project)

skills/pinme-r2/SKILL.md

MITFull file
1# PinMe Worker R2 Storage
2
3Use the project-scoped R2 bucket that PinMe binds to every deployed Worker as `env.R2`. Do not create credentials, choose a bucket name, or edit generated Wrangler configuration.
4
5## Runtime Contract
6
7PinMe rebuilds trusted Worker metadata on create, save, and update. Client metadata cannot replace the R2 binding.
8
9| Binding | TypeScript type | Availability |
10| --- | --- | --- |
11| `DB` | `D1Database` | Always injected |
12| `R2` | `R2Bucket` | Always injected; current project's bucket |
13| `API_KEY` | `string` | Always injected |
14| `LLM_API_KEY` | `string` | Always injected |
15| `BASE_URL` | `string` | Always injected |
16| `WORKER_URL` | `string` | Always injected |
17| `PROJECT_NAME` | `string` | Always injected |
18
19Payment-specific bindings such as `UNIWEB_SECRET` are conditional and unrelated to R2 access.
20
21Declare only the bindings used by the Worker module. R2 code normally starts with:
22
23```typescript
24export interface Env {
25 R2: R2Bucket;
26 PROJECT_NAME: string;
27 WORKER_URL: string;
28}
29```
30
31When the same module coordinates file metadata in D1, also declare `DB: D1Database` as a required field.
32
33## Choose R2 or D1
34
35- Use R2 for file bodies, images, attachments, media, exports, and other objects addressed by key.
36- Use D1 for searchable business metadata, ownership, relations, status, and audit fields.
37- For managed files, store the body in R2 and store only its key and business metadata in D1.
38…

Excerpt shown under the repository's MIT license.

More skills in pinme

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates