agentleFS
alanalvestechalanalvestech/hitank/skills/cloudinary/SKILL.md

cloudinary

Skill38 starsChanged 8 months agoMITView on GitHub

Manage Cloudinary media assets, transformations and upload via REST API

  • Reads credentials

The file

We split this skill into the rules it gives an agent

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

  • 2

    Very specific

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

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

    If the output is OK, proceed to the Flow section.

    line 35
  2. Very specific:

    If the output is SETUP_NEEDED, guide the user step by step.

    line 37
  3. Distinctive:

    If the script outputs an error, the credentials are invalid.

    line 54
  4. Distinctive:

    Ask: "Do you want to upload this image?" Show the URL and target public ID.

    line 96

≈ “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

/cloudinary

Connect to the Cloudinary REST API to manage media assets, folders, transformations, uploads and usage stats. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb             # Basic auth (api_key:api_secret) + cloudinary_request helper (required by all scripts)
├── check_setup.rb      # Check if credentials exist (outputs OK or SETUP_NEEDED)
├── save_token.rb       # Save and validate cloud name, API key and API secret
├── resources.rb        # List image resources
├── resource.rb         # Get single image details
├── upload.rb           # Upload image from URL
├── delete.rb           # Delete a resource by public ID
├── folders.rb          # List root folders
├── subfolders.rb       # List subfolders of a folder
├── transformations.rb  # List named transformations
└── usage.rb            # Get account usage stats

Setup (check before using)

ruby ~/.claude/skills/cloudinary/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user for their Cloudinary credentials:

You need your Cloudinary Cloud Name, API Key and API Secret.

Go to the Cloudinary Console Dashboard: https://console.cloudinary.com/settings/api-keys

Copy the Cloud Name, API Key and API Secret and paste them here (all three, separated by spaces).

Step 2 — When the user pastes the credentials, save them:

ruby ~/.claude/skills/cloudinary/scripts/save_token.rb 'CLOUD_NAME' 'API_KEY' 'API_SECRET'

If the script outputs an error, the credentials are invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain a public ID or folder name.

Step 1: List resources or folders

List image resources:

ruby ~/.claude/skills/cloudinary/scripts/resources.rb
ruby ~/.claude/skills/cloudinary/scripts/resources.rb --type upload
ruby ~/.claude/skills/cloudinary/scripts/resources.rb --type fetch
ruby ~/.claude/skills/cloudinary/scripts/resources.rb --prefix my_folder

List root folders:

ruby ~/.claude/skills/cloudinary/scripts/folders.rb

List subfolders:

ruby ~/.claude/skills/cloudinary/scripts/subfolders.rb FOLDER

Present the results to the user. If $ARGUMENTS matches a public ID, jump to Step 2. If it matches a folder, show its contents.

Step 2: Show resource details

ruby ~/.claude/skills/cloudinary/scripts/resource.rb PUBLIC_ID

Present the resource info (format, dimensions, size, URL, tags, etc.) and ask what the user wants to do.

Step 3: Actions

Upload image from URL (requires user confirmation):

Ask: "Do you want to upload this image?" Show the URL and target public ID. Only execute after a "yes".

ruby ~/.claude/skills/cloudinary/scripts/upload.rb --url 'https://example.com/image.jpg' --public_id 'my_image'

Delete a resource (requires user confirmation):

Show the resource details first, then ask: "Do you want to delete this resource?" Only execute after a "yes".

ruby ~/.claude/skills/cloudinary/scripts/delete.rb PUBLIC_ID

List transformations:

ruby ~/.claude/skills/cloudinary/scripts/transformations.rb

Get account usage stats:

ruby ~/.claude/skills/cloudinary/scripts/usage.rb

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via HTTP Basic with api_key:api_secret
  • Config files: ~/.config/cloudinary/cloud_name, ~/.config/cloudinary/api_key, ~/.config/cloudinary/api_secret (outside the repo, never commit)
  • Uploading and deleting resources require explicit user confirmation
  • Base URL: https://api.cloudinary.com/v1_1/{cloud_name}

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.