跳到正文
cccskills
免费在 GitHub 公开

file-upload-storage-expert

S3, multipart uploads, CDN integration, and presigned URLs for file storage. Activate on: file upload, S3, presigned URL, multipart upload, CDN, blob storage, image upload, media storage. NOT for: data warehouse storage (use lakehouse-architect), database design (use dimensional-modeler).

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

File Upload & Storage Expert

Design secure, scalable file upload and storage systems with presigned URLs, multipart uploads, CDN distribution, and lifecycle management.

Activation Triggers

Activate on: "file upload", "S3", "presigned URL", "multipart upload", "CDN", "blob storage", "image upload", "R2", "media storage", "upload progress"

NOT for: Data lake storage → lakehouse-architect | Database BLOB columns → dimensional-modeler | Video processing pipelines → relevant media skill

Quick Start

  1. Choose storage backend — S3, R2 (zero egress), GCS, or Supabase Storage
  2. Generate presigned URLs server-side — never expose credentials to clients
  3. Implement multipart upload for files >10MB with resume capability
  4. Process asynchronously — thumbnails, transcoding, virus scanning via queue
  5. Serve via CDN — CloudFront, Cloudflare, or Vercel Edge for global delivery

Core Capabilities

DomainTechnologies
Object StorageAWS S3, Cloudflare R2, GCS, MinIO
Upload Libraries@aws-sdk/client-s3, tus-js-client, Uppy 4.x
CDNCloudFront, Cloudflare CDN, Fastly
ProcessingSharp (images), FFmpeg (video), ClamAV (scanning)
ManagedSupabase Storage, Vercel Blob, Uploadthing

Architecture Patterns

Presigned URL Upload Flow

Client                    Server                    S3/R2
  │                         │                         │
  ├─ POST /upload/init ────→│                         │
  │  { filename, type }     │                         │
  │                         ├─ createPresignedPost() ─→│
  │                         │                         │
  │←── { url, fields } ────┤                         │
  │                         │                         │
  ├─ PUT (direct to S3) ──────────────────────────────→│
  │                         │                         │
  │                         │←── S3 Event Notification│
  │                         ├─ Process (thumbnail,    │
  │                         │   scan, metadata)       │
  │←── webhook: ready ─────┤                         │

Multipart Upload with Resume

import { S3Client, CreateMultipartUploadCommand,
  UploadPartCommand, CompleteMultipartUploadCommand } from '@aws-sdk/client-s3';

const PART_SIZE = 10 * 1024 * 1024; // 10MB parts

async function multipartUpload(file: Buffer, key: string) {
  const { UploadId } = await s3.send(
    new CreateMultipartUploadCommand({ Bucket: BUCKET, Key: key })
  );

  const parts: { ETag: string; PartNumber: number }[] = [];
  for (let i = 0; i < file.length; i += PART_SIZE) {
    const partNumber = Math.floor(i / PART_SIZE) + 1;
    const { ETag } = await s3.send(new UploadPartCommand({
      Bucket: BUCKET, Key: key, UploadId,
      PartNumber: partNumber,
      Body: file.subarray(i, i + PART_SIZE),
    }));
    parts.push({ ETag: ETag!, PartNumber: partNumber });
  }

  await s3.send(new CompleteMultipartUploadCommand({
    Bucket: BUCKET, Key: key, UploadId,
    MultipartUpload: { Parts: parts },
  }));
}

CDN-First Serving Architecture

User Request → CDN Edge (cache hit?) ──yes──→ Serve cached
                    │ no
                    ↓
              Origin (S3/R2)
                    ↓
              Response + Cache-Control: public, max-age=31536000, immutable
              (use content-hash in filename for cache busting)

Anti-Patterns

  1. Proxying uploads through your server — use presigned URLs so clients upload directly to object storage; your server should never be a relay
  2. Synchronous processing — never resize/transcode during the upload request; push to a queue and process async
  3. Mutable filenames — use content-addressable keys (sha256-{hash}.ext) for CDN cacheability
  4. No upload size limits — enforce max file size server-side in presigned URL policy AND client-side
  5. Storing credentials client-side — presigned URLs expire; never send AWS keys to the browser

Quality Checklist

  • Presigned URLs used for client-to-storage uploads
  • Presigned URL expiry set to 5-15 minutes
  • Multipart upload implemented for files >10MB
  • Upload size limits enforced in presigned URL policy
  • Content-Type validation on server (not just extension)
  • Virus/malware scanning before making files public
  • CDN configured with immutable cache headers
  • Lifecycle policy deletes incomplete multipart uploads after 24h
  • CORS configured on bucket for browser direct uploads
  • Storage costs monitored with lifecycle transitions (Standard → IA → Glacier)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

中文简介正在准备中。当前显示原文说明。

curiositech/port-daddy32026年10月19日 更新

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

中文简介正在准备中。当前显示原文说明。

curiositech/port-daddy32026年10月19日 更新

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

中文简介正在准备中。当前显示原文说明。

curiositech/port-daddy32026年10月19日 更新

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

中文简介正在准备中。当前显示原文说明。

curiositech/port-daddy32026年10月19日 更新

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

中文简介正在准备中。当前显示原文说明。

curiositech/port-daddy32026年10月19日 更新

Apply cognitive task analysis to expert work that depends on perceptual cues, branching judgment, and recurring monitoring loops. Use when decomposing expert capability into agent structure, simulation design, or validation interviews. NOT for ordinary step-by-step SOP capture or simple pipelines with no tacit cue layer.

中文简介正在准备中。当前显示原文说明。

curiositech/port-daddy32026年10月19日 更新

查看 curiositech 的全部技能

报告此技能的问题