s3-storage
БесплатноБез исполняемых скриптовНе проверенManages S3-compatible object storage (AWS S3, MinIO, Cloudflare R2, DigitalOcean Spaces, Backblaze B2, Wasabi, Supabase Storage). Use when the user wants to…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
S3 Storage
Overview
Manages S3-compatible object storage across all major providers. Covers bucket operations, file upload/download, presigned URLs, multipart uploads, lifecycle policies, versioning, access control, CORS, and event notifications. All examples use AWS SDK v3 which works with any S3-compatible endpoint.
Instructions
1. Client Setup
import { S3Client } from '@aws-sdk/client-s3';
// AWS S3
const s3 = new S3Client({ region: 'us-east-1' }); // Uses env vars or IAM role
// MinIO (self-hosted)
const s3 = new S3Client({
region: 'us-east-1', endpoint: 'http://localhost:9000',
credentials: { accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY },
forcePathStyle: true,
});
// Cloudflare R2
const s3 = new S3Client({
region: 'auto', endpoint: `https://${process.env.CF_ACCOUNT_ID}.r2.cloudflarestorage.com`,
credentials: { accessKeyId: process.env.R2_ACCESS_KEY, secretAccessKey: process.env.R2_SECRET_KEY },
});
// Python (boto3) — works with all providers
import boto3
s3 = boto3.client('s3', endpoint_url='http://localhost:9000',
aws_access_key_id=os.environ['ACCESS_KEY'], aws_secret_access_key=os.environ['SECRET_KEY'])
Checksum default (AWS SDK for JavaScript v3): current SDK releases compute a CRC32 checksum on every upload by default (requestChecksumCalculation defaults to WHEN_SUPPORTED). AWS S3 accepts it, but some S3-compatible services reject or mishandle it. If PutObject or multipart uploads fail on MinIO or another compatible endpoint with checksum errors, set both options to WHEN_REQUIRED:
const s3 = new S3Client({
region: 'us-east-1', endpoint: 'http://localhost:9000', forcePathStyle: true,
requestChecksumCalculation: 'WHEN_REQUIRED',
responseChecksumValidation: 'WHEN_REQUIRED',
credentials: { accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY },
});
Cloudflare R2 takes region: 'auto' (the SDK requires a value; R2 ignores it) and the endpoint https://<ACCOUNT_ID>.r2.cloudflarestorage.com.
2. File Operations
import { PutObjectCommand, GetObjectCommand, DeleteObjectCommand, DeleteObjectsCommand, ListObjectsV2Command, CopyObjectCommand } from '@aws-sdk/client-s3';
// Upload
await s3.send(new PutObjectCommand({
Bucket: 'my-app-uploads', Key: 'users/123/avatar.jpg',
Body: fileBuffer, ContentType: 'image/jpeg',
Metadata: { 'uploaded-by': 'user-123' },
}));
// Download
const { Body, ContentType } = await s3.send(new GetObjectCommand({ Bucket: 'my-app-uploads', Key: 'users/123/avatar.jpg' }));
const chunks = [];
for await (const chunk of Body) chunks.push(chunk);
const buffer = Buffer.concat(chunks);
// List with pagination
let token;
const allKeys = [];
do {
const { Contents, NextContinuationToken, IsTruncated } = await s3.send(
new ListObjectsV2Command({ Bucket: 'my-app-uploads', Prefix: 'users/123/', MaxKeys: 1000, ContinuationToken: token })
);
allKeys.push(...(Contents || []).map(o => o.Key));
token = IsTruncated ? NextContinuationToken : undefined;
} while (token);
// Delete (single and bulk)
await s3.send(new DeleteObjectCommand({ Bucket: 'my-app-uploads', Key: 'old-file.txt' }));
await s3.send(new DeleteObjectsCommand({
Bucket: 'my-app-uploads', Delete: { Objects: keys.map(Key => ({ Key })), Quiet: true },
}));
// Copy (move = copy + delete)
await s3.send(new CopyObjectCommand({ Bucket: 'my-app-uploads', CopySource: 'my-app-uploads/old/path.jpg', Key: 'new/path.jpg' }));
3. Presigned URLs
import { PutObjectCommand, GetObjectCommand } from '@aws-sdk/client-s3';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
// Upload URL (client uploads directly to S3)
const uploadUrl = await getSignedUrl(s3, new PutObjectCommand({
Bucket: 'my-app-uploads', Key: `uploads/${userId}/${filename}`, ContentType: contentType,
}), { expiresIn: 3600 });
// Download URL
const downloadUrl = await getSignedUrl(s3, new GetObjectCommand({
Bucket: 'my-app-uploads', Key: 'reports/q4-2024.pdf',
}), { expiresIn: 900 });
The signed ContentType is part of the signature: the browser's PUT must send the same Content-Type header, or S3 returns SignatureDoesNotMatch.
4. Multipart Upload (large files)
import { Upload } from '@aws-sdk/lib-storage';
const upload = new Upload({
client: s3,
params: { Bucket: 'my-app-uploads', Key: 'large-file.zip', Body: stream },
partSize: 10 * 1024 * 1024, // must be at least 5 MB
queueSize: 4, // parts uploaded in parallel (default 4)
leavePartsOnError: false, // false: abort the multipart upload if a part fails
});
upload.on('httpUploadProgress', (p) => console.log(`${p.loaded}/${p.total}`));
await upload.done();
Upload splits the stream into parts and completes the multipart upload for you. Set leavePartsOnError: true only if you plan to clean up orphaned parts yourself.
5. Lif
Установить s3-storage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл s3-storage?
Manages S3-compatible object storage (AWS S3, MinIO, Cloudflare R2, DigitalOcean Spaces, Backblaze B2, Wasabi, Supabase Storage). Use when the user wants to create buckets, upload/download files, set up lifecycle policies, configure CORS, manage presigned URLs, implement multipart uploads, set up replication, handle versioning, configure access policies, or build file management features on top of S3-compatible APIs. Trigger words: s3, minio, r2, object storage, bucket, presigned url, multipart upload, lifecycle policy, s3 cors, storage backend, file storage, blob storage, spaces, backblaze, wasabi.
Как установить скилл s3-storage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл s3-storage запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic