Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

s3-sort

bởi 6mile-puppet

DevOps & Cloud
402Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Upload many files to S3 with automatic organization by first-character prefixes.

Mô tả

Kỹ năng này làm gì

Uploads files to an S3 bucket and organizes them into subdirectories based on the first character of each filename. Letters map to their lowercase folder (a/, b/), digits go to 0-9/, and other characters go to _other/. Supports dry runs, sync mode, and per-upload storage class selection.

Automatically partitions uploads into prefix directories, avoiding flat-bucket clutter that slows down listing and querying large S3 buckets.

Khi nào nên dùng

  • Organizing large media asset libraries uploaded to S3
  • Archiving log files from multiple servers into sorted buckets
  • Batch uploading dataset files for ML training pipelines
  • Migrating a local file collection to cloud storage with folder structure
  • Staging static assets alphabetically for CDN workflows

Quy trình ví dụ

ĐẦU VÀO

User asks: Upload all files from ./exports to my-bucket using sync mode

AGENT
  1. 1

    Verifies AWS credentials with aws sts get-caller-identity

  2. 2

    Tests bucket write access by uploading and removing a temporary file

  3. 3

    Creates a staging directory and populates it with prefix-based subdirectories using symlinks

  4. 4

    Runs aws s3 sync from the staging directory to s3://my-bucket/

  5. 5

    Removes the staging directory after sync completes

ĐẦU RA

All files from ./exports uploaded to my-bucket under organized prefix paths (a/, b/, 0-9/, _other/)

Yêu cầu

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • aws CLI (install via: brew install awscli)

Cài đặt

clawhub install 6mile-puppet/s3-sort

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết