mcpField
S
social-to-imgur

social-to-imgur

github.com/gkwaCreative & media074 installsUpdated 1d ago
Repository

About social-to-imgur

A workflow skill for turning thumbnails from social-media URLs into permanent Imgur image links. It guides the user through thumbnail retrieval, download checks, and anonymous upload using an Imgur Client ID stored in the macOS keychain.

Key features

  1. 01Extracts thumbnails with yt-dlp
  2. 02Downloads and verifies JPEG files
  3. 03Reads Imgur Client ID from macOS keychain
  4. 04Uploads images to Imgur
  5. 05Returns the permanent image URL

Use cases

  1. 01Creating a durable image link from an Instagram URL
  2. 02Uploading a video thumbnail from a yt-dlp-supported platform
  3. 03Diagnosing an upload failure with the API response

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/gkwa/volcanicviper --skill social-to-imgur

After installing, type/social-to-imgurin Claude Code to confirm it loaded.

Bundled filestile.json

Details

From the project README

Requirements

  • uvx (comes with uv) — used to run yt-dlp without installing it
  • Imgur Client ID stored in the macOS keychain under service name imgur-api

Getting a new Imgur Client ID

Register a new application at https://api.imgur.com/oauth2/addclient

Choose "OAuth 2 authorization without a callback URL" as the authorization type.

The Client ID is shown immediately after registration — no secret is needed for anonymous uploads.

Installing the Client ID in the keychain

Store the Client ID in the macOS keychain using the service name imgur-api:

security add-generic-password -s imgur-api -a "$USER" -w "your_client_id_here"

To verify it was stored correctly:

security find-generic-password -s imgur-api -w

To update an existing entry:

security add-generic-password -U -s imgur-api -a "$USER" -w "your_client_id_here"

Social to Imgur Workflow

When the user shares a social media URL (Instagram, Facebook, or any yt-dlp-supported platform) and wants a permanent image URL, follow these steps.

Step 1: Get the thumbnail URL
uvx yt-dlp --get-thumbnail "<post_url>"

Save the output — it is the expiring CDN URL for the cover image.

Step 2: Download the image

Generate a random temp filename:

mktemp /tmp/social_XXXXXX.jpg

Use the path it returns for all subsequent steps.

curl -sL "<thumbnail_url>" -o "<tempfile>"

Verify it is a JPEG:

file "<tempfile>"

If the file is not a JPEG, stop and tell the user what file type was returned.

Step 3: Upload to Imgur

Fetch the Client ID from the macOS keychain:

security find-generic-password -s imgur-api -w

If the command fails, stop and tell the user to add the Client ID to the keychain:

security add-generic-password -s imgur-api -a "$USER" -w "your_client_id_here"

Upload:

curl -s -X POST -H "Authorization: Client-ID <client_id>" -F "image=@<tempfile>" https://api.imgur.com/3/image
Step 4: Extract and return the URL

Parse the JSON response and extract the link field.

Print the permanent Imgur URL to the user.

If the upload fails, show the full API response so the user can debug.

Comments

Markdown supported