extract-project-logo

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Extract project logo

提取项目Logo

This skill extracts a project's official logo from its website or related sources, prioritising high-quality vector formats and official brand assets.
本技能可从项目官网或相关来源提取官方Logo,优先获取高质量矢量格式和官方品牌资产。

Required inputs

必要输入

Before starting, gather the following from the user:
  1. Website URL - The project's main website (e.g.,
    https://example.com
    )
  2. Save path - Local filesystem path where the logo should be saved (e.g.,
    ./logos/example-logo.svg
    )
  3. Format preference (optional) - Preferred format: SVG (recommended), PNG, or any
If any required input is missing, ask the user before proceeding.
Save all project logos in the target folder. We will pick variants and post-process those later.
There is no universal standard how artist name their logo files for dark and light variants. In our case, we always say
  • light
    : light (white) text on dark or transparent background
  • dark
    : dark (black) text on white or transparent background
Following vocabulary is used:
  • Brand mark: same as logo mark, the logo without the brand name text
  • Word mark: the logo with the brand name text
开始操作前,请向用户收集以下信息:
  1. 官网URL - 项目的主网站(例如:
    https://example.com
  2. 保存路径 - 本地文件系统中用于保存Logo的路径(例如:
    ./logos/example-logo.svg
  3. 格式偏好(可选)- 首选格式:SVG(推荐)、PNG或任意格式
如果缺少任何必要输入,请在操作前询问用户。
将所有项目Logo保存到目标文件夹中,后续我们会筛选变体并进行后期处理。
目前没有统一的标准来命名深色和浅色版本的Logo文件。在本流程中,我们统一规定:
  • light
    :深色或透明背景上的浅色(白色)文字Logo
  • dark
    :白色或透明背景上的深色(黑色)文字Logo
使用以下术语:
  • Brand mark:与logo mark同义,指不含品牌名称文字的Logo
  • Word mark:指包含品牌名称文字的Logo

Step 1: Search for brand kit or media resources

步骤1:搜索品牌套件或媒体资源

The highest quality logos are typically found in official brand/media kits. Search for these pages:
  1. Navigate to the website and look for links in the footer or header:
    • "Brand", "Brand Kit", "Brand Assets", "Brand Guidelines"
    • "Media", "Media Kit", "Press", "Press Kit"
    • "Resources", "Downloads", "Assets"
  2. Try common URL patterns:
    • {base_url}/brand
    • {base_url}/brand-kit
    • {base_url}/media
    • {base_url}/press
    • {base_url}/assets
    • {base_url}/resources
  3. If a brand kit is found:
    • Look for downloadable logo packages (often ZIP files)
    • Prefer SVG or vector formats over raster images
    • Choose the most square logo variant if multiple options exist
    • If both light and dark themes are present, get both
    • If colourful option exist, get it as well
If a brand kit is found with suitable logos, proceed to Step 5.
最高质量的Logo通常在官方品牌/媒体套件中。请搜索以下页面:
  1. 访问官网,在页脚或页眉中查找以下链接:
    • "Brand"、"Brand Kit"、"Brand Assets"、"Brand Guidelines"
    • "Media"、"Media Kit"、"Press"、"Press Kit"
    • "Resources"、"Downloads"、"Assets"
  2. 尝试常见URL模式:
    • {base_url}/brand
    • {base_url}/brand-kit
    • {base_url}/media
    • {base_url}/press
    • {base_url}/assets
    • {base_url}/resources
  3. 如果找到品牌套件:
    • 查找可下载的Logo包(通常为ZIP文件)
    • 优先选择SVG或矢量格式,而非栅格图像
    • 如果有多个选项,选择最接近方形的Logo变体
    • 如果同时提供浅色和深色主题版本,两者都要获取
    • 如果有彩色版本,也一并获取
如果找到包含合适Logo的品牌套件,请直接进入步骤5。

Step 2: Check GitHub repository

步骤2:检查GitHub仓库

Many projects host their logos in their GitHub repositories:
  1. Find the project's GitHub repository (often linked in website footer/header)
  2. Search these common locations:
    • /assets/
      or
      /images/
      directories
    • /branding/
      or
      /brand/
      directories
    • /public/
      directory (for web apps)
    • /docs/
      or
      /documentation/
      directories
    • Root directory (README badges, logo files)
  3. Check the README.md for embedded logos:
    • Look for
      <img>
      tags or markdown image syntax
    • These often point to high-quality logo files
  4. Search for files named:
    • logo.svg
      ,
      logo.png
      ,
      logo-*.svg
    • {project-name}.svg
      ,
      {project-name}-logo.*
    • brand.*
      ,
      icon.*
If a suitable logo is found, proceed to Step 4.
许多项目会在GitHub仓库中托管其Logo:
  1. 找到项目的GitHub仓库(通常在官网页脚/页眉有链接)
  2. 搜索以下常见位置:
    • /assets/
      /images/
      目录
    • /branding/
      /brand/
      目录
    • /public/
      目录(适用于Web应用)
    • /docs/
      /documentation/
      目录
    • 根目录(README徽章、Logo文件)
  3. 检查README.md中的嵌入式Logo:
    • 查找
      <img>
      标签或Markdown图片语法
    • 这些通常指向高质量Logo文件
  4. 搜索以下命名的文件:
    • logo.svg
      ,
      logo.png
      ,
      logo-*.svg
    • {project-name}.svg
      ,
      {project-name}-logo.*
    • brand.*
      ,
      icon.*
如果找到合适的Logo,请进入步骤4。

Step 3: Extract from website directly

步骤3:直接从官网提取

If no brand kit or GitHub assets are available, extract the logo from the website:
如果没有找到品牌套件或GitHub资产,直接从官网提取Logo:

Option A: Using MCP Playwright (recommended for dynamic sites)

选项A:使用MCP Playwright(推荐用于动态网站)

Use the MCP Playwright tool to:
  1. Navigate to the homepage
  2. Look for logo elements in the header (typically top-left):
    • Search for
      <img>
      tags with class/id containing "logo"
    • Check for
      <svg>
      elements in the header
    • Look for elements with
      role="img"
      and logo-related aria labels
  3. Extract the image source URL or SVG content
使用MCP Playwright工具执行以下操作:
  1. 导航至首页
  2. 在页眉(通常为左上角)查找Logo元素:
    • 搜索包含"logo"的class/id的
      <img>
      标签
    • 检查页眉中的
      <svg>
      元素
    • 查找带有
      role="img"
      且与Logo相关的aria标签的元素
  3. 提取图像源URL或SVG内容

Option B: Check meta tags and favicon

选项B:检查元标签和网站图标

  1. Open Graph image - Check for
    <meta property="og:image">
    tag
    • Often a high-quality image suitable for social sharing
    • May include branding elements
  2. Favicon - Check for high-resolution favicon:
    • <link rel="icon" type="image/svg+xml">
      (best - vector)
    • <link rel="apple-touch-icon">
      (usually 180x180 PNG)
    • /favicon.ico
      (low resolution, last resort)
  3. Twitter Card image - Check
    <meta name="twitter:image">
  1. Open Graph图片 - 检查
    <meta property="og:image">
    标签
    • 通常是适合社交分享的高质量图片
    • 可能包含品牌元素
  2. 网站图标(Favicon) - 检查高分辨率网站图标:
    • <link rel="icon" type="image/svg+xml">
      (最佳选择 - 矢量格式)
    • <link rel="apple-touch-icon">
      (通常为180x180像素PNG)
    • /favicon.ico
      (低分辨率,最后选择)
  3. Twitter Card图片 - 检查
    <meta name="twitter:image">
    标签

Step 4: Extract from Twitter

步骤4:从Twitter提取

Get the project logo from their Twitter (also known as X.com) avatar image.
从项目的Twitter(也称为X.com)头像获取Logo。

Step 5: Extract from Coingecko

步骤5:从Coingecko提取

Get the project logo from their Coingecko.
从Coingecko获取项目Logo。

Step 6: Download and save

步骤6:下载并保存

  1. For SVG files:
    • Download the raw SVG content
    • Ensure the file is valid XML
    • Save with
      .svg
      extension
  2. For raster images (PNG, etc.):
    • Download the highest resolution available
    • Verify file integrity after download
    • Save with appropriate extension
  3. Verify the saved file:
    • Open the file to confirm it displays correctly
    • Check file size is reasonable (not 0 bytes or corrupted)
  1. 对于SVG文件
    • 下载原始SVG内容
    • 确保文件为有效的XML
    • 使用
      .svg
      扩展名保存
  2. 对于栅格图像(PNG等)
    • 下载可用的最高分辨率版本
    • 下载后验证文件完整性
    • 使用合适的扩展名保存
  3. 验证保存的文件
    • 打开文件确认显示正常
    • 检查文件大小是否合理(不是0字节或损坏)

Download methods

下载方法

Using curl:
shell
curl -o "{save_path}" "{logo_url}"
Using Python:
python
import requests

response = requests.get("{logo_url}")
with open("{save_path}", "wb") as f:
    f.write(response.content)
For SVG content extracted directly:
python
with open("{save_path}", "w") as f:
    f.write(svg_content)
使用curl:
shell
curl -o "{save_path}" "{logo_url}"
使用Python:
python
import requests

response = requests.get("{logo_url}")
with open("{save_path}", "wb") as f:
    f.write(response.content)
对于直接提取的SVG内容:
python
with open("{save_path}", "w") as f:
    f.write(svg_content)

Step 7: Report results to user

步骤7:向用户报告结果

Provide the user with:
  1. Source location - Where the logo was found (brand kit URL, GitHub path, etc.)
  2. File details - Format, dimensions (for raster), file size
  3. Saved path - Confirm where the file was saved
  4. Alternative versions - Note if other variants are available (dark mode, icon-only, etc.)
向用户提供以下信息:
  1. 来源位置 - Logo的获取位置(品牌套件URL、GitHub路径等)
  2. 文件详情 - 格式、(栅格图像的)尺寸、文件大小
  3. 保存路径 - 确认文件保存位置
  4. 替代版本 - 记录是否有其他可用变体(深色模式、仅图标版本等)

Step 8: Save the report as Markdown file next to the logos

步骤8:在Logo所在文件夹旁保存Markdown报告

  • Create a Markdown file in the folder where logos where saved
  • Include the same information as for the user report
  • Include links to the web pages, brand pages and brand kits used
  • 在保存Logo的文件夹中创建Markdown文件
  • 包含与用户报告相同的信息
  • 包含所使用的网页、品牌页面和品牌套件的链接

Troubleshooting

故障排除

No logo found

未找到Logo

If no suitable logo can be found:
  1. Check if the project uses a different primary domain
  2. Look for the project on social media (Twitter/X, LinkedIn) - profile images are often logos
  3. Search "[project name] logo" on image search engines
  4. Check DeFiLlama, CoinGecko, or similar aggregators for crypto projects
  5. Ask the user if they have alternative sources or contacts
如果无法找到合适的Logo:
  1. 检查项目是否使用其他主域名
  2. 在社交媒体(Twitter/X、LinkedIn)上查找项目 - 个人资料图片通常是Logo
  3. 在图片搜索引擎中搜索“[项目名称] logo”
  4. 对于加密货币项目,检查DeFiLlama、CoinGecko或类似聚合平台
  5. 询问用户是否有其他来源或联系方式

Dynamic/JavaScript-rendered logos

动态/JavaScript渲染的Logo

If the logo is rendered via JavaScript:
  1. Use MCP Playwright to load the page fully
  2. Wait for dynamic content to render
  3. Extract from the rendered DOM
如果Logo通过JavaScript渲染:
  1. 使用MCP Playwright完全加载页面
  2. 等待动态内容渲染完成
  3. 从渲染后的DOM中提取

Logo requires authentication

Logo需要身份验证

If brand assets are behind a login:
  1. Inform the user
  2. Provide the URL to the brand kit page
  3. Ask the user to download manually or provide credentials (if appropriate)
如果品牌资产需要登录才能访问:
  1. 告知用户
  2. 提供品牌套件页面的URL
  3. 请用户手动下载或提供凭据(如有必要)