upload

A command for uploading files and folders to Amazon S3, a cloud service for storing files.

In plain words
What is it for?
Uploading one file or a directory, synchronizing folders, creating backups, setting metadata or storage classes, and handling large uploads.
Why use it?
It removes the need to assemble separate upload commands for ordinary transfers, backups, large files, and encrypted data.

Command

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 commands/cyperx84/claude-code-plugin-examples/upload
Clone the repo
git clone --depth 1 https://github.com/cyperx84/claude-code-plugin-examples
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 737 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 $0.00011 $0.00737
Opus 5 $0.00005 $0.00368
Sonnet 5 $0.00002 $0.00147
Haiku 4.5 $0.00001 $0.00074

Measured yesterday against content hash d01cecc1ad23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

upload 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 yesterday.

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.

examples/04-real-world/cloud-storage-plugin/commands/upload.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Upload to Cloud Storage

Upload: $ARGUMENTS (file/directory path and destination)

Using AWS S3 MCP for cloud storage

Upload Operations

1. Single File Upload

# Basic upload
aws s3 cp ./file.txt s3://my-bucket/file.txt

# With metadata
aws s3 cp ./file.txt s3://my-bucket/file.txt \
  --metadata "author=john,version=1.0"

# With storage class
aws s3 cp ./file.txt s3://my-bucket/file.txt \
  --storage-class STANDARD_IA  # Infrequent Access (cheaper)

2. Directory Upload

# Sync directory
aws s3 sync ./local-dir s3://my-bucket/remote-dir

# With exclusions
aws s3 sync ./project s3://my-bucket/backup \
  --exclude "node_modules/*" \
  --exclude ".git/*" \
  --exclude "*.log"

# Delete removed files
aws s3 sync ./local-dir s3://my-bucket/dir --delete

3. Backup Operations

# Database backup
pg_dump mydb | aws s3 cp - s3://my-bucket/backups/db-$(date +%Y%m%d).sql

# Compressed backup
tar -czf - ./data | aws s3 cp - s3://my-bucket/backups/data-$(date +%Y%m%d).tar.gz

# Encrypted backup
tar -czf - ./sensitive | openssl enc -aes-256-cbc -pass pass:$BACKUP_KEY | \
  aws s3 cp - s3://my-bucket/encrypted/backup.tar.gz.enc

4. Large File Upload (Multipart)

// Automatically uses multipart for files > 5GB
await s3.upload({
  Bucket: 'my-bucket',
  Key: 'large-file.zip',
  Body: fs.createReadStream('./large-file.zip'),
  // Track progress
  onProgress: (progress) => {
    console.log(`Uploaded: ${progress.loaded}/${progress.total}`);
  }
});

5. Secure Uploads

# Server-side encryption
aws s3 cp file.txt s3://my-bucket/file.txt \
  --server-side-encryption AES256

# With KMS
aws s3 cp file.txt s3://my-bucket/file.txt \
  --server-side-encryption aws:kms \
  --ssekms-key-id arn:aws:kms:region:account:key/key-id

# Client-side encryption (before upload)
openssl enc -aes-256-cbc -in file.txt -out file.enc
aws s3 cp file.enc s3://my-bucket/file.enc

Example Usage

# Single file
/upload ./report.pdf s3://my-bucket/reports/

# Directory
/upload ./website/ s3://my-bucket/website/ --sync

# Backup
/upload ./database/ s3://my-bucket/backups/$(date +%Y%m%d)/ --compress

# With encryption
/upload ./sensitive/ s3://my-bucket/secure/ --encrypt

# Public file
/upload ./public/logo.png s3://my-bucket/assets/ --public

Read the full file on GitHub · 105 lines

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. yesterday First seen · 105 lines · 11 tokens per session scan A d01cecc1ad23

Subscribe to this mod's changes

upload is a command published in the GitHub repository cyperx84/claude-code-plugin-examples (2 stars, last pushed 10mo ago), licensed MIT. It adds 11 tokens to every session and 737 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-08-31.