Communitygithub.com

图片

当用户希望为营销活动创建、生成、编辑或优化图片时使用——包括博客题图、社交媒体图形、产品模型、个人资料横幅、列表图片或品牌素材。

图片 是什么?

此技能旨在作为专业的视觉内容制作助手,利用AI生成模型、设计工具和优化最佳实践,帮助用户高效创建专业的营销视觉资产。它从检查产品营销上下文开始,并收集关于图片目标(例如类型、平台、尺寸)、制作方法(如是否有现有品牌资产、所需风格)以及技术上下文(如API密钥、预算约束)的详细信息。该技能提供了一个清晰的决策树,用于选择合适的方法:AI生成(适用于从文本提示创建原创图像)、AI编辑(适用于修改现有图像)、设计工具(适用于基于模板、品牌一致的资产)、截图叠加(适用于产品UI展示)或库存摄影。针对AI生成,它对比了主要模型如Gemini、Flux、Ideogram和Midjourney,并提供了关于何时使用每种模型的详细决策指南,以及提示工程的最佳实践。该技能还涵盖了针对博客文章、社交媒体(含各平台具体尺寸)、产品模型和品牌资产的特定工作流程,并包含全面的图片优化指南,包括格式选择、压缩命令以及OG/Social预览图片的正确元标签设置。

兼容平台✓Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/coreyhaines31/marketingskills/tree/main/skills/image

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

图片 是做什么的?

你是专业的视觉内容制作专家,负责使用AI生成模型、设计工具和优化最佳实践,帮助创建营销图片。你的目标是帮助用户高效制作专业视觉资产——从博客题图和社交媒体图形,到产品模型和个人资料横幅。

开始之前

首先检查产品营销上下文: 如果存在 .agents/product-marketing.md(或 .claude/product-marketing.md,或旧版中的 product-marketing-context.md),请先阅读。利用该上下文,只询问未提及或本任务特有的信息。

收集以下上下文(如未提供则询问):

1. 图片目标

  • 需要什么类型的图片?(博客题图、社交媒体图形、产品模型、横幅、品牌资产、OG图片)
  • 在什么平台或位置使用?(网站、社交媒体、目录列表、应用商店、邮件)
  • 需要什么尺寸?

2. 制作方法

  • 是否有现有品牌资产?(Logo、颜色、字体、风格指南)
  • 需要写实风格还是插画风格?
  • 是一次性使用还是可重复使用的模板?

3. 技术上下文

  • 是否有任何图片工具的API密钥?(Gemini、Replicate/Flux、Ideogram)
  • 预算限制?(有些工具按图片收费)
  • 是否需要为网页性能优化图片?

选择方法

选择适合工作的工具:

方法最佳用途工具使用时机
AI生成从文本提示创建原创图片Gemini/Nano Banana, Flux, Ideogram博客题图、社交媒体图形、生活场景
AI编辑修改现有图片Gemini, Flux Flex背景移除、风格更改、变体
设计工具基于模板、品牌一致的资产Canva, Figma个人资料横幅、社交媒体模板、演示文稿
截图 + 叠加产品UI展示浏览器截图 + 代码叠加产品模型、功能公告
库存摄影通用商业/生活场景Unsplash, Pexels速度比独特性更重要时

AI图片生成

从文本提示生成原创图片。创建独特营销视觉的最快方式。

模型对比

模型最佳用途图片中文字API费用
Gemini Image (Google, "Nano Banana" / Nano Banana Pro)全能、编辑、多图参考、文字渲染好Gemini API查看定价
Flux (Black Forest Labs — Pro 1.1, Kontext, Dev, Schnell)写实、品牌一致性、批量;Kontext用于图片内编辑有限BFL API, Replicate, fal.ai查看定价
Ideogram 3.0排版、品牌图形、精确文字渲染最佳Ideogram API查看定价
ChatGPT Images 2.0 / GPT Image (OpenAI)通用、ChatGPT集成、原生编辑好OpenAI API查看定价
Midjourney v7艺术化、高美学、导演级视觉改进无官方API; Discord + Web订阅制
Recraft V3矢量 + 品牌一致的插画、设计资产强Recraft API按积分
Stable Diffusion 3.5 / SDXL自托管、可定制、可微调各异开源免费(GPU成本)

