Processing S3 Uploads With Step Functions
aws/agent-toolkit-for-aws
Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.
AWS S3 (and compatible) file storage patterns. An agent skill from cohen-liel/hivemind.
$ npx skills add cohen-liel/hivemind --skill s3-file-storage -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cohen-liel/hivemind s3-file-storage --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/s3-file-storage .claude/skills/s3-file-storage && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "s3-file-storage" agent skill from https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storage into .claude/skills/s3-file-storage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "s3-file-storage", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storageType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cohen-liel/hivemind --skill s3-file-storage -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cohen-liel/hivemind s3-file-storage --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/s3-file-storage .agents/skills/s3-file-storage && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "s3-file-storage" agent skill from https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storage into .agents/skills/s3-file-storage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "s3-file-storage", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cohen-liel/hivemind --skill s3-file-storage -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cohen-liel/hivemind s3-file-storage --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/s3-file-storage .cursor/skills/s3-file-storage && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "s3-file-storage" agent skill from https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storage into .cursor/skills/s3-file-storage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "s3-file-storage", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cohen-liel/hivemind.git --path .claude/skills/s3-file-storage--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cohen-liel/hivemind --skill s3-file-storage -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cohen-liel/hivemind s3-file-storage --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/s3-file-storage .gemini/skills/s3-file-storage && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "s3-file-storage" agent skill from https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storage into .gemini/skills/s3-file-storage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "s3-file-storage", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cohen-liel/hivemind s3-file-storageInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cohen-liel/hivemind --skill s3-file-storage -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/s3-file-storage .github/skills/s3-file-storage && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "s3-file-storage" agent skill from https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storage into .github/skills/s3-file-storage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "s3-file-storage", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cohen-liel/hivemind --skill s3-file-storage -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cohen-liel/hivemind s3-file-storage --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/s3-file-storage .opencode/skills/s3-file-storage && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "s3-file-storage" agent skill from https://github.com/cohen-liel/hivemind/tree/main/.claude/skills/s3-file-storage into .opencode/skills/s3-file-storage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "s3-file-storage", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
s3-file-storageAWS S3 (and compatible) file storage patterns. An agent skill from cohen-liel/hivemind.
S3 File Storage is an agent skill from cohen-liel/hivemind. AWS S3 (and compatible) file storage patterns. Use when implementing file uploads, image storage, document management, CDN delivery, or any cloud file storage.
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering File uploads and storage. It works with Amazon S3. The repository describes itself as: One prompt. A full AI engineering team. Go lie on the couch. 🧠. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 918dd9b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python, typescript and json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
S3 File Storage loads about 1.2k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 121 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from cohen-liel/hivemind at commit 918dd9b, republished under its Apache-2.0 licence (© cohen-liel). 121 words, ~1,211 tokens.
.claude/skills/s3-file-storage/SKILL.md (or your agent's skills folder).# storage.py
import boto3
from botocore.exceptions import ClientError
import uuid, mimetypes
s3 = boto3.client(
"s3",
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
region_name=settings.AWS_REGION,
# For S3-compatible services (Cloudflare R2, MinIO):
# endpoint_url=settings.S3_ENDPOINT_URL,
)
BUCKET = settings.S3_BUCKET
CDN_URL = settings.CDN_URL # e.g. "https://cdn.example.com"async def upload_file(file: UploadFile, folder: str = "uploads") -> str:
"""Upload file, return public URL."""
# Validate
MAX_SIZE = 10 * 1024 * 1024 # 10MB
ALLOWED_TYPES = {"image/jpeg", "image/png", "image/webp", "application/pdf"}
content = await file.read()
if len(content) > MAX_SIZE:
raise ValueError(f"File too large (max {MAX_SIZE // 1024 // 1024}MB)")
if file.content_type not in ALLOWED_TYPES:
raise ValueError(f"File type not allowed: {file.content_type}")
# Generate unique key
ext = mimetypes.guess_extension(file.content_type) or ".bin"
key = f"{folder}/{uuid.uuid4()}{ext}"
s3.put_object(
Bucket=BUCKET,
Key=key,
Body=content,
ContentType=file.content_type,
CacheControl="max-age=31536000", # 1 year cache for immutable files
)
return f"{CDN_URL}/{key}"def generate_upload_url(filename: str, content_type: str, folder: str = "uploads") -> dict:
"""Client uploads directly to S3 — bypasses your server entirely."""
ext = filename.rsplit(".", 1)[-1].lower() if "." in filename else "bin"
key = f"{folder}/{uuid.uuid4()}.{ext}"
url = s3.generate_presigned_url(
"put_object",
Params={
"Bucket": BUCKET,
"Key": key,
"ContentType": content_type,
"ContentLength": 5 * 1024 * 1024, # Max 5MB
},
ExpiresIn=300, # URL valid for 5 minutes
)
return {
"upload_url": url,
"key": key,
"public_url": f"{CDN_URL}/{key}",
}
# FastAPI endpoint
@router.post("/upload-url")
async def get_upload_url(
filename: str = Query(...),
content_type: str = Query(...),
user: User = Depends(get_current_user),
):
return generate_upload_url(filename, content_type, folder=f"users/{user.id}")async function uploadFile(file: File): Promise<string> {
// 1. Get presigned URL from your API
const { upload_url, public_url } = await fetch('/api/upload-url?' + new URLSearchParams({
filename: file.name,
content_type: file.type,
})).then(r => r.json())
// 2. Upload directly to S3 (no server in the middle)
await fetch(upload_url, {
method: 'PUT',
body: file,
headers: { 'Content-Type': file.type },
})
return public_url
}async def delete_file(key: str):
try:
s3.delete_object(Bucket=BUCKET, Key=key)
except ClientError as e:
logger.error(f"S3 delete failed for {key}: {e}")
def extract_key_from_url(url: str) -> str:
"""Extract S3 key from CDN URL."""
return url.replace(f"{CDN_URL}/", "")from PIL import Image
import io
def resize_image(content: bytes, max_size: tuple[int, int] = (1920, 1080)) -> bytes:
img = Image.open(io.BytesIO(content))
img.thumbnail(max_size, Image.LANCZOS)
if img.mode in ("RGBA", "P"):
img = img.convert("RGB")
output = io.BytesIO()
img.save(output, format="JPEG", optimize=True, quality=85)
return output.getvalue(){
"Version": "2012-10-17",
"Statement": [{
"Sid": "PublicRead",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::your-bucket/*"
}]
}© cohen-liel, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/s3-file-storage of cohen-liel/hivemind.
Open the folder on GitHubat commit 918dd9b
S3 File Storage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| S3 File Storage this skillcohen-liel/hivemind | 110 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Processing S3 Uploads With Step Functionsaws/agent-toolkit-for-aws | 2.8k | — | ~4k | Automated safety check: Pass | Apache-2.0 | |
| S3 User Filesaws-samples/sample-host-openclaw-on-amazon-bedrock-agentcore | 177 | — | ~779 | Automated safety check: Pass | MIT-0 | |
| Django Storages for S3Jeffallan/claude-skills | 12k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Neon Object Storageneondatabase/agent-skills | 100 | — | ~3.5k | Automated safety check: Notes | Apache-2.0 | |
| AWS S3sickn33/agentic-awesome-skills | 47k | 2 repos | ~3.1k | Automated safety check: Pass | MIT |
aws/agent-toolkit-for-aws
Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.
aws-samples/sample-host-openclaw-on-amazon-bedrock-agentcore
Per-user persistent file storage backed by AWS S3. An agent skill from aws-samples/sample-host-openclaw-on-amazon-bedrock-agentcore.
Jeffallan/claude-skills
Sets up Django 4.2+ to keep static and media files on AWS S3 through django-storages, with public and private backends, presigned URLs and CloudFront.
neondatabase/agent-skills
S3-compatible object storage that branches with your Neon project, so files and the database stay in sync across every branch.
sickn33/agentic-awesome-skills
Configure S3 buckets, policies, and lifecycle rules. An agent skill from sickn33/agentic-awesome-skills.
zebbern/claude-code-guide
Upload files to Cloudflare R2, AWS S3, or any S3-compatible storage (like MinIO) and generate secure, time-limited presigned download links with configurable expiration, typically set to 5 minutes.
cohen-liel/hivemind
REST API design principles and best practices. An agent skill from cohen-liel/hivemind.
cohen-liel/hivemind
Python asyncio patterns for high-performance async code. An agent skill from cohen-liel/hivemind.
cohen-liel/hivemind
Celery background task patterns for Python apps. An agent skill from cohen-liel/hivemind.
cohen-liel/hivemind
Docker, docker-compose, and deployment configuration best practices.
cohen-liel/hivemind
End-to-end testing patterns with Playwright. An agent skill from cohen-liel/hivemind.
cohen-liel/hivemind
Email sending patterns for transactional and marketing emails.
Works with
Categories
AWS S3 (and compatible) file storage patterns. An agent skill from cohen-liel/hivemind. S3 File Storage is an agent skill from cohen-liel/hivemind. AWS S3 (and compatible) file storage patterns.
S3 File Storage fits situations like: implementing file uploads; document management; any cloud file storage.
Run `npx skills add cohen-liel/hivemind --skill s3-file-storage -a claude-code`. Or copy the skill folder (.claude/skills/s3-file-storage in cohen-liel/hivemind) into .claude/skills/s3-file-storage in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cohen-liel/hivemind --skill s3-file-storage -a codex`. Or copy the skill folder (.claude/skills/s3-file-storage in cohen-liel/hivemind) into .agents/skills/s3-file-storage in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cohen-liel/hivemind --skill s3-file-storage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/s3-file-storage, .gemini/skills/s3-file-storage, .github/skills/s3-file-storage and .opencode/skills/s3-file-storage in your project.
Going by SKILL.md and its folder, S3 File Storage needs credentials named AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Our summary lists: Python 3; A credential in AWS_SECRET_ACCESS_KEY.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
S3 File Storage is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with S3 File Storage: Processing S3 Uploads With Step Functions (aws/agent-toolkit-for-aws, 2.8k stars), S3 User Files (aws-samples/sample-host-openclaw-on-amazon-bedrock-agentcore, 177 stars), Django Storages for S3 (Jeffallan/claude-skills, 12k stars) and Neon Object Storage (neondatabase/agent-skills, 100 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
cohen-liel (a GitHub user) maintains it in cohen-liel/hivemind, which has 110 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on April 18, 2026.
Source: cohen-liel/hivemind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.