본문으로 건너뛰기
cccskills
무료GitHub에 공개

file-uploads

File upload decision guide: signed URLs, validation, storage, virus scanning, image processing, UX. Use for: upload, file storage, attachment, avatar, image, document, GCS, S3, presigned.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane스타 3(GitHub 3 + cccskills 0)
연동 도구AWS

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

file-uploads — Decision Guide

Default storage: GCS. Logic identical for S3/R2 — adapt provider SDK.

Upload Strategy Decision

StrategyWhenTrade-off
Signed URL (direct)Default for all uploadsBackend never touches bytes; scales trivially
Server proxy<100KB parsed inline (small CSV)Simple but consumes backend RAM; no scale
Resumable/multipart>100MB (videos, datasets)8-32MB chunks; resume on failure
tus protocolVendor-neutral resumableRequires tusd server

Signed URL Flow

Client → POST /uploads/sign → Backend (validate, create pending row, return signed URL)
Client → PUT bytes → Storage (uploads-pending/)
Storage → Event (Pub/Sub) → Worker (MIME sniff + virus scan)
Worker → if clean: move to uploads-clean/, update DB status

Key decisions:

  • Backend never touches bytes — only signs and tracks
  • Two buckets: uploads-pending (quarantine) + uploads-clean (served)
  • Key is UUID, never client filename (PII, collisions, path traversal)
  • Signed URL expiry: <=15min; include content-length constraint in signature
  • Multi-tenant: t/{tenant}/u/{user}/{uuid} key path

Checklist

CheckWhereDetail
MIME whitelistSign + Worker (sniff)Whitelist only; sniff first 512 bytes server-side
Size limitSign + URL constraintEnforce per use case (10MB avatar, 100MB doc)
Virus scanWorker (async)ClamAV / Cloudmersive / VirusTotal; never serve status != clean
Content-Type matchWorkerSniffed vs declared; reject on mismatch
ChecksumWorker (post-scan)SHA-256 stored for integrity

Never trust client Content-Type or file extension alone.

Storage Decision

ProviderWhenNotes
GCSDefault (GCP)V4 signed URLs, Pub/Sub, Cloud CDN
S3AWS stackPresigned URLs, EventBridge, CloudFront
R2Egress-sensitiveS3-compatible, zero egress fees

Image Processing

  • On upload (worker): predictable sizes — avatars, thumbnails
  • On demand (CDN): many sizes — Cloudflare Images or imgproxy
  • Always WebP/AVIF for delivery; generate thumbnails async, never in request

Status Machine

pending → scanning → clean | infected (deleted) | rejected (deleted)

DB columns: id, owner_id, tenant_id, bucket, key, mime, size, checksum_sha256, status, scanned_at, created_at.

UX Patterns

  • Progress (web): XHR upload.onprogress — fetch lacks upload progress
  • Progress (RN): expo-file-system uploadAsync
  • 100MB: switch to resumable with per-chunk retry + exponential backoff

  • Show placeholder until status=clean; poll or WebSocket for completion

Anti-patterns

  • Proxying bytes through backend — wastes RAM, crashes pods
  • Trusting extension or client Content-Type without server sniff
  • Client filename as key — PII, collisions, traversal
  • Serving pending/scanning files; sync virus scan in request
  • Signed URLs >15min; no size limit; any-MIME allowed
  • Public buckets; missing CORS; no rate limit on /uploads/sign

Checklist

  • Signed URL <=15min; content-length in signature
  • MIME whitelist at sign AND worker (real sniff)
  • UUID key, never client filename
  • Separate pending/clean buckets; virus scan before serving
  • DB status machine (pending→scanning→clean)
  • SHA-256 checksum post-scan; CORS on bucket
  • Rate limit on /uploads/sign; tenant_id in path
  • Thumbnails async; CDN for clean files; structured logs

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

SebastianLuser의 스킬 모두 보기

이 스킬의 문제 신고