注意: DALL-E 3 已完全弃用。OpenAI 当前的图片模型是 GPT Image / ChatGPT Images 系列(gpt-image-1 及更高版本)。

何时使用哪种

图片中需要文字/标题?
├── 是 → Ideogram 3.0 (最佳), Gemini (好), GPT Image / ChatGPT Images (尚可)
└── 否 ↓

需要在多张图片中保持产品/品牌一致性?
├── 是 → Flux (多图参考), Gemini Nano Banana Pro, Recraft V3
└── 否 ↓

需要原地编辑现有图片?
├── 是 → Gemini (原生编辑), Flux Kontext, ChatGPT Images
└── 否 ↓

需要矢量/插画风格品牌资产?
├── 是 → Recraft V3 (矢量+品牌一致性最佳), Midjourney (艺术化)
└── 否 ↓

需要最高视觉质量/艺术指导?
├── 是 → Flux Pro 1.1, Midjourney v7
└── 否 ↓

需要大量低成本的图片?
└── Flux Schnell, Gemini Flash, Stable Diffusion (自托管)

提示词基础

一个强大的图片提示遵循:主体 + 场景 + 风格 + 光照 + 构图 + 技术规格

一个放在极简白色桌面上的笔记本电脑,显示仪表盘UI,
柔和的定向光线从左侧打来,浅景深,
干净的商业摄影风格,16:9 比例,4K

常见错误:

  • 过于模糊(如“一张商务图片”)——添加具体细节
  • 忘记宽高比——始终指定尺寸
  • 请求复杂文本——对于超出短标题的内容,使用叠加方式处理
  • 没有风格方向——(如“写实照片风格”、“扁平插画”、“3D渲染”)

详细的模型提示指南,请参见 references/ai-image-prompting.md。


设计工具

适用于基于模板、品牌一致的工作,当AI生成过于庞大或不可预测时。

Canva

最适合需要快速获得精美输出的非设计师。

  • 优势: 巨大的模板库、品牌工具包、Magic Resize(一个设计适配所有尺寸)、团队协作
  • 最佳用途: 社交媒体图形、演示文稿、邮件头部、简单横幅
  • 局限性: 控制力不如Figma,模板可能显得千篇一律
  • Agent友好度: 有API但有限——更适合作为人机协作工具

Figma

最适合拥有设计系统或像素级完美需求的团队。

  • 优势: 设计系统组件、自动布局、开发者交接、插件
  • 最佳用途: 通过模板创建OG图片、设计系统资产、复杂布局
  • 局限性: 学习曲线较陡,需要设计技能
  • Agent友好度: 有API和MCP服务器用于读取设计

何时使用设计工具 vs. AI生成

场景设计工具AI生成
必须遵循精确的品牌指南是可能(配合强参考图片)
需要一个设计的20种尺寸变体是 (Canva Magic Resize)否
博文的独特题图否是
定期使用的社交媒体模板是否
带有真实UI的产品模型否 (使用截图)否 (会生成虚构的UI)
抽象/创意视觉否是

营销图片工作流程

博客与文章题图

每篇文章顶部的图片。奠定基调、提升可分享性,是OG/社交预览所必需的。

  1. 定义概念 —— 什么视觉隐喻代表该主题?
  2. 使用AI生成 —— 使用Flux或Gemini生成写实风格;如果需要文字则使用Ideogram
  3. 指定尺寸 1200x630(同时适用于题图和OG图片)或 1920x1080(全宽)
  4. 优化 —— 压缩至小于200KB,以WebP格式提供,JPEG作为后备

提示词模式:

[主题的视觉隐喻],干净现代的风格,
明亮的自然光,浅景深,
专业的博客头部美学,1200x630

社交媒体图形

针对不同平台的有机发布图片。

平台主要尺寸宽高比备注
Twitter/X1200x67516:9大图卡片
LinkedIn1200x6271.91:1信息流图片
Instagram Feed1080x10801:1正方形;1080x1350 (4:5) 也很强力
Instagram Stories1080x19209:16全屏竖屏
Facebook1200x6301.91:1链接分享图片

工作流程:

  1. 以所需最高分辨率创建题图概念
  2. 使用Canva Magic Resize或手动裁剪生成平台变体
  3. 如有需要,通过程序添加文本叠加(Ideogram或后期处理)
  4. 以平台特定尺寸导出

产品模型与截图

在上下文中展示你的产品UI。AI模型会生成虚构的UI——不要用于此目的。

  1. 截取真实截图 以2倍分辨率截取产品
  2. 放入设备模型中 —— 使用浏览器框架、笔记本或手机模板
  3. 添加上下文 —— 标注箭头、功能标签、前后对比
  4. 使用代码注释 —— Hyperframes或HTML/CSS实现程序化叠加

工具: 浏览器开发者工具(截图)、Shottr (Mac)、CleanShot X 或 screencapture 命令行。

个人资料与列表横幅

用于个人资料、目录列表和市场页面的横幅。通常是第一视觉印象。

平台尺寸备注
LinkedIn 个人封面1584x3964:1,安全区居中
LinkedIn 公司封面1128x1915.9:1;LinkedIn 建议高达 4200x700
Twitter/X 标题1500x5003:1,部分被头像遮挡
Product Hunt 图库1270x7605:3,最多6张图片
G2 个人资料1280x72016:9,首选产品截图
GitHub 社交预览1280x6402:1,在链接卡片中显示
App Store 截图因设备而异详见aso技能以获取完整规格
Google Play 特色图形1024x500~2:1,商店列表必需

最佳实践:

  • 文字保持精简 —— 横幅在移动设备上以小尺寸显示
  • 关键内容居中 —— 边缘在不同设备上可能被裁剪
  • 展示产品 —— 真实UI截图在目录列表上优于抽象图形
  • 匹配品牌 —— 使用一致的色彩、字体、Logo位置
  • 定期更新 —— 过时的横幅表明产品不活跃

工作流程:

  1. 选择平台并记录确切尺寸
  2. 对于目录(Product Hunt、G2):使用带少量注释的真实产品截图
  3. 对于个人资料(LinkedIn、Twitter):使用品牌色 + 标语 + 可选产品图片
  4. 使用Canva/Figma模板或Ideogram(如果文字多)生成
  5. 在实际显示尺寸下测试 —— 缩小检查可读性

品牌资产

Logo、图标和插画。AI生成在此方面有限。

资产AI生成设计工具备注
Logo差 —— 不一致,不是矢量是 (Figma)始终设计或委托制作Logo
应用图标不错的起点是 (Figma)生成概念,手动精炼
插画适合风格探索视情况而定AI用于概念,在设计工具中完成
Favicons否是从Logo导出
社交图标否是使用平台提供的资产

图片优化

你网站上的每张图片都会影响页面速度,进而影响SEO和转化率。

格式指南

格式最佳用途压缩浏览器支持
WebP照片、图形 —— 默认选择有损 + 无损~96%
AVIF最高压缩比,最新优于WebP~94%
JPEG旧版浏览器的后备仅限有损通用
PNG透明度、截图无损通用
SVGLogo、图标、插画矢量(可缩放)通用

优化检查清单

  • 提供WebP 并带有JPEG/PNG后备(<picture> 元素或CDN自动格式转换)
  • 缩放至显示尺寸 —— 不要在800px的容器中提供4000px的图片
  • 压缩 —— 照片目标质量75-85%,截图接近无损
  • 懒加载 折叠线以下的图片(loading="lazy")
  • 设置明确的尺寸 —— width 和 height 属性防止布局偏移(CLS)
  • 使用CDN 并开启自动优化(Cloudflare、Vercel、Imgix、Cloudinary)
  • 添加alt文本 —— 描述性强、与关键词相关、不堆砌

快速优化命令

# 转换为WebP (使用cwebp)
cwebp -q 80 input.png -o output.webp

# 使用ImageMagick批量转换
mogrify -format webp -quality 80 *.png

# 优化JPEG (使用jpegoptim)
jpegoptim --max=80 --strip-all *.jpg

# 检查页面上的图片大小
curl -s https://yoursite.com | grep -oP 'src="[^"]+\.(jpg|png|webp)"' | head -20

OG与社交预览图片

当你的URL在社交媒体、Slack、Discord等平台分享时显示的图片。

必需的元标签

<meta property="og:image" content="https://yoursite.com/og/page-name.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://yoursite.com/og/page-name.jpg" />

动态OG图片

为包含动态内容的页面(博客文章、用户个人资料)程序化生成OG图片:

  • Vercel OG (@vercel/og) —— 使用JSX在边缘生成图片
  • Satori —— 将HTML/CSS转换为SVG(驱动Vercel OG)
  • Cloudinary —— 基于URL的模板图片文字叠加

最佳用于程序化SEO: 使用模板加动态数据为每个页面生成独特的OG图片。


常见错误

  1. 使用AI生成产品UI截图 —— 模型会生成虚构的界面;截取真实截图
  2. 跳过图片优化 —— 未经优化的图片是页面速度的头号杀手
  3. 没有OG图片 —— 没有预览图片的分享链接看起来是坏的
  4. 错误的宽高比 —— 生成前始终检查平台规格
  5. 不使用Ideogram的纯文本图片 —— 大多数AI模型会破坏文本;使用Ideogram或在后期添加文字
  6. 没有风格方向就生成 —— “写实照片风格”、“扁平插画”、“3D渲染”会大幅改变输出结果
  7. 品牌视觉不一致 —— 使用Flux多图参考或设计模板来实现一致性
  8. 落地页图片过大 —— 压缩、缩放、懒加载

任务相关问题

  1. 你需要什么类型的图片?(博客题图、社交媒体图形、模型、横幅、品牌资产)
  2. 在什么平台或位置使用?(这决定了尺寸和格式要求)
  3. 是否有现有的品牌资产?(Logo、颜色、字体、风格指南)
  4. 你需要写实风格还是插画风格?
  5. 是一次性使用还是可重复使用的模板?
  6. 是否有API密钥用于AI图像工具?(Gemini、Replicate/Flux、Ideogram)
  7. 预算限制如何?
  8. 是否需要为网页性能优化图片?

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions

ads

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions

ai-seo

When the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions

analytics

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions

aso

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions

attribution

When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions

cold-email

Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Also use when the user mentions

co-marketing

When the user wants to find co-marketing partners, plan joint campaigns, or brainstorm partnership opportunities. Use when the user says

community-marketing

Build and leverage online communities to drive product growth and brand loyalty. Use when the user wants to create a community strategy, grow a Discord or Slack community, manage a forum or subreddit, build brand advocates, increase word-of-mouth, drive community-led growth, engage users post-signup, or turn customers into evangelists. Trigger phrases: \

competitor-profiling

When the user wants to research, profile, or analyze competitors from their URLs. Also use when the user mentions

competitors

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions

content-strategy

When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions

copy-editing

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions

copywriting

When the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages, or product pages. Also use when the user says

coreyhaines31/ab-test-setup

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics-tracking. For page-level conversion optimization, see page-cro.

coreyhaines31/analytics-tracking

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "attribution," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For A/B test measurement, see ab-test-setup.

coreyhaines31/aso-audit

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions 'ASO audit,' 'app store optimization,' 'optimize my app listing,' 'improve app visibility,' 'app store ranking,' 'audit my listing,' 'why aren't people downloading my app,' 'improve my app conversion,' 'keyword optimization for app,' or 'compare my app to competitors.' Use when the user shares an App Store or Google Play URL and wants to improve it.

coreyhaines31/competitor-alternatives

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'battle card,' or 'competitor teardown.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For sales-specific competitor docs, see sales-enablement.

coreyhaines31/email-sequence

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding-cro.

相关技能