mcpField
L
lovstudio-find-logo

lovstudio-find-logo

github.com/lovstudioDesign & UI7376 installsUpdated today
Repository

About lovstudio-find-logo

A logo-collection skill for design work that takes a brand name or URL, checks Clearbit and the site’s metadata or favicon, then scores and archives a primary logo with alternate candidates. It includes a CLI script and stores source and image details in metadata.

Key features

  1. 01Logo lookup from name or URL
  2. 02Candidate scoring by format and dimensions
  3. 03Primary and alternate logo archiving
  4. 04JSON output for command chaining
  5. 05Metadata with sources and image details

Use cases

  1. 01Collect logos for a slide or poster
  2. 02Build a partner or press logo strip
  3. 03Download a brand logo from its URL

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/lovstudio/skills --skill lovstudio-find-logo

After installing, type/lovstudio-find-logoin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

.gitignore
CHANGELOG.md
README.md
scripts/
find_logo.py

Details

From the project README

find-logo — collect brand logos, prefer wide + transparent

Takes a brand name or URL, probes Clearbit + the site's own og:image / <link rel=icon> / favicon, scores each candidate, and archives the best one plus a couple of alternates into the configured collection directory.

When to Use

  • User asks to collect one or more brand logos for a slide/poster/site lineup
  • User names companies to drop into a partners/press strip
  • User gives a URL and wants its logo pulled down cleanly

Workflow (MANDATORY)

Step 1: Identify each brand

Accept any mix of names and URLs. If the user gave only a name with no obvious domain, ask — don't silently guess .com (script will guess, but for non-US or ambiguous brands that fails).

Use AskUserQuestion when:

  • Brand name is ambiguous (e.g. "Apple" = fruit vs. Inc.)
  • No URL and the domain isn't guessable (xAI → x.ai, not xai.com)
  • User gave a list without URLs
Step 2: Fetch — one brand per invocation
python3 scripts/find_logo.py --name "Anthropic" --url https://anthropic.com --json

For a batch, loop; the script is idempotent per <slug>/ (re-runs overwrite).

Step 3: Inspect score; fall back to WebSearch if needed
  • Exit code 0 → logo archived. The printed score is your quality signal:
    • ≥ 60 — solid: SVG or transparent PNG with wide/square aspect
    • 20–60 — usable: probably a favicon or small PNG
    • < 20 — weak: only ICO or tiny stub found
  • Exit code 2 / status: "no-candidates" → script found nothing. Do NOT give up. Use WebSearch for "<brand> logo svg site:*.com" or the brand's press-kit page, then re-invoke with --url <direct-image-url> is not supported — if you have a direct image URL, save it into the configured collection directory under <slug>/logo.<ext> and hand-write meta.json using the existing layout as a template.
Step 4: Report

Report back with the archive path and the primary's aspect + format. If the score is weak, tell the user and offer to retry with a specific press-kit URL or Wikipedia SVG.

CLI Reference

ArgumentDefaultDescription
--name—Brand/product name. Used for slug + meta.
--url—Official URL or bare domain. Overrides the name-based domain guess.
--slugslugified nameOverride the directory slug under the archive root.
--outLOVSTUDIO_FIND_LOGO_OUTPUT_DIR or ~/.lovstudio/logo-collectionArchive root.
--keep-alts2How many runner-up candidates to keep as alt-N.<ext>.
--jsonoffEmit a JSON result to stdout (use this when chaining).

At least one of --name or --url is required.

Archive Layout

~/.lovstudio/logo-collection/
├── anthropic/
│   ├── logo.png            # primary (highest score)
│   ├── alt-1.png           # runner-ups
│   ├── alt-2.png
│   └── meta.json           # sources, scores, dimensions, fetched_at
├── vercel/
│   ├── logo.png            # 1200x628 transparent banner
│   └── ...
└── stripe/
    ├── logo.svg
    └── ...

Scoring Heuristic (why a candidate wins)

  • Format: SVG (+40) > PNG (+20) > WebP (+10) > JPG (-10) > ICO (-20)
  • Transparency: +30 if alpha channel present (SVG always counts)
  • Aspect ratio: +25 for wide (≥2:1), +10 for landscape (≥1.3:1), -5 for square, -15 for tall/portrait
  • Short edge: +15 if ≥128px, +5 if ≥64px, -20 if <32px
  • Size sanity: -30 if payload <400 bytes (almost certainly a stub)

This matches the "prefer 长条形 + rgba" preference — wide transparent logos come out on top, square favicons land as alternates.

Dependencies

Stdlib only (urllib, html.parser, argparse). No pip install required.

User Configuration

Default archive files live under ~/.lovstudio/logo-collection/. Override this per run with --out, or set LOVSTUDIO_FIND_LOGO_OUTPUT_DIR for the skill.

Known Limits

  • The name → domain guess is a crude lowercase-strip + .com suffix. For anything not on .com, pass --url explicitly.
  • No Clearbit API key is used — we hit the unauthenticated endpoint, which covers most major brands but not all.
  • WebSearch fallback is Claude's responsibility, not the script's.

Comments

Markdown supported