Logo Get
You are about to fetch verified company logos for: $ARGUMENTS.
You are a foreman dispatching parallel sub-agents — one per company. Each sub-agent independently searches, downloads, verifies, and saves a single logo. You coordinate, batch user prompts, and produce a final summary table.
Argument Parsing
Parse $ARGUMENTS as follows:
- Detect optional
--out <path>flag (anywhere in the string). Strip it; resolve<path>to an absolute path. Default:./logos/in the current working directory. - Treat the remainder as a comma-separated list of company names. Trim whitespace from each entry. Empty entries are skipped.
- If zero company names parse out, ask the user for input via
AskUserQuestionand stop.
Create the output directory if it doesn't exist (mkdir -p).
Step 1 — Disambiguation Pass
Before dispatching any sub-agents, scan the company list with your own judgment:
- For each name, decide: is there a clearly-dominant commercial entity? (e.g. "apple" → Apple Inc, "google" → Google LLC, "stripe" → Stripe Inc — yes. "acme" → no. "delta" → ambiguous: Delta Air Lines, Delta Faucet, Delta Dental.)
- For genuinely-ambiguous names, batch them into ONE
AskUserQuestioncall with one question per ambiguous name. For each, present 3–5 plausible options + an "other (specify)" choice. - Use the user's qualified answers as the canonical company name for the rest of the run.
Skip this step entirely if no names are ambiguous.
Step 2 — Dispatch Sub-Agents (parallel waves of 8)
Dispatch one Agent per company in parallel waves of 8 max (single message with up to 8 Agent tool calls). Wait for the wave to complete before dispatching the next.
Each Agent call uses subagent_type: general-purpose and gets a self-contained prompt — see Sub-Agent Prompt Template below. Interpolate {{COMPANY}}, {{OUT_DIR}}, {{MODE}} per call.
Track which sub-agent corresponds to which company so you can attribute results in the final summary.
Step 3 — Aggregate Results
Each sub-agent returns a structured report:
status: ok | needs_soft_fallback | failed
path: <absolute path to saved file, or null>
note: <≤120 chars: tier hit, dimensions, format, variant — OR — reason for failure>
Categorize by status. If any are needs_soft_fallback, ask the user once via AskUserQuestion:
Strict verification failed for: <company list>. Show weaker matches for these (current-ish logos with approximately correct colors, possibly icon-only)? Pick which to retry.
For each name the user approves, dispatch a fresh sub-agent in soft mode (parallel wave, cap 8). Merge results.
Step 4 — Final Summary
Print to the user:
Saved to: <absolute output directory>
apple ✓ apple.svg (Tier 3 Wikipedia, SVG)
google ✓ google.png (Tier 1 website, 800×272 PNG, wordmark)
acme-corp ⚠ needs soft fallback (only outdated logo found) → user declined
zorp ✗ no qualifying logo found
Sub-Agent Prompt Template
Pass the following self-contained prompt to each sub-agent. Interpolate {{COMPANY}} (qualified company name), {{OUT_DIR}} (absolute output dir), {{SLUG}} (lowercased, spaces and & → -, other punctuation stripped, but preserve . for .ai/.io domains, e.g. JP Morgan → jp-morgan, Adopt.ai → adopt-ai), {{MODE}} (strict or soft):
Your job: fetch ONE verified logo for the company **{{COMPANY}}**.
Output directory (absolute): {{OUT_DIR}}
Create it if it doesn't exist.
Mode: {{MODE}}
WORKFLOW (try tiers in order, stop at first verified success):
**Tier 1 — Company website header / press kit**
1. Determine the official website URL using your own knowledge (e.g. "Apple" → https://www.apple.com, "JP Morgan" → https://www.jpmorganchase.com).
2. WebFetch the homepage. Look for the primary logo in the HTML — usually inside <header>, <nav>, or an element with class/id containing "logo". Resolve relative URLs to absolute.
3. Many companies link to a press kit, brand assets, or media page (look for /press, /brand, /media, /about, /trust, footer links). Follow them — they often have the highest-quality wordmark.
4. Download with: curl -L -A "Mozilla/5.0" -o /tmp/{{SLUG}}_candidate_N.<ext> "<url>" (use the right extension based on URL or content-type)
5. Check size: sips -g pixelWidth -g pixelHeight <file>. REJECT if either dimension < 100. Skip the size check for SVG (vector, infinitely scalable).
6. If the homepage WebFetch fails or no logo is found, do ONE retry: WebSearch for "{{COMPANY}} official site", grab the top result's domain, retry from step 2.
**Tier 2 — DuckDuckGo image search**
1. WebFetch https://duckduckgo.com/?q={{URL-encoded COMPANY}}+logo&iax=images&ia=images
2. If the first query returns weak results, try variants: "{{COMPANY}} logo png wordmark", "{{COMPANY}} brand assets", "{{COMPANY}} press kit logo".
3. Extract up to 5 candidate image URLs. Download, size-check, verify each.
**Tier 3 — Wikipedia infobox**
1. WebFetch https://en.wikipedia.org/wiki/{{COMPANY with spaces as underscores}}
2. If the page is a disambiguation page or 404, try variants: `{{Company}}_(company)`, `{{Company}}_Inc`.
3. Locate the infobox image (typically the first image inside `.infobox`). Download, size-check.
**VERIFICATION** — after each successful download, use the `Read` tool to view the image (you can see images directly).
**Strict mode** — REJECT the candidate if any of these fail:
- **Identity**: unmistakably {{COMPANY}}'s logo (not a competitor, fan art, meme, or a different company with a similar name).
- **Currency**: the current logo per your knowledge cutoff (not a clearly-outdated version).
- **Color fidelity**: brand colors match what you know.
- **Variant**: prefer the FULL WORDMARK or LOCKUP (icon + text) over icon-only. If only icon-only is findable in strict mode, return `needs_soft_fallback` rather than `ok`.
**Soft mode** — REJECT only if:
- Identity is wrong (different company, fan art, meme).
- Tolerate outdated-but-recognizable variants, minor color shifts (JPEG compression, lighting), and icon-only when no wordmark exists.
If verified: rename `/tmp/{{SLUG}}_candidate_N.<ext>` to `{{OUT_DIR}}/{{SLUG}}.<ext>`. If a file with that name already exists, increment: `{{SLUG}}-2.<ext>`, `{{SLUG}}-3.<ext>`, etc.
REPORT — return ONE message in exactly this format (no extra prose):
status: ok | needs_soft_fallback | failed
path: <absolute path to saved file, or null>
note: <≤120 chars: tier hit, dimensions, format, variant — OR — reason for failure>
Rules:
- Don't retry transient failures (timeouts, 5xx) — fall through to the next tier.
- Never save an unverified file.
- "No API" = no auth-required / paid APIs (e.g. Clearbit's logo API, Brandfetch's commercial API). Incidental hits on logo CDNs and aggregators (logo.dev, seeklogo.com, worldvectorlogo.com, etc.) discovered via image search are fine — they're just hosted images, not API calls.
- needs_soft_fallback = candidates exist but failed strict (icon-only when wordmark expected, outdated, color-shifted).
- failed = no candidates at all across all tiers.
Notes on Behavior
- Concurrency cap is real: do not exceed 8 sub-agents in flight at once.
- Don't over-fetch: if Tier 1 succeeds, the sub-agent stops there and does not try Tiers 2 or 3.
- Soft fallback is opt-in: never run soft mode without explicit user approval.
- Don't fabricate: if no logo can be verified, return
failedhonestly with a useful note.