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.
What this skill does
# GIIL — 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:**
```bash
giil "https://share.icloud.com/photos/0a1Abc_xYz..." --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
```bash
# 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/..." --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** | `share.icloud.com/photos/*`, `icloud.com/photos/#*` | 4-tier capture strategy | Yes |
| **Dropbox** | `dropbox.com/s/*`, `dropbox.com/scl/fi/*` | Direct curl (`raw=1`) | **No** |
| **Google Photos** | `photos.app.goo.gl/*`, `photos.google.com/share/*` | URL extraction + `=s0` modifier | Yes |
| **Google Drive** | `drive.google.com/file/d/*`, `drive.google.com/open?id=*` | 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 (`cvws.icloud-content.com`, etc.)
- 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
```bash
giil <url> [options]
```
### Options
| Flag | Default | Description |
|------|---------|-------------|
| `--output DIR` | `.` | Output directory |
| `--preserve` | off | Keep original bytes (skip MozJPEG compression) |
| `--convert FMT` | — | Convert to: `jpeg`, `png`, `webp` |
| `--quality N` | `85` | JPEG quality 1-100 |
| `--base64` | off | Output base64 to stdout (no file saved) |
| `--json` | off | Output JSON metadata |
| `--all` | off | Download all photos from album |
| `--timeout N` | `60` | Page load timeout in seconds |
| `--debug` | off | Save debug artifacts on failure |
| `--verbose` | off | Show detailed progress |
| `--trace` | off | Enable Playwright tracing for deep debugging |
| `--print-url` | off | Output resolved CDN URL (don't download) |
| `--debug-dir DIR` | `.` | Directory for debug artifacts |
| `--update` | off | Force reinstall dependencies |
## Output Modes
### Default: File Path
```bash
giil "https://share.icloud.com/photos/XXX"
# stdout: /current/dir/icloud_20240115_143245.jpg
```
**Scripting:**
```bash
IMAGE_PATH=$(giil "..." --output ~/Downloads 2>/dev/null)
```
### JSON Mode
```bash
giil "https://share.icloud.com/photos/XXX" --json
```
**Success:**
```json
{
"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:**
```json
{
"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 |
|-------|-------------|
| `method` | Capture strategy: `download`, `network`, `element-screenshot`, `viewport-screenshot`, `direct` |
| `error.code` | Error code (see Exit Codes) |
| `error.remediation` | Suggested fix |
### Base64 Mode
```bash
# 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
```bash
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`:
```bash
giil "https://share.icloud.com/photos/XXX" --all --output ~/album
```
### How It Works
1. Load album page
2. Detect thumbnail grid (11 selector strategies)
3. For each thumbnail: click → capture → close → next
4. Output one path/JSON per photo
### Album Features
- **Resilient:** Continues to next photo if one fails
- **Indexed filenames:** `_001`, `_002`, etc. for ordering
- **Rate limiting:** 1 second delay between photos (polite downloading)
- **Exponential backoff:** Automatic retry on rate limit signals
### Album Output
```bash
# Default
/path/to/album/icloud_20240115_143245_001.jpg
/path/to/album/icloud_20240115_143246_002.jpg
# With --json
{"path": "...001.jpg", "method": "download", "width": 4032, ...}
{"path": "...002.jpg", "method": "network", "width": 3024, ...}
```
## Image Processing Pipeline
### EXIF Datetime Extraction
Priority order for filename generation:
1. `DateTimeOriginal` (when photo was taken)
2. `CreateDate`
3. `DateTimeDigitized`
4. `ModifyDate`
5. Current time (fallback)
### HEIC/HEIF Conversion
| Platform | Tool | Notes |
|----------|------|-------|
| macOS | `sips` | Built-in, always available |
| Linux | `heif-convert` | Requires `libheif-examples` package |
```bash
# 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 JPRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".