agentleFS
Mark-LifeMark-Life/agent-skills/skills/coding-workflows/media-cdn/SKILL.md

media-cdn

Skill4 starsChanged 6 days agoMITView on GitHub

Use for public file uploading: when a screenshot, GIF, or video has to be embedded in a PR, issue, doc, or message.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default output is one tab-separated line per asset, built for cut -f:

    line 34

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

Media CDN

scripts/cdn.ts covers every asset operation the service exposes: a private object store where each asset flips to a public CDN URL and back. Run it with Bun (preferred) or Node >= 22.18, from the skill's scripts/ dir:

bun cdn.ts upload ~/Downloads/diagram.png --public

Commands

CommandWhat it does
upload <file...> [--public] [--folder p] [--name f] [--type mime]Reserve, PUT bytes, mark ready, then publish when --public is given. Folder defaults to asset; --folder "" is the root. SHA-256 is checked server-side, so a truncated upload fails instead of storing a broken file. Each upload makes a new asset, even for a filename already in the workspace — list --match <name> first when replacing something, then publish the new id.
list [--folder p] [--match s] [--public|--private] [--limit n]Every asset in the workspace, filtered client-side.
get <ref>One asset, with its public URL when published.
publish <ref> / unpublish <ref>Turn the public CDN URL on or off. Reversible either way.
download <ref> [--out path]Writes the bytes to --out, or to the asset's filename in the cwd. Sends the API key, so it reaches private assets too.
whoamiWorkspace id, token name, scopes — run this first when a call fails with 401 or 403.

<ref> is an asset id or a case-insensitive filename substring matching exactly one asset; ambiguity prints the candidates and exits 1.

Credentials

MEDIA_CDN_API_URL and MEDIA_CDN_API_KEY come from ~/.agents/.env.local, overridden by the process environment, overridden by --env <path> on any command. Report error: MEDIA_CDN_API_URL and MEDIA_CDN_API_KEY must be set … to the user as a setup gap and stop — keys are theirs to add. Keep the key out of chat, out of logs, and out of any file you write.

Output contract

Default output is one tab-separated line per asset, built for cut -f:

<id>\t<public-url or ->\t<filename>                       # upload, get, publish, unpublish
<id>\t<public-url or ->\t<filename>\t<bytes>\t<folder>    # list

Errors go to stderr as error: <message> (<code>) with exit 1. Add --json for the full API shape — when you need mimeType, versionId, createdAt, or upload status, and when the user asks about an asset. When they asked for a link, the URL alone is the answer.

Guardrails

  • Publishing puts the file on the open internet at an unauthenticated URL. Publish what the user asked to publish; for anything else — screenshots of dashboards, exports, logs — upload private and ask before adding --public.
  • This deployment has no delete route. delete <ref> gets a 405 and tells the user to unpublish instead. Treat every upload as permanent and say so before uploading anything sensitive.

Done when the id and URL you report came from the command's own output, and — for anything published — a curl -sS -o /dev/null -w '%{http_code}' "<url>" with no Authorization header returned 200.

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.