Index of every page on this site: llms.txt
All skills
surgepix avatar

/surgepix-upload

@eb31c56
Run it yourself

Upload local files to SurgePix cloud storage and return a public HTTPS URL. Use when the user says "upload", "get a URL", "上传文件", "传到CDN", needs a remote-accessible URL for an API call, or wants to convert a local file path into a public link.

Use this Skill: https://skilld.dev/gh/surgepix/agent-skills/surgepix-upload

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈68 tokens for metadata: the name and description. ≈424 when used: this file.

Description uses 3.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈261 characters, or 3.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

SurgePix Upload

Upload a local file to SurgePix storage and get back a public CDN URL.

Language consistency

This skill does not generate on-image text. Reply to the user in the same language they used in their request.

When to use

  • User says "upload this file", "get a URL for this image", "上传", "传到线上"
  • Before calling any web API that needs a remote URL instead of a local path

Prerequisites

  • Node.js >= 18
  • SURGEPIX_API_KEY configured (see Step 0)

Workflow

Step 0: Check environment (required)

Before running upload, verify config:

node "<skills-dir>/surgepix-setup/scripts/check_env.mjs"
  • Exit 0 → proceed to Step 1
  • Exit 1 → follow surgepix-setup skill to configure .env, then retry

Do NOT check $SURGEPIX_API_KEY in shell — the script loads .env automatically.

Step 1: Identify the file

  • Get the absolute path to the local file
  • Confirm the file exists

Step 2: Run upload

node "<skills-dir>/surgepix-upload/scripts/file_upload.mjs" "<absolute-file-path>"

Step 3: Parse output

Success (stdout):

{"ok":true,"url":"<PUBLIC_URL>","filename":"photo.png","size":12345,"contentType":"image/png","existing":false}

Failure (stderr, non-zero exit):

{"ok":false,"error":"<ERROR>"}

If error is "API_KEY not found" → run surgepix-setup first.

Step 4: Use the URL

  • Show the url to the user
  • Pass it to any API that needs a remote file URL

Rules

  • ALWAYS run check_env before first use in a session
  • NEVER pass local paths to web APIs — upload first, use the returned URL
  • NEVER invent or guess a URL
  • NEVER echo auth tokens

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a utility to upload local files to SurgePix cloud storage. It includes scripts for environment configuration and chunked file uploading via HTTP POST requests to a user-defined base URL.

  • Socket2mo

    1 alert: gptAnomaly

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at eb31c56. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Activeupdated 3 months ago

README badge

README badge for surgepix/agent-skills/surgepix-upload