lov-find-logo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLogo 雷达 · Logo Radar
Logo 雷达 · Logo Radar
Takes a brand name or URL, probes Clearbit + the site's own og:image /
/ favicon, scores each candidate, and archives the best
one plus a couple of alternates into the configured collection directory.
<link rel=icon>输入品牌名称或 URL,探测 Clearbit 以及网站自身的 og:image / / favicon,对每个候选结果进行评分,并将最佳结果和另外两个备选结果归档到已配置的收藏目录。
<link rel=icon>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
- 用户要求为幻灯片、海报或网站中的品牌展示区收集一个或多个 Logo
- 用户指定公司名称,用于制作合作伙伴或媒体展示区域
- 用户提供 URL,并希望干净地下载其 Logo
Workflow (MANDATORY)
工作流(必须执行)
Step 1: Identify each brand
第 1 步:识别每个品牌
Accept any mix of names and URLs. If the user gave only a name with no obvious
domain, ask — don't silently guess (script will guess, but for non-US or
ambiguous brands that fails).
.comUse when:
AskUserQuestion- Brand name is ambiguous (e.g. "Apple" = fruit vs. Inc.)
- No URL and the domain isn't guessable (→
xAI, notx.ai)xai.com - User gave a list without URLs
可以接受名称和 URL 的任意组合。如果用户只提供了名称且没有明显的域名,应主动询问——不要擅自猜测 (脚本会进行猜测,但对非美国或名称有歧义的品牌会失败)。
.com出现以下情况时使用 :
AskUserQuestion- 品牌名称存在歧义(例如,“Apple”可能指水果,也可能指 Apple Inc.)
- 没有 URL 且域名无法可靠猜出(→
xAI,而不是x.ai)xai.com - 用户提供的是品牌列表,且其中不包含 URL
Step 2: Fetch — one brand per invocation
第 2 步:获取——每次调用处理一个品牌
bash
python3 scripts/find_logo.py --name "Anthropic" --url https://anthropic.com --jsonFor a batch, loop; the script is idempotent per (re-runs overwrite).
<slug>/bash
python3 scripts/find_logo.py --name "Anthropic" --url https://anthropic.com --json批量处理时,循环执行即可;脚本对每个 目录都是幂等的(重新运行会覆盖现有文件)。
<slug>/Step 3: Inspect score; fall back to WebSearch if needed
第 3 步:检查评分;必要时回退到 WebSearch
- Exit code → logo archived. The printed
0is your quality signal:score- — solid: SVG or transparent PNG with wide/square aspect
≥ 60 - — usable: probably a favicon or small PNG
20–60 - — weak: only ICO or tiny stub found
< 20
- Exit code /
2→ script found nothing. Do NOT give up. Usestatus: "no-candidates"forWebSearchor the brand's press-kit page, then re-invoke with"<brand> logo svg site:*.com"is not supported — if you have a direct image URL, save it into the configured collection directory under--url <direct-image-url>and hand-write<slug>/logo.<ext>using the existing layout as a template.meta.json
- 退出码 → Logo 已归档。输出的
0是质量信号:score- — 优质:SVG 或透明 PNG,具有宽幅或正方形宽高比
≥ 60 - — 可用:可能是 favicon 或小尺寸 PNG
20–60 - — 较弱:仅找到 ICO 或极小的占位图
< 20
- 退出码 /
2→ 脚本未找到任何内容。 不要放弃。使用status: "no-candidates"搜索WebSearch或查找品牌的 press-kit 页面。找到直接图片 URL 后,不支持通过"<brand> logo svg site:*.com"重新调用;请将图片保存到已配置收藏目录中的--url <direct-image-url>,并参照现有布局手动编写<slug>/logo.<ext>。meta.json
Step 4: Report
第 4 步:报告
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.
报告归档路径以及主 Logo 的宽高比和格式。如果评分较弱,应告知用户,并提供使用特定 press-kit URL 或 Wikipedia SVG 重试的选项。
CLI Reference
CLI 参考
| Argument | Default | Description |
|---|---|---|
| — | Brand/product name. Used for slug + meta. |
| — | Official URL or bare domain. Overrides the name-based domain guess. |
| slugified name | Override the directory slug under the archive root. |
| | Archive root. |
| | How many runner-up candidates to keep as |
| off | Emit a JSON result to stdout (use this when chaining). |
At least one of or is required.
--name--url| 参数 | 默认值 | 说明 |
|---|---|---|
| — | 品牌/产品名称。用于生成 slug 和 meta。 |
| — | 官方 URL 或纯域名。覆盖根据名称猜测域名的结果。 |
| 名称的 slug 化结果 | 覆盖归档根目录下的目录 slug。 |
| | 归档根目录。 |
| | 保留为 |
| 关闭 | 向 stdout 输出 JSON 结果(链式调用时使用)。 |
--name--urlArchive 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
└── ...~/.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: if alpha channel present (SVG always counts)
+30 - Aspect ratio: for wide (≥2:1),
+25for landscape (≥1.3:1),+10for square,-5for tall/portrait-15 - Short edge: if ≥128px,
+15if ≥64px,+5if <32px-20 - Size sanity: if payload <400 bytes (almost certainly a stub)
-30
This matches the "prefer 长条形 + rgba" preference — wide transparent logos
come out on top, square favicons land as alternates.
- 格式:SVG (+40) > PNG (+20) > WebP (+10) > JPG (-10) > ICO (-20)
- 透明度:存在 alpha 通道时 (SVG 始终计为透明)
+30 - 宽高比:宽幅(≥2:1)为 ,横向(≥1.3:1)为
+25,正方形为+10,竖向或纵向为-5-15 - 短边:≥128px 为 ,≥64px 为
+15,<32px 为+5-20 - 体积合理性:文件负载 <400 字节时为 (几乎可以确定是占位文件)
-30
这符合“优先长条形 + rgba”的偏好——宽幅透明 Logo 会排在最前,方形 favicon 则归入备选。
Dependencies
依赖项
Stdlib only (urllib, html.parser, argparse). No required.
pip install仅使用标准库(urllib、html.parser、argparse)。无需执行 。
pip installUser Configuration
用户配置
Default archive files live under . Override this
per run with , or set for the skill.
~/.lovstudio/logo-collection/--outSKILL_FIND_LOGO_OUTPUT_DIR默认归档文件位于 下。每次运行可通过 覆盖该目录,也可为该 Skill 设置 。
~/.lovstudio/logo-collection/--outSKILL_FIND_LOGO_OUTPUT_DIRKnown Limits
已知限制
- The name → domain guess is a crude lowercase-strip + suffix. For anything not on
.com, pass.comexplicitly.--url - No Clearbit API key is used — we hit the unauthenticated endpoint, which covers most major brands but not all.
- fallback is Claude's responsibility, not the script's.
WebSearch
- 从名称猜测域名的逻辑只是将名称转为小写、清理字符并添加 后缀。对于任何不在
.com上的品牌,请显式传入.com。--url - 不使用 Clearbit API key——脚本会访问无需身份验证的端点,能够覆盖大多数大型品牌,但并非全部。
- 回退由 Claude 负责,而不是脚本。
WebSearch
Runtime context (shared)
运行时上下文(共享)
运行前读取本 Skill 包的 ,由宿主提供 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
skill.yamlskill-runtime/v1- 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
- 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
required: true - 报错提供可复制的 、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。
context_id
运行前读取本 Skill 包的 ,由宿主提供 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
skill.yamlskill-runtime/v1- 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
- 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
required: true - 报错提供可复制的 、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。
context_id
通用反馈闭环
通用反馈闭环
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
- 先判断意见是 (仅本次)还是
task-specific(可跨任务复用)。reusable - 只修改当前任务,不改 Skill。
task-specific - 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
reusable - 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
- 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
reusable
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
- 先判断意见是 (仅本次)还是
task-specific(可跨任务复用)。reusable - 只修改当前任务,不改 Skill。
task-specific - 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
reusable - 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
- 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
reusable