upload-image-s3
Skill0 starsChanged 8 months agoMITView on GitHub
Upload a local image file to S3-compatible storage (Cloudflare R2, AWS S3, MinIO, DigitalOcean Spaces) and return the public URL. Use whenever the user asks to "upload this image", "host this file", "get a public URL for X", "put this image online", "upload to R2", "upload to S3", or wants to make a local image accessible via URL. Works with any image file already on disk — use /generate-image-gemini first if the image needs to be generated.
In this repository2 other files it gives its agents.
- generate-image-geminiSkill
- image-gemini-s3Skill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
If the user provided an absolute path, use it directly.
- Distinctive: line 14
If they provided a relative path or just a filename, ask for the absolute path or resolve it based on the current context (e.g.
- Very specific: line 15
If they referenced "the last image" or "the one we just generated", use the file path from the most recent generate_image_gemini result in …
- Very specific: line 17
Verify the file exists: Before calling the tool, use a quick Bash call (test -f <path>) if there's any doubt — it's cheaper to fail fast …
- Very specific: line 20
Default: the tool auto-generates images/<timestamp>-<filename>.
- Very specific: line 21
If the user wants a specific path in the bucket (e.g.
- Very specific: line 24
Call the tool: Use mcp__mcp-media-toolkit__upload_image_s3 with file_path (and key if overriding).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upload Image to S3-Compatible Storage
Upload a local image file to the configured S3-compatible storage using the upload_image_s3 MCP tool and return the public URL.
Workflow
- Get the file path.
- If the user provided an absolute path, use it directly.
- If they provided a relative path or just a filename, ask for the absolute path or resolve it based on the current context (e.g. recently generated files, files in the current working directory).
- If they referenced "the last image" or "the one we just generated", use the file path from the most recent
generate_image_geminiresult in this conversation.
- Verify the file exists. Before calling the tool, use a quick
Bashcall (test -f <path>) if there's any doubt — it's cheaper to fail fast with a clear message than to wait for the MCP error. - Decide on a key (optional).
- Default: the tool auto-generates
images/<timestamp>-<filename>. Use this unless the user has a reason to override. - If the user wants a specific path in the bucket (e.g.
avatars/user-123.png), pass it askey. - Keys with slashes work fine — they become folder-like prefixes in the bucket.
- Default: the tool auto-generates
- Call the tool. Use
mcp__mcp-media-toolkit__upload_image_s3withfile_path(andkeyif overriding). - Report the URL. The tool returns the bucket, key, and public URL. Show the user the public URL prominently — that's what they actually need. Mention the bucket/key only if relevant.
Errors
- "S3 storage is not configured" — the user needs to set
S3_ENDPOINT,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEY,S3_BUCKET, andS3_PUBLIC_URLin their environment. Point them at the project README's Configuration section. - "File not found" — the path is wrong or the file was deleted. Ask the user to confirm the path.
- "S3 upload failed: Access Denied" — the credentials are wrong or the bucket doesn't allow uploads with that key. Tell the user to verify their API token permissions include
PutObjecton the target bucket. - "S3 upload failed: NoSuchBucket" — the bucket doesn't exist. Tell the user to create it or fix
S3_BUCKET.
Tips
- The public URL format is
S3_PUBLIC_URL + "/" + key. If the returned URL doesn't open in the browser, the issue is usually that the bucket isn't publicly readable or theS3_PUBLIC_URLis wrong — not the upload itself. - For R2: public access requires enabling "public bucket" in the Cloudflare dashboard OR setting up a custom domain bound to the bucket. Mention this if the user reports the URL returns a 403.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

