Utility to find and download images based on search queries.

Install

mkdir -p .claude/skills/download-image && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14241" && unzip -o skill.zip -d .claude/skills/download-image && rm skill.zip

Installs to .claude/skills/download-image

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Search for an image on the web and download it to ~/Downloads
61 charsno explicit “when” trigger
Beginner

Key capabilities

  • Search for images on the web using a browser subagent
  • Extract direct URLs of high-resolution images
  • Download images to the `~/Downloads` directory
  • Sanitize filenames based on search queries
  • Handle filename conflicts by appending timestamps
  • Determine file extensions from image URLs

How it works

The skill uses a browser subagent to find an image URL based on a search query, then employs `curl` to download the image to a specified directory, handling filename conflicts.

Inputs & outputs

You give it
A search query for an image
You get back
A downloaded image file in the `~/Downloads` directory and its file path

When to use Download Image

  • Find an image for a project
  • Download a stock photo
  • Search and save images programmatically

About this skill

Download Image Skill

This skill allows you to download an image from the internet based on a search query.

Instructions

When the user asks you to download an image based on a search query:

  1. Search and Extract Image URL:
    • Use the browser_subagent tool.
    • Pass the search query as part of the Task description. For example: "Search for '[Search Query]' on Google Images or Bing Images. Find a high resolution, clear, and relevant image. Extract and return the direct URL of the high-resolution image."
    • Set RecordingName to something like search_image_[keyword].
  2. Download the Image:
    • Once the browser_subagent returns the direct image URL, use the run_command tool to download it using curl to the ~/Downloads directory.
    • Construct the filename using the search query, replacing spaces with underscores or hyphens.
    • Conflict Resolution: Check if the file already exists (e.g., using [ -f "$filename" ] in bash). If it does, append the current timestamp to the filename before downloading.
    • Example bash snippet to handle downloading and renaming (you can run this directly with run_command):
      # Variables
      URL="<IMAGE_URL>"
      SEARCH_QUERY="<SEARCH_QUERY>"
      DIR="$HOME/Downloads"
      
      # Sanitize filename
      SAFE_NAME=$(echo "$SEARCH_QUERY" | tr ' ' '_')
      
      # Determine extension from URL, default to jpg
      EXT="${URL##*.}"
      # Keep extension simple if it contains query params
      EXT=$(echo "$EXT" | cut -d'?' -f1)
      if [[ ! "$EXT" =~ ^(jpg|jpeg|png|webp|gif|svg)$ ]]; then
          EXT="jpg"
      fi
      
      FILEPATH="$DIR/${SAFE_NAME}.${EXT}"
      
      # Conflict resolution
      if [ -f "$FILEPATH" ]; then
          TIMESTAMP=$(date +%Y%m%d%H%M%S)
          FILEPATH="$DIR/${SAFE_NAME}_${TIMESTAMP}.${EXT}"
      fi
      
      echo "Downloading to $FILEPATH"
      curl -s -L "$URL" -o "$FILEPATH"
      
  3. Confirm Execution: Let the user know the file has been downloaded and provide the final file path.

When not to use it

  • When the user does not want to download an image
  • When the task is not related to searching and downloading images from the internet
  • When the user requires image manipulation or editing

Limitations

  • The skill downloads images to the `~/Downloads` directory.
  • It relies on `curl` for downloading.
  • Filename sanitization and conflict resolution are implemented.

How it compares

This skill automates the process of searching for and downloading images from the web, including filename management and conflict resolution, which is more efficient than manual searching and saving.

Compared to similar skills

Download Image side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
Download Image (this skill)05moReviewBeginner
pptx3936moReviewAdvanced
nano-pdf633moReviewBeginner
video-downloader1017moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

pptx

anthropics

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

393763

nano-pdf

openclaw

Edit PDFs with natural-language instructions using the nano-pdf CLI.

63300

video-downloader

ComposioHQ

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

101255

youtube-transcript

michalparkola

Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.

68277

using-superpowers

obra

Use when starting any conversation - establishes mandatory workflows for finding and using skills, including using Skill tool before announcing usage, following brainstorming before coding, and creating TodoWrite todos for checklists

95205

browser-automation

browserbase

Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Triggers include "browse", "navigate to", "go to website", "extract data from webpage", "screenshot", "web scraping", "fill out form", "click on", "search for on the web". When taking actions be as specific as possible.

39230

Search skills

Search the agent skills registry