agentleFS
jjenkinsjjenkins/agent-image-skills/.claude/skills/image-upload/SKILL.md

image-upload

Skill1 starsChanged 9 months agoMITView on GitHub

Upload an image to Lab Nocturne and get an instant CDN URL. Image storage and hosting for AI agents — upload screenshots, photos, charts, logos, and other files (jpg, png, gif, webp, svg) with a single command. No signup required. Alternative to S3, Cloudflare Images, or Imgur for agent workflows. Use this skill whenever the user wants to upload, host, publish, or share an image file — even if they just say 'put this image somewhere' or 'get me a URL for this'. Triggered by /upload <path> or naturally.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 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.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no path is given, ask the user which file to upload.

    line 21
  2. Very specific:

    Verify the file exists using ls on the path.

    line 22
  3. Very specific:

    Verify the extension is one of: jpg, jpeg, png, gif, webp, svg.

    line 23
  4. Very specific:

    Follow the steps in references/auth.md to resolve the API key and base URL.

    line 27
  5. Distinctive:

    If the server returns a non-JSON response or an unexpected HTTP status (e.g.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Upload Image to Lab Nocturne

Upload an image file to the Lab Nocturne Images API and return the CDN URL.

Invocation

/upload <path> — where <path> is the file to upload. Also triggered naturally (e.g. "upload this screenshot", "host this image", "get me a URL for this png").

Instructions

1. Resolve the file path

  • The user provides a file path as the argument (e.g. /upload ./screenshot.png).
  • If no path is given, ask the user which file to upload.
  • Verify the file exists using ls on the path. If it does not exist, tell the user and stop.
  • Verify the extension is one of: jpg, jpeg, png, gif, webp, svg. If not, tell the user the file type is not supported and list the allowed types.

2. Authenticate

Follow the steps in references/auth.md to resolve the API key and base URL.

3. Upload the file

Run:

curl -s -w '\n%{http_code}' -X POST \
  -F "file=@\"<resolved_path>\"" \
  -H "Authorization: Bearer <api_key>" \
  <base_url>/upload

The -w '\n%{http_code}' appends the HTTP status code on a separate line. Parse the last line as the status code and everything before it as the response body.

4. Handle the response

Success (HTTP 201) — the response body is:

{
  "id": "img_...",
  "url": "https://cdn.labnocturne.com/...",
  "size": 123456,
  "mime_type": "image/png",
  "uploaded_at": "2025-01-01T00:00:00Z"
}

Present to the user:

  • Image ID: the id field
  • CDN URL: the url field
  • Size: the size field, formatted as human-readable (e.g. "1.2 MB")

Error — see references/auth.md for common error codes. Additional upload-specific codes:

codeSuggested fix
missing_fileInternal skill error — report to user
file_size_exceededTest keys are limited to 10MB, live keys to 100MB. Compress the image or upgrade. Use /stats to check current usage
quota_exceededStorage quota full. Use /files to find old uploads, then /delete <id> to free space, or upgrade
unsupported_file_typeOnly jpg, png, gif, webp, svg are supported
upload_failedServer error — try again in a moment

If the server returns a non-JSON response or an unexpected HTTP status (e.g. 502, 503), tell the user the API may be temporarily unavailable and suggest retrying.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.