Claude Skill

lov-find-logo

Fetch a company/product logo from public sources (Clearbit, og:image, favicon) given a brand name or URL, score candidates (wide-aspect + transparent preferred), and archive the best + runner-ups to the configured logo collection directory. Trigger when the user says "find logo",

LLM Mart · 0 points · 12 views 0 listing impressions 0 install-command copies
Download lovstudio-skills-skills_find-logo-0b16007.zip · 11 KB
This skill couldn't be refreshed from GitHub on the last check — you're seeing the last imported snapshot.

Install

skills CLI npx skills add https://github.com/lovstudio/skills/tree/main/skills/find-logo
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lovstudio-skills@llmmart
Git git clone https://github.com/lovstudio/skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole lovstudio/skills collection as a plugin from our marketplace. Git is the plain clone.

README

Logo 雷达 · Logo Radar

Version

Fetch a brand/product logo from public sources (Clearbit, og:image, favicon), score candidates (prefer wide-aspect + transparent), and archive the winner plus alternates under ~/.skill-publisher/logo-collection/<slug>/.

Useful for building website partner strips, PPT footer rows, poster credits — anywhere you need a lineup of logos that look consistent.

Part of skills — by example.com

Install

npx skills add find-logo -g -y

Stdlib only — no pip install needed.

Usage

# by name
python3 scripts/find_logo.py --name "Anthropic"

# by URL (more reliable for non-.com or ambiguous brands)
python3 scripts/find_logo.py --name "xAI" --url https://x.ai

# machine-readable output for chaining
python3 scripts/find_logo.py --url https://stripe.com --json

Options

Option Default Description
--name — Brand/product name. Used for slug + meta.
--url — Official URL or bare domain. Overrides the name-based guess.
--slug slugified name Override the archive directory slug.
--out SKILL_FIND_LOGO_OUTPUT_DIR or ~/.skill-publisher/logo-collection Archive root.
--keep-alts 2 How many runner-up candidates to keep.
--json off Emit JSON to stdout.

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

What gets archived

~/.skill-publisher/logo-collection/<slug>/
├── logo.<ext>      # highest-scoring candidate
├── alt-1.<ext>     # runner-ups (count = --keep-alts)
├── alt-2.<ext>
└── meta.json       # brand, source URL per candidate, dims, format, alpha, score

How candidates are scored

Higher is better. Intended to bubble up wide-aspect + transparent logos so they line up cleanly next to each other.

Factor Points
Format SVG / PNG / WebP / JPG / ICO +40 / +20 / +10 / -10 / -20
Has alpha (transparent) +30
Aspect ≥ 2:1 (banner) +25
Aspect ≥ 1.3:1 (landscape) +10
Aspect ≈ 1:1 (square) -5
Aspect tall / portrait -15
Short edge ≥ 128 / ≥ 64 / < 32 px +15 / +5 / -20
Payload < 400 bytes (stub) -30

Sources probed, in order

  1. Clearbit Logo API — https://logo.clearbit.com/<domain> (unauthenticated tier).
  2. og:image / twitter:image + <link rel="icon"> — scraped from the brand's homepage. Usually wins because sites ship a proper share card.
  3. Google s2 favicon — https://www.google.com/s2/favicons?domain=<domain>&sz=256 as a safety net.

If all three fail, the script exits 2 with status: "no-candidates". The calling agent is expected to fall back to a web search for a press-kit page.

User Configuration

Archive files default to ~/.skill-publisher/logo-collection/. Override per call with --out, or set SKILL_FIND_LOGO_OUTPUT_DIR.

License

MIT

Skill manifest

Logo 雷达 · Logo Radar

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

Argument Default Description
--name — Brand/product name. Used for slug + meta.
--url — Official URL or bare domain. Overrides the name-based domain guess.
--slug slugified name Override the directory slug under the archive root.
--out SKILL_FIND_LOGO_OUTPUT_DIR or ~/.skill-publisher/logo-collection Archive root.
--keep-alts 2 How many runner-up candidates to keep as alt-N.<ext>.
--json off Emit a JSON result to stdout (use this when chaining).

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

Archive Layout

~/.skill-publisher/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 ~/.skill-publisher/logo-collection/. Override this per run with --out, or set SKILL_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.

Runtime context (shared)

运行前读取本 Skill 包的 skill.yaml,由宿主提供 skill-runtime/v1 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。

  • 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
  • required: true 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
  • 报错提供可复制的 context_id、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。

通用反馈闭环

用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:

  1. 先判断意见是 task-specific(仅本次)还是 reusable(可跨任务复用)。
  2. task-specific 只修改当前任务,不改 Skill。
  3. reusable 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
  4. 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
  5. reusable 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
