Awesome-omni-skill giil
Get Image [from] Internet Link - Zero-setup CLI for downloading full-resolution images from iCloud, Dropbox, Google Photos, and Google Drive share links. Four-tier capture strategy, browser automation, HEIC conversion, album support. Node.js/Playwright.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/giil" ~/.claude/skills/diegosouzapw-awesome-omni-skill-giil && rm -rf "$T"
skills/development/giil/SKILL.mdGIIL — Get Image [from] Internet Link
A zero-setup CLI that downloads full-resolution images from cloud photo shares. The missing link between your iPhone screenshots and remote AI coding sessions.
Why This Exists
The primary use case: Remote AI-Assisted Debugging
You're SSH'd into a remote server running Claude Code, Codex, or another AI assistant. You need to debug a UI issue on your iPhone, but how do you get that screenshot to your remote terminal?
Without giil:
Download image locally → SCP to server → Tell AI the path Email yourself → Download on server → Hope it works Set up complex file sync between devices
With giil:
giil "https://share.icloud.com/photos/0a1Abc_xYz..." --format json # {"path": "/tmp/icloud_20240115_143022.jpg", "width": 1170, ...}
One command. AI sees it instantly. No file transfers, no context switching.
The Workflow
iPhone Screenshot → iCloud Sync → Photos.app Share Link → Paste to SSH → giil Downloads → AI Analyzes
Why Cloud Shares Are Hard
| Problem | Why It's Hard | How giil Solves It |
|---|---|---|
| JavaScript-heavy SPAs | Standard curl/wget can't execute JS | Headless Chromium via Playwright |
| Dynamic image loading | Images load asynchronously from CDN | Network interception captures CDN responses |
| No direct download links | URLs are session-specific and expire | Clicks Download button or intercepts live requests |
| Copy/paste loses quality | Manual screenshots compress images | Captures original resolution from source |
| HEIC format on Apple | Many tools can't process HEIC/HEIF | Platform-aware conversion (sips/heif-convert) |
Quick Start
# Install curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/giil/main/install.sh?v=3.0.0" | bash # Download single image giil "https://share.icloud.com/photos/02cD9okNHvVd-uuDnPCH3ZEEA" # JSON output (best for AI workflows) giil "https://share.icloud.com/photos/..." --format json # Download entire album giil "https://share.icloud.com/photos/..." --all --output ~/album
Note: First run downloads Playwright Chromium (~200MB, cached in
~/.cache/giil/).
Supported Platforms
| Platform | URL Patterns | Method | Browser Required |
|---|---|---|---|
| iCloud | , | 4-tier capture strategy | Yes |
| Dropbox | , | Direct curl () | No |
| Google Photos | , | URL extraction + modifier | Yes |
| Google Drive | , | Multi-tier with auth detection | Yes |
Dropbox Fast Path: Direct curl download with no browser overhead—typically 1-2 seconds.
Google Photos Full-Res: Automatically appends
=s0 to CDN URLs for maximum resolution.
Four-Tier Capture Strategy
giil implements a fallback strategy to maximize reliability:
1. Download Button (Highest Quality)
- Locates visible Download button using 9 selector patterns
- Clicks and waits for browser download event
- Obtains original file (no re-encoding losses)
- Works with HEIC/HEIF originals
2. Network Interception (Full Resolution)
- Monitors all HTTP responses for CDN patterns (
, etc.)cvws.icloud-content.com - Filters by content-type (image formats only)
- Captures largest image buffer (>10KB threshold to skip thumbnails)
- Works even if UI elements are obscured
3. Element Screenshot
- Queries for image elements using 10 selector patterns
- Verifies element is visible and ≥100×100 pixels
- Takes PNG screenshot of the element
4. Viewport Screenshot (Last Resort)
- Captures visible viewport (1920×1080)
- Always succeeds if page loads
- Useful for debugging page state
Command Reference
Basic Usage
giil <url> [options]
Options
| Flag | Default | Description |
|---|---|---|
| | Output directory |
| off | Keep original bytes (skip MozJPEG compression) |
| — | Convert to: , , |
| | JPEG quality 1-100 |
| — | Structured output format: or |
| off | Output base64 to stdout (no file saved) |
| off | Output JSON metadata (alias for ) |
| off | Download all photos from album |
| | Page load timeout in seconds |
| off | Save debug artifacts on failure |
| off | Show detailed progress |
| off | Enable Playwright tracing for deep debugging |
| off | Output resolved CDN URL (don't download) |
| | Directory for debug artifacts |
| off | Force reinstall dependencies |
Output Modes
Default: File Path
giil "https://share.icloud.com/photos/XXX" # stdout: /current/dir/icloud_20240115_143245.jpg
Scripting:
IMAGE_PATH=$(giil "..." --output ~/Downloads 2>/dev/null)
JSON Mode (--format json
or --json
)
--format json--jsongiil "https://share.icloud.com/photos/XXX" --format json
Success:
{ "ok": true, "schema_version": "1", "platform": "icloud", "path": "/absolute/path/to/icloud_20240115_143245.jpg", "datetime": "2024-01-15T14:32:45.000Z", "sourceUrl": "https://cvws.icloud-content.com/...", "method": "network", "size": 245678, "width": 4032, "height": 3024 }
Error:
{ "ok": false, "schema_version": "1", "platform": "icloud", "error": { "code": "AUTH_REQUIRED", "message": "Login required - link is not publicly shared", "remediation": "The file is not publicly shared. The owner must enable public access." } }
| Field | Description |
|---|---|
| Capture strategy: , , , , |
| Error code (see Exit Codes) |
| Suggested fix |
TOON Mode (--format toon
)
--format toongiil "https://share.icloud.com/photos/XXX" --format toon
Outputs the same metadata envelope as JSON, but encoded as TOON. Requires the
tru binary from toon_rust.
Base64 Mode
# Decode to file giil "..." --base64 | base64 -d > image.jpg # Create data URI echo "data:image/jpeg;base64,$(giil '...' --base64)" > uri.txt # Pipe to API giil "..." --base64 | curl -X POST -d @- https://api.example.com/upload
URL-Only Mode
giil "https://share.icloud.com/photos/XXX" --print-url # stdout: https://cvws.icloud-content.com/B/...
Useful for external downloaders, caching, or debugging.
Album Mode
Download entire shared albums with
--all:
giil "https://share.icloud.com/photos/XXX" --all --output ~/album
How It Works
- Load album page
- Detect thumbnail grid (11 selector strategies)
- For each thumbnail: click → capture → close → next
- Output one path/JSON per photo
Album Features
- Resilient: Continues to next photo if one fails
- Indexed filenames:
,_001
, etc. for ordering_002 - Rate limiting: 1 second delay between photos (polite downloading)
- Exponential backoff: Automatic retry on rate limit signals
Album Output
# Default /path/to/album/icloud_20240115_143245_001.jpg /path/to/album/icloud_20240115_143246_002.jpg # With --format json (or --json) {"path": "...001.jpg", "method": "download", "width": 4032, ...} {"path": "...002.jpg", "method": "network", "width": 3024, ...} # With --format toon ok: true path: ...001.jpg method: download width: 4032 ok: true path: ...002.jpg method: network width: 3024
Image Processing Pipeline
EXIF Datetime Extraction
Priority order for filename generation:
(when photo was taken)DateTimeOriginalCreateDateDateTimeDigitizedModifyDate- Current time (fallback)
HEIC/HEIF Conversion
| Platform | Tool | Notes |
|---|---|---|
| macOS | | Built-in, always available |
| Linux | | Requires package |
# Install HEIC support on Linux sudo apt-get install libheif-examples # Debian/Ubuntu sudo dnf install libheif-tools # Fedora
MozJPEG Compression (Default)
By default, giil compresses with MozJPEG for optimal size/quality:
- 40-50% smaller than standard JPEG at equivalent quality
- Quality 85 (configurable via
)--quality - Use
to keep original bytes--preserve
Filename Format
icloud_YYYYMMDD_HHMMSS[_NNN][_counter].jpg │ │ │ │ │ └── Collision counter (if file exists) │ └── Album index (--all mode only) └── Date/time from EXIF or capture time
Download Verification
giil validates downloads through three stages:
1. Content-Type Validation
Validates HTTP
Content-Type matches expected image types.
2. Magic Bytes Detection
Verifies binary signature regardless of server claims:
| Format | Magic Bytes |
|---|---|
| JPEG | |
| PNG | |
| GIF | |
| WebP | RIFF container with WEBP |
| HEIC/HEIF | ISO base media file (ftyp box) |
3. HTML Error Page Detection
Rejects HTML content that indicates an error page instead of an image.
Exit Codes
| Code | Name | Description |
|---|---|---|
| Success | Image captured and saved/output |
| Capture Failure | All capture strategies failed |
| Usage Error | Invalid arguments or missing URL |
| Dependency Error | Node.js, Playwright, or Chromium issue |
| Network Error | Timeout, DNS failure, unreachable host |
| Auth Required | Login redirect, password required, not publicly shared |
| Not Found | Expired link, deleted file, 404 |
| Unsupported Type | Video, Google Doc, or non-image content |
| Internal Error | Bug in giil (please report!) |
Scripting:
giil "https://share.icloud.com/photos/XXX" 2>/dev/null case $? in 0) echo "Success!" ;; 10) echo "Network issue - retry later" ;; 11) echo "Link not public - ask owner to share" ;; 12) echo "Link expired" ;; *) echo "Failed with code $?" ;; esac
Environment Variables
Runtime Variables
| Variable | Description | Default |
|---|---|---|
| Base cache directory | |
| giil runtime directory | |
| Custom Chromium cache | |
| Disable gum styling | unset |
| Enable update checking | unset |
Installer Variables
| Variable | Description | Default |
|---|---|---|
| Custom install directory | |
| Install to | unset |
| Verify SHA256 checksum | unset |
| Install specific version | latest |
File Locations
| Path | Purpose |
|---|---|
| Main script |
| Runtime directory |
| Playwright, Sharp, exifr |
| Generated Node.js script |
| Chromium browser cache |
Debug Artifacts (on failure with --debug
)
--debug| File | Contents |
|---|---|
| Full-page screenshot |
| Page DOM content |
Performance
| Phase | First Run | Subsequent |
|---|---|---|
| Chromium download | 30-60s | Skipped (cached) |
| Browser launch | 2-3s | 2-3s |
| Page load | 3-10s | 3-10s |
| Image capture | 1-5s | 1-5s |
| Total | 40-80s | 5-15s |
Dropbox: 1-2 seconds (direct curl, no browser).
Troubleshooting
"Auth required" error
The link isn't publicly shared. Owner must enable public access in their cloud settings.
Timeout errors
Increase timeout:
giil "..." --timeout 120
Wrong/small image captured
Run with
--debug to see page state. Report issue with debug artifacts.
HEIC conversion fails on Linux
sudo apt-get install libheif-examples # Debian/Ubuntu sudo dnf install libheif-tools # Fedora
Chromium fails to launch
giil "..." --update # Or manually: cd ~/.cache/giil && npx playwright install --with-deps chromium
Debugging
# Verbose output giil "..." --verbose # Debug artifacts on failure giil "..." --debug # Playwright trace (generates trace.zip) giil "..." --trace npx playwright show-trace ~/.cache/giil/trace.zip
Installation
# One-liner (recommended) curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/giil/main/install.sh?v=3.0.0" | bash # Verified installation GIIL_VERIFY=1 curl -fsSL .../install.sh | bash # System-wide GIIL_SYSTEM=1 curl -fsSL .../install.sh | bash # Manual curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/giil/main/giil -o ~/.local/bin/giil chmod +x ~/.local/bin/giil
Uninstallation
rm ~/.local/bin/giil rm -rf ~/.cache/giil rm -rf ~/.cache/ms-playwright # If no other Playwright tools
Security & Privacy
- Local execution: All processing happens on your machine
- No telemetry: No data sent anywhere except to cloud services
- No authentication stored: Uses public share mechanism
- No cookies saved: Browser context is ephemeral
- Temp file cleanup: Downloaded files cleaned up after processing
Integration with Flywheel
| Tool | Integration |
|---|---|
| Claude Code | Download screenshots for visual debugging via SSH |
| NTM | Share images between multi-agent sessions |
| Agent Mail | Attach downloaded images to agent messages |
| CASS | Search sessions that used giil for image context |