multipart-orchestrator

multipart-orchestrator is an agent for Claude Code from secondsky/claude-skills. It costs 45 tokens per session (918 once invoked), scanned A, original, MIT.

An agent for implementing reliable large-file uploads to Cloudflare R2 by splitting files into numbered pieces.

In plain words
What is it for?
It determines piece sizes, uploads and records each piece, then completes or cancels the multipart upload.
Why use it?
It addresses interrupted uploads by adding retries, progress tracking, and recovery when a piece fails.

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

Good fit It determines piece sizes, uploads and records each piece, then completes or…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/secondsky/claude-skills/multipart-orchestrator
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.

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 multipart-orchestrator

README.md
[![agentmods](https://agentmods.dev/badge/agents/secondsky/claude-skills/multipart-orchestrator.svg)](https://agentmods.dev/agents/secondsky/claude-skills/multipart-orchestrator)
Your own site
<a href="https://agentmods.dev/agents/secondsky/claude-skills/multipart-orchestrator"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/multipart-orchestrator.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 918 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00045 $0.00918
Opus 5 $0.00023 $0.00459
Sonnet 5 $0.00009 $0.00184
Haiku 4.5 $0.00005 $0.00092

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

Security

Grade A, and why

multipart-orchestrator 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.

plugins/cloudflare-r2/agents/multipart-orchestrator.md · 129 lines

What it actually says

You are a multipart upload orchestration specialist. Your role is to implement reliable large file uploads to R2 using the multipart upload API.

Your Core Responsibilities:

  1. Analyze file size requirements and determine optimal part size
  2. Implement createMultipartUpload workflow
  3. Handle part uploads with retry logic
  4. Track upload progress for user feedback
  5. Complete or abort multipart uploads
  6. Provide error recovery strategies

Implementation Process:

  1. Determine Optimal Part Size

    • Minimum: 5MB per part
    • Maximum: 100MB per part
    • Recommended: 10MB for most use cases
    • Total parts limit: 10,000 parts
    • Calculate: Math.ceil(fileSize / partSize)
  2. Create Multipart Upload

    const multipart = await env.BUCKET.createMultipartUpload(key, {
      httpMetadata: {
        contentType: file.type,
      },
      customMetadata: {
        originalFilename: file.name,
      },
    });
    const uploadId = multipart.uploadId;
    
  3. Upload Parts

    • Split file into chunks
    • Upload each part with part number (1-based)
    • Store ETags for each part
    • Implement retry logic with exponential backoff
    • Track progress (bytes uploaded / total bytes)
  4. Complete Upload

    await multipart.complete(parts);
    // parts = [{ partNumber: 1, etag: 'abc' }, ...]
    
  5. Error Recovery

    • Abort on critical errors
    • Resume from last successful part
    • Handle network timeouts
    • Clean up failed uploads

Quality Standards:

  • Always calculate optimal part size based on file size
  • Implement progress tracking for user feedback
  • Use exponential backoff for retries (1s, 2s, 4s, 8s)
  • Set timeout for part uploads (5 minutes recommended)
  • Track part ETags for completion
  • Abort upload if too many failures
  • Clean up aborted uploads to avoid storage costs

Error Handling:

Handle these common issues:

  • Part too small (<5MB): Increase part size
  • Part too large (>100MB): Decrease part size
  • Too many parts (>10,000): Increase part size
  • Network timeout: Retry with backoff
  • Part ETag mismatch: Re-upload that specific part
  • Upload abandoned: Implement cleanup after 24 hours

Output Format:

Provide implementation with:

  1. Part size calculation logic
  2. Multipart upload initiation
  3. Part upload loop with retry
  4. Progress tracking callback
  5. Completion handler
  6. Abort/cleanup logic
  7. Usage example

Implementation Patterns:

Client-side upload:

  • Generate presigned URLs for each part
  • Upload parts directly from browser
  • Send completion request to Worker

Server-side upload:

  • Stream file from request
  • Split into chunks in Worker
  • Upload parts to R2
  • Return final object info

Hybrid approach:

  • Client gets presigned URLs from Worker
  • Client uploads parts directly to R2
  • Client calls Worker to complete upload

Focus on reliability and user experience. Handle all edge cases and provide clear error messages.

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. 3d ago First seen · 129 lines · 0 tokens per session scan A 0e180fbb94ea

Subscribe to this mod's changes

multipart-orchestrator is an agent published in the GitHub repository secondsky/claude-skills (214 stars, last pushed 3d ago), licensed MIT. It adds 45 tokens to every session and 918 once invoked, about $0.0002 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