Files (skills)
  • scripts
    • find_logo.py 12.4 KB
      Loading…
  • .gitignore 78 B · in bundle
  • CHANGELOG.md 484 B
    Loading…
  • README.md 3 KB
    # Logo 雷达 · Logo Radar
    
    ![Version](https://img.shields.io/badge/version-0.3.0-CC785C)
    
    Fetch a brand/product logo from public sources (Clearbit, og:image, favicon),
    score candidates (prefer wide-aspect + transparent), and archive the winner
    plus alternates under `~/.skill-publisher/logo-collection/<slug>/`.
    
    Useful for building website partner strips, PPT footer rows, poster
    credits — anywhere you need a lineup of logos that look consistent.
    
    Part of [skills](https://example.com/skills/skills) — by [example.com](https://example.com)
    
    ## Install
    
    ```bash
    npx skills add find-logo -g -y
    ```
    
    Stdlib only — no `pip install` needed.
    
    ## Usage
    
    ```bash
    # by name
    python3 scripts/find_logo.py --name "Anthropic"
    
    # by URL (more reliable for non-.com or ambiguous brands)
    python3 scripts/find_logo.py --name "xAI" --url https://x.ai
    
    # machine-readable output for chaining
    python3 scripts/find_logo.py --url https://stripe.com --json
    ```
    
    ## Options
    
    | Option | Default | Description |
    |--------|---------|-------------|
    | `--name` | — | Brand/product name. Used for slug + meta. |
    | `--url` | — | Official URL or bare domain. Overrides the name-based guess. |
    | `--slug` | slugified name | Override the archive directory slug. |
    | `--out` | `SKILL_FIND_LOGO_OUTPUT_DIR` or `~/.skill-publisher/logo-collection` | Archive root. |
    | `--keep-alts` | `2` | How many runner-up candidates to keep. |
    | `--json` | off | Emit JSON to stdout. |
    
    At least one of `--name` or `--url` is required.
    
    ## What gets archived
    
    ```
    ~/.skill-publisher/logo-collection/<slug>/
    ├── logo.<ext>      # highest-scoring candidate
    ├── alt-1.<ext>     # runner-ups (count = --keep-alts)
    ├── alt-2.<ext>
    └── meta.json       # brand, source URL per candidate, dims, format, alpha, score
    ```
    
    ## How candidates are scored
    
    Higher is better. Intended to bubble up **wide-aspect + transparent** logos
    so they line up cleanly next to each other.
    
    | Factor | Points |
    |--------|--------|
    | Format SVG / PNG / WebP / JPG / ICO | +40 / +20 / +10 / -10 / -20 |
    | Has alpha (transparent) | +30 |
    | Aspect ≥ 2:1 (banner) | +25 |
    | Aspect ≥ 1.3:1 (landscape) | +10 |
    | Aspect ≈ 1:1 (square) | -5 |
    | Aspect tall / portrait | -15 |
    | Short edge ≥ 128 / ≥ 64 / < 32 px | +15 / +5 / -20 |
    | Payload < 400 bytes (stub) | -30 |
    
    ## Sources probed, in order
    
    1. **Clearbit Logo API** — `https://logo.clearbit.com/<domain>` (unauthenticated tier).
    2. **og:image / twitter:image + `<link rel="icon">`** — scraped from the brand's homepage. Usually wins because sites ship a proper share card.
    3. **Google s2 favicon** — `https://www.google.com/s2/favicons?domain=<domain>&sz=256` as a safety net.
    
    If all three fail, the script exits `2` with `status: "no-candidates"`. The
    calling agent is expected to fall back to a web search for a press-kit page.
    
    ## User Configuration
    
    Archive files default to `~/.skill-publisher/logo-collection/`. Override per call with
    `--out`, or set `SKILL_FIND_LOGO_OUTPUT_DIR`.
    
    ## License
    
    MIT
    
  • SKILL.md 6.2 KB
    ---
    name: lov-find-logo
    description: >
      Fetch a company/product logo from public sources (Clearbit, og:image,
      favicon) given a brand name or URL, score candidates (wide-aspect +
      transparent preferred), and archive the best + runner-ups to
      the configured logo collection directory.
      Trigger when the user says "find logo", "找 logo", "抓 logo",
      "收集 logo", "brand asset", "需要 <brand> 的 logo",
      or wants logos laid out for a website/PPT/poster.
    license: MIT
    compatibility: >
      Requires Python 3.8+ (stdlib only — no pip deps).
      Cross-platform: macOS, Windows, Linux.
    metadata:
      author: contributors
      version: "0.3.0"
      tags: [branding, assets, logo, scraping]
    ---
    
    # Logo 雷达 · Logo Radar
    
    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
    
    ```bash
    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
    
    | Argument | Default | Description |
    |----------|---------|-------------|
    | `--name` | — | Brand/product name. Used for slug + meta. |
    | `--url` | — | Official URL or bare domain. Overrides the name-based domain guess. |
    | `--slug` | slugified name | Override the directory slug under the archive root. |
    | `--out` | `SKILL_FIND_LOGO_OUTPUT_DIR` or `~/.skill-publisher/logo-collection` | Archive root. |
    | `--keep-alts` | `2` | How many runner-up candidates to keep as `alt-N.<ext>`. |
    | `--json` | off | Emit a JSON result to stdout (use this when chaining). |
    
    At least one of `--name` or `--url` is required.
    
    ## Archive Layout
    
    ```
    ~/.skill-publisher/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 `~/.skill-publisher/logo-collection/`. Override this
    per run with `--out`, or set `SKILL_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.
    
    ## Runtime context (shared)
    
    运行前读取本 Skill 包的 `skill.yaml`,由宿主提供 `skill-runtime/v1` 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
    
    - 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
    - `required: true` 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
    - 报错提供可复制的 `context_id`、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。
    
    ## 通用反馈闭环
    
    用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
    
    1. 先判断意见是 `task-specific`(仅本次)还是 `reusable`(可跨任务复用)。
    2. `task-specific` 只修改当前任务,不改 Skill。
    3. `reusable` 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
    4. 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
    5. `reusable` 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
    
  • skill.yaml 832 B
    Loading…

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.