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.
git clone --depth 1 https://github.com/secondsky/claude-skillsWrote 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.
[](https://agentmods.dev/commands/secondsky/claude-skills/r2-multipart-init)<a href="https://agentmods.dev/commands/secondsky/claude-skills/r2-multipart-init"><img src="https://agentmods.dev/badge/commands/secondsky/claude-skills/r2-multipart-init.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.01925 |
| Opus 5 | $0.00010 | $0.00962 |
| Sonnet 5 | $0.00004 | $0.00385 |
| Haiku 4.5 | $0.00002 | $0.00193 |
Grade A, and why
cloudflare-r2:multipart-init 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.
R2 Multipart Upload Setup
Initialize and implement multipart upload workflow for handling large files (>100MB) with chunking, error recovery, and progress tracking.
Required Information
- File size (in MB):
{{file_size}} - Object key (destination path):
{{key}} - Part size (5-100 MB, recommended 10MB):
{{part_size}} - Content type:
{{content_type}}
What This Command Does
- Calculates optimal part size based on file size
- Shows createMultipartUpload code for initialization
- Generates part upload loop with retry logic
- Provides completion/abort handlers
- Adds progress tracking for user feedback
Multipart Upload Constraints
- Minimum part size: 5 MB (except last part)
- Maximum part size: 100 MB
- Maximum parts: 10,000 parts per upload
- Part numbers: 1 to 10,000 (1-based indexing)
Part Size Calculator
function calculatePartSize(fileSizeMB: number): number {
const MIN_PART_SIZE = 5 * 1024 * 1024; // 5MB
const MAX_PART_SIZE = 100 * 1024 * 1024; // 100MB
const MAX_PARTS = 10000;
const fileSize = fileSizeMB * 1024 * 1024;
const recommendedSize = Math.ceil(fileSize / MAX_PARTS);
if (recommendedSize < MIN_PART_SIZE) {
return MIN_PART_SIZE;
} else if (recommendedSize > MAX_PART_SIZE) {
return MAX_PART_SIZE;
} else {
return recommendedSize;
}
}
// Example: 500MB file = 10MB parts (50 parts)
// Example: 50GB file = 10MB parts (5000 parts)
Complete Implementation
import { Hono } from 'hono';
type Bindings = {
MY_BUCKET: R2Bucket;
};
const app = new Hono<{ Bindings: Bindings }>();
// Step 1: Initialize multipart upload
app.post('/multipart/create', async (c) => {
const { key, contentType } = await c.req.json();
const multipart = await c.env.MY_BUCKET.createMultipartUpload(key, {
httpMetadata: {
contentType: contentType || 'application/octet-stream',
},
customMetadata: {
uploadedAt: new Date().toISOString(),
},
});
return c.json({
uploadId: multipart.uploadId,
key: multipart.key,
});
});
// Step 2: Upload individual parts
app.put('/multipart/upload-part', async (c) => {
const { uploadId, key, partNumber } = await c.req.json();
const data = await c.req.arrayBuffer();
// Validate part number (1-10000)
if (partNumber < 1 || partNumber > 10000) {
return c.json({ error: 'Invalid part number' }, 400);
}
const multipart = c.env.MY_BUCKET.resumeMultipartUpload(key, uploadId);
const uploadedPart = await multipart.uploadPart(partNumber, data);
return c.json({
partNumber,
etag: uploadedPart.etag,
});
});
// Step 3: Complete multipart upload
app.post('/multipart/complete', async (c) => {
const { uploadId, key, parts } = await c.req.json();
const multipart = c.env.MY_BUCKET.resumeMultipartUpload(key, uploadId);
// parts = [{ partNumber: 1, etag: 'abc' }, { partNumber: 2, etag: 'def' }, ...]
const object = await multipart.complete(parts);
return c.json({
success: true,
key: object.key,
size: object.size,
etag: object.httpEtag,
});
});
// Step 4: Abort multipart upload (cleanup)
app.delete('/multipart/abort', async (c) => {
const { uploadId, key } = await c.req.json();
const multipart = c.env.MY_BUCKET.resumeMultipartUpload(key, uploadId);
await multipart.abort();
return c.json({ success: true, message: 'Upload aborted' });
});
export default app;
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.
- 3d ago First seen · 281 lines · 19 tokens per session scan A 6c02d14f6d8e
cloudflare-r2:multipart-init is a command published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 3d ago), licensed MIT. It adds 19 tokens to every session and 1,925 once invoked, about $0.0001 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.
Other commands, from other repositories
correlate
Find related failures through pattern matching.
diff
Compare two command outputs with intelligent diff.
open
Open/retrieve an offloaded output by ID or shortcut.
search
Search through offloaded outputs with hard caps.
stats
Show FewWord session statistics with rich output and token savings.
config
Show effective FewWord configuration with sources.