
Wechat Writer
- 34 installs
- 1 repo stars
- Updated April 12, 2026
- bnd-1/wechat_article_mini
wechat-writer is a skill that researches, writes, and generates a cover image for WeChat public-account articles across multiple writing styles.
About
wechat-writer is a skill that researches, writes, and illustrates WeChat public-account articles end to end. A developer or writer invokes it to draft an article on a chosen topic. It first asks the topic and preferred style, searches 2-4 rounds with WebSearch and WebFetch, rewrites into a 2000-3000 character article, and generates a mandatory 16:9 cover image via the Jimeng API. It hands off to the formatter and publisher skills. This is the 'mini' fast variant. Docs are in Chinese.
- Researches, writes, and generates a cover image for WeChat articles
- Asks the user's topic and style, then adapts across seven writing styles
- Generates a 16:9 cover image via the Jimeng (Doubao) API
Wechat Writer by the numbers
- 34 all-time installs (skills.sh)
- Ranked #1,389 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
wechat-writer capabilities & compatibility
Requires the Jimeng image-generation API for the mandatory cover image; text steps use built-in web tools.
- Capabilities
- content writing · web research · cover image generation
- Use cases
- copywriting · marketing · research · web search · image generation
- Pricing
- Bring your own API key
What wechat-writer says it does
1. 用 `WebSearch` 搜 2-4 轮(官方→评测→对比)
**每篇文章必须生成 1 张封面图。**
用自己的话改写,2000-3000 字
npx skills add https://github.com/bnd-1/wechat_article_mini --skill wechat-writerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 34 |
|---|---|
| repo stars | ★ 1 |
| Last updated | April 12, 2026 |
| Repository | bnd-1/wechat_article_mini ↗ |
What it does
Draft a researched, style-adapted WeChat public-account article with a generated cover image, then hand off to the formatter.
Who is it for?
Writers who want research-backed WeChat drafts with a matching cover image generated automatically.
Skip if: Formatting or publishing; those are handled by the formatter and publisher skills.
When should I use this skill?
The user says '写一篇关于XXX的文章', '分析一下XXX产品', or '帮我研究XXX' (write an article about X / analyze product X / research X).
What you get
A 2000-3000 character Markdown article plus a generated cover image, ready to format.
- Markdown article (2000-3000 chars)
- cover.png cover image
By the numbers
- seven writing styles in the adaptation table
- 2000-3000 character target length
- 2-4 search rounds
Files
微信公众号写作助手(小龙虾极速版)
核心理念:最短路径,用户最快上手
---
前置:安装依赖
每次使用前,先确保依赖已安装(幂等操作,可重复执行):
pip3 install -r skills/wechat-writer/requirements.txt---
第一步:问清楚用户要写什么
不要预设人格,先问用户:
你好!我来帮你写公众号文章。请告诉我:
1. 你想写什么主题?
2. 偏好哪种风格?
- 技术科普(通俗解释技术概念)
- 产品拆解(从产品经理视角分析设计逻辑)
- 产品测评(亲身体验+客观分析)
- 新闻解读(热点事件+独立观点)
- 实战教程(手把手教操作)
- 效率提升(工具技巧+工作流分享)
- 行业观察(趋势分析+个人见解)
3. 有没有特别想强调的角度或观点?(有个人经验更好)根据用户回答自动适配写作风格:
| 风格 | 人称 | 语气 | 重点 |
|---|---|---|---|
| 技术科普 | "我们"/"你" | 通俗亲切 | 类比+案例 |
| 产品拆解 | "我" | 产品思维 | 设计逻辑+使用场景+借鉴点 |
| 产品测评 | "我" | 客观理性 | 场景+对比 |
| 新闻解读 | "我" | 鲜明观点 | 分析+启示 |
| 实战教程 | "我" | 手把手 | 步骤+截图 |
| 效率提升 | "我" | 经验分享 | 技巧+前后对比 |
| 行业观察 | "我" | 深度思考 | 洞察+预判 |
---
第二步:搜索 + 写作(合并执行)
1. 用 WebSearch 搜 2-4 轮(官方→评测→对比) 2. 用 WebFetch 抓 2-3 篇核心文章 3. 用自己的话改写,2000-3000 字
文章结构(通用模板):
引子(100-200字)→ 场景或问题引入
核心内容(1500-2000字)→ 3-4个小节,每节有小标题
总结(100-200字)→ 核心观点 + 行动建议硬性规则:
- 链接用纯文本:
官网:https://example.com/ - 不加"参考资料"等额外章节
- 短句为主,不超过 25 字
---
第三步:生成封面图(即梦API)
每篇文章必须生成 1 张封面图。
python scripts/generate_image.py \
--prompt "为公众号文章生成封面图,主题:[主题关键词],风格:科技感,蓝紫渐变背景,标题文字'[简短标题]',简体中文" \
--api jimeng \
--aspect-ratio 16:9 \
--output cover.png配色速查:
| 类型 | 配色 |
|---|---|
| AI/科技 | 蓝紫渐变 |
| 产品拆解 | 蓝紫渐变 |
| 工具/效率 | 绿橙渐变 |
| 新闻/资讯 | 蓝绿渐变 |
| 方法论 | 深蓝渐变 |
内容配图按需 0-2 张,不强制。
---
第四步:输出
用 Write 创建 Markdown 文件:
# 文章标题

正文内容...
## 总结
结尾段落...输出文件:{主题名}.md + cover.png
---
完成后提示用户
文章已生成!接下来你可以:
1. 说"美化文章"→ 自动转换为精美HTML格式
2. 说"推送到微信"→ 自动发布到公众号草稿箱
3. 或者先看看内容,告诉我需要修改的地方---
质量底线
- [ ] 内容用自己的话表达,非照搬
- [ ] 事实准确,链接可访问
- [ ] 已生成封面图
- [ ] 2000-3000 字
wechat-tech-writer 使用示例
本文档提供了三个完整的使用示例,展示不同类型文章的创作流程和最佳实践。
---
示例1:技术新闻/资讯类文章
用户输入
写一篇关于VSCode更名为"开源人工智能代码编辑器"的文章,网友戏称应该叫vibe coding studio,探讨一下为何这么更名执行流程
第1步:理解需求
- 主题类型:技术新闻/资讯 + 分析评论
- 核心角度:VSCode的AI转型、vibe coding概念、更名背后的原因
- 目标读者:开发者、科技爱好者
第2步:搜索信息(3-5轮)
第1轮 - 搜索官方信息:
查询:"VSCode更名 开源人工智能代码编辑器 2025"
查询:"VSCode AI功能 Copilot 2025"找到:VS Code官网标语变化、Copilot Chat开源公告
第2轮 - 搜索vibe coding概念:
查询:"vibe coding VSCode网友评论"
查询:"微软VSCode AI编辑器 开发者反应"找到:vibe coding的定义、Andrej Karpathy的提出、开发者社区反应
第3轮 - 搜索背景信息:
查询:"VSCode Copilot开源 Cursor竞争"找到:与Cursor的竞争关系、微软开源策略
第3步:抓取内容(2-3篇)
抓取了以下关键内容: 1. OSCHINA - 微软VS Code打造开源AI编辑器的报道 2. CSDN - VSCode变成开源AI编辑器的突发消息 3. VS Code官网 - 官方标语"The open source AI code editor"
提取要点:
- 微软5月19日宣布GitHub Copilot Chat开源(MIT许可证)
- VS Code官网标语确实是"The open source AI code editor"
- Vibe coding概念由Andrej Karpathy在2025年2月提出
- Cursor已有36万付费用户,ARR突破3亿美元
- 开发者反应两极:有赞有弹
第4步:改写创作(2000-3000字)
文章结构: 1. 引子(150字):引入"更名"话题和vibe coding studio梗 2. 什么是Vibe Coding(400字):解释新概念,用盖房子比喻 3. VSCode的AI野心(600字):介绍AI功能、Agent模式、免费策略 4. 为什么微软要开源(500字):分析五大原因、Cursor竞争 5. "Vibe Coding Studio"梗的由来(300字):解读网友调侃 6. 如何开始(300字):提供上手指引和官方链接 7. 总结展望(200字):编程范式转变的思考
语言风格特点:
- 使用类比:"盖房子vs建筑师沟通"、"操作系统"
- 第二人称:"你会发现"、"如果你也想体验"
- 短句为主,便于阅读
- 适当使用引号强调关键词
第5步:生成封面图(强制)
分析主题:
- 关键词:VSCode、AI、编辑器转型、Vibe Coding
- 核心价值:"从代码编辑器到氛围编程工作室"
- 目标情绪:好奇("VSCode改名了?")+ 新奇(AI编程新方式)
选择配色:科技创新类 → 蓝紫渐变 (#1a1f5c → #7c3aed)
构建提示词(基于模板1:AI类):
A stunning, eye-catching cover image for VSCode AI transformation article.
Design: vibrant gradient background from deep blue (#1a1f5c) to electric purple (#7c3aed), with glowing particles floating throughout and subtle light effects creating depth.
Central visual elements (positioned behind text):
- 3D floating geometric cubes in glass morphism style, semi-transparent with frosted glass effect
- Each cube contains a glowing icon: VSCode logo, code brackets symbol, AI brain circuit pattern
- Cubes connected by luminous cyan (#06b6d4) energy lines creating a network visualization
- Soft particle system with small glowing dots scattered across the scene
- Light rays emanating from cubes with lens flare effects
Text layout (CRITICAL - all text centered both horizontally and vertically):
- CENTER of image: Large bold title 'VSCode × AI' in white, modern sans-serif font with subtle glow
- Directly below title in CENTER: Chinese subtitle '从代码编辑器到氛围编程工作室' in elegant font, slightly smaller, 90% opacity
IMPORTANT: All text must be centered in the MIDDLE of the image, not at top or bottom edges.
Visual effects:
- Bokeh depth of field effect in background
- Subtle vignette darkening at edges
- Glowing highlights on cube edges
- Professional color grading with high contrast
- Clean composition with breathing space around text
Style: ultra-modern, tech-forward, sci-fi inspired, professional, magazine-quality
Visual mood: innovative, powerful, intelligent, cutting-edge, transformative
Color palette: blue-purple gradient (#1a1f5c to #7c3aed) with cyan (#06b6d4) and white (#ffffff) accents
CRITICAL REQUIREMENTS:
- All Chinese text in simplified Chinese (简体中文)
- Chinese characters must be clear, readable, and accurate - NO garbled text
- Text positioned in CENTER (middle) of image both horizontally and vertically
- High quality, 16:9 aspect ratio
- Professional design suitable for tech article cover调用生成:
python scripts/generate_image.py \
--prompt "[上述提示词]" \
--api gemini \
--output cover.png验证质量: ✅ 中文清晰:主标题"VSCode × AI"和副标题清晰可读 ✅ 颜色鲜明:蓝紫渐变吸引眼球 ✅ 视觉元素:代码窗口、AI神经网络、转换箭头都有 ✅ 符合主题:一看就知道是AI编程相关
第6步:内容配图(按需 - 本例不生成)
判断:
- 文章主要是新闻解读和概念科普
- 没有明确的性能数据对比
- 没有复杂的技术架构需要图解
- 决定:不生成额外配图(仅封面图)
第7步:输出文章
输出文件:
VSCode更名事件.md(文章主文件,约3200字)cover.png(封面图,637KB)
文章特色:
- 标题吸引眼球:包含"更名"悬念和"vibe coding studio"梗
- 结构清晰:7个部分,每部分主题明确
- 通俗易懂:用生活化比喻解释技术概念
- 链接纯文本格式:
https://code.visualstudio.com/(不是markdown超链接) - 无额外章节:没有"参考资料"、"图片说明"等
关键学习点
1. 新闻类文章重在时效性和全面性
- 搜索最新信息(2025年)
- 多角度呈现(官方、网友、竞品)
- 提供背景知识(vibe coding概念)
2. 封面图要体现新闻性
- 使用"×"符号表示结合/对抗
- 副标题点明核心转变
- 科技感强但不过于严肃
3. 内容配图要克制
- 新闻资讯类通常不需要额外配图
- 封面图已足够吸引注意
---
示例2:AI大模型介绍文章
用户输入
写一篇关于Claude Sonnet 4的文章执行流程
第1步:理解需求
- 主题类型:AI大模型介绍
- 核心角度:功能特点、使用场景、与竞品对比
- 目标读者:AI用户、开发者、技术爱好者
第2步:搜索信息(4-5轮)
第1轮 - 官方信息:
查询:"Claude Sonnet 4 官方介绍"
查询:"Claude Sonnet 4 Anthropic 发布"第2轮 - 功能特性:
查询:"Claude Sonnet 4 功能特性 能力"
查询:"Claude Sonnet 4 多模态 代码"第3轮 - 性能评测:
查询:"Claude Sonnet 4 vs GPT-4 性能对比"
查询:"Claude Sonnet 4 benchmark 评测"第4轮 - 使用案例:
查询:"Claude Sonnet 4 应用案例 实战"第3步:抓取内容(3-4篇)
抓取: 1. Anthropic官网 - Claude Sonnet 4产品页 2. 技术博客 - 详细评测文章 3. GitHub - API使用示例 4. 对比评测 - 与GPT-4/Gemini的性能数据
提取要点:
- 发布时间、模型规模、主要改进
- 核心能力:推理、代码、多模态、上下文窗口
- 性能数据:响应时间、准确率、成本
- 典型应用场景
- API使用方法
第4步:改写创作
文章结构(推荐结构): 1. 引子(150字):用一个实际场景引入 2. Claude Sonnet 4是什么(400字):模型定位、发布背景 3. 核心能力详解(800字):
- 超强推理能力(举例)
- 代码理解和生成(举例)
- 多模态理解(举例)
- 200K上下文窗口(意义)
4. 与竞品对比(500字):
- vs GPT-4:推理 > 速度 <
- vs Gemini Pro:成本 > 准确率 >
- 配数据对比表格(或图表)
5. 典型应用场景(400字):
- 代码助手、内容创作、数据分析、客服
6. 如何开始使用(300字):
- API密钥获取、快速开始代码、定价
7. 总结(150字):Claude Sonnet 4的价值和展望
语言风格:
- 用实际例子说明能力(不是空洞描述)
- 数据对比要客观(不过度吹捧)
- 技术术语要解释(如"推理能力"是什么意思)
第5步:生成封面图
主题分析:
- 关键词:Claude、Sonnet 4、AI大模型、推理能力
- 核心价值:"超越GPT-4的推理能力"或"最强AI助手"
- 目标情绪:震撼、兴奋、信任
配色:AI类 → 蓝紫渐变 + 金色点缀(体现高端)
提示词(基于模板1,定制化):
A stunning, eye-catching cover image for Claude Sonnet 4 AI model article.
Design: vibrant gradient background from deep blue (#1a1f5c) to electric purple (#7c3aed), with golden glowing particles floating throughout and subtle light effects creating depth.
Central visual elements (positioned behind text):
- 3D floating geometric cubes in glass morphism style, semi-transparent with frosted glass effect
- Each cube contains a glowing icon: AI brain circuit pattern, neural network nodes, data stream symbols
- Cubes connected by luminous golden (#f59e0b) energy lines creating a network visualization
- Soft particle system with small glowing golden dots scattered across the scene
- Light rays emanating from cubes with lens flare effects
Text layout (CRITICAL - all text centered both horizontally and vertically):
- CENTER of image: Large bold title 'Claude Sonnet 4' in white, modern sans-serif font with subtle glow
- Directly below title in CENTER: Chinese subtitle '超越GPT-4的推理能力' in elegant font, golden (#f59e0b) color, 90% opacity
IMPORTANT: All text must be centered in the MIDDLE of the image, not at top or bottom edges.
Visual effects:
- Bokeh depth of field effect in background
- Subtle vignette darkening at edges
- Glowing highlights on cube edges
- Professional color grading with high contrast
- Clean composition with breathing space around text
Style: ultra-modern, tech-forward, sci-fi inspired, professional, magazine-quality, premium feel
Visual mood: innovative, powerful, intelligent, cutting-edge, transformative, revolutionary
Color palette: blue-purple gradient (#1a1f5c to #7c3aed) with golden (#f59e0b) and white (#ffffff) accents
CRITICAL REQUIREMENTS:
- All Chinese text in simplified Chinese (简体中文)
- Chinese characters must be clear, readable, and accurate - NO garbled text
- Text positioned in CENTER (middle) of image both horizontally and vertically
- High quality, 16:9 aspect ratio
- Professional design suitable for tech article cover第6步:内容配图(按需 - 生成1张性能对比图)
判断:文章中有多个模型的性能数据对比 → 生成性能对比图
数据提取:
- Claude Sonnet 4:响应时间 850ms
- GPT-4 Turbo:响应时间 1100ms
- Gemini Pro:响应时间 950ms
提示词(基于类型1:柱状图):
A clean performance comparison chart for AI models response time.
Design: horizontal bar chart with 3 bars.
Style: minimalist, professional data visualization with gradient fills.
Color scheme: gradient from blue (#3b82f6) to purple (#7c3aed) for bars.
Elements:
- Y-axis: model names in Chinese (Claude Sonnet 4, GPT-4 Turbo, Gemini Pro)
- X-axis: response time in Chinese (响应时间 单位:毫秒)
- Bar labels: exact values: 850, 1100, 950
- Bars ordered from fastest to slowest (Claude at top)
Visual style: modern, clean, corporate presentation quality.
Background: white with subtle gradient.
All text in simplified Chinese, accurate and clear.
IMPORTANT: Use exact values 850, 1100, 950 milliseconds.
16:9 aspect ratio, high contrast for readability.生成:
python scripts/generate_image.py \
--prompt "[上述提示词]" \
--api gemini \
--output performance-comparison.png第7步:输出文章
输出文件:
Claude_Sonnet_4介绍.md(约2800字)cover.png(封面图)performance-comparison.png(性能对比图)
文章嵌入配图:
## 与竞品对比
在响应速度方面,Claude Sonnet 4表现出色。根据第三方评测数据,
Claude Sonnet 4的平均响应时间为850毫秒,比GPT-4 Turbo快23%,
比Gemini Pro快11%。

*图:主流AI模型响应速度对比(单位:毫秒)*
除了速度优势,Claude Sonnet 4在推理准确率上也有显著提升...关键学习点
1. AI模型文章要平衡技术性和通俗性
- 技术特性要解释清楚(不是罗列参数)
- 用实际例子说明能力
- 对比要客观公正
2. 性能对比图很有价值
- 数据必须准确(来源可信)
- 图表清晰(不超过5个对比项)
- 紧跟相关文字段落
3. 封面图要体现"高端感"
- 使用金色点缀(体现premium)
- 副标题突出核心优势
- 视觉元素:AI大脑、神经网络
---
示例3:开发工具/框架介绍文章
用户输入
帮我研究并写一篇介绍LangChain的文章,用DALL-E生成图片执行流程
第1步:理解需求
- 主题类型:开发框架介绍
- 核心角度:核心功能、安装使用、应用案例
- 目标读者:开发者(有一定技术基础)
- 特殊要求:使用DALL-E API生成图片
第2步:搜索信息(4轮)
第1轮 - 官方资源:
查询:"LangChain GitHub"
查询:"LangChain 官方文档"第2轮 - 技术教程:
查询:"LangChain 教程 入门"
查询:"LangChain 核心概念"第3轮 - 应用案例:
查询:"LangChain 应用案例 实战"
查询:"LangChain 项目示例"第4轮 - 生态和对比:
查询:"LangChain vs LlamaIndex"第3步:抓取内容(3-4篇)
抓取: 1. LangChain GitHub README 2. 官方文档Quick Start部分 3. 技术博客详细教程 4. 实战项目案例
提取要点:
- LangChain是什么:构建LLM应用的框架
- 核心组件:Chains、Agents、Memory、Tools
- 典型应用:聊天机器人、文档问答、数据分析
- 安装和快速开始代码
- 优势和局限
第4步:改写创作
文章结构: 1. 引子(120字):AI应用开发的痛点引入 2. LangChain是什么(350字):用"搭积木"比喻解释框架概念 3. 核心组件详解(700字):
- Chains(链):组合调用
- Agents(代理):自主决策
- Memory(记忆):上下文保持
- Tools(工具):外部能力
- 每个组件配简单代码示例
4. 快速上手(400字):
- 安装步骤
- Hello World示例
- 常见问题
5. 典型应用场景(450字):
- 文档问答系统(实际案例)
- 智能客服(实际案例)
- 数据分析助手(实际案例)
6. 进阶资源(200字):GitHub、文档、社区链接 7. 总结(150字):LangChain的价值
语言特色:
- 用"搭积木"比喻贯穿全文
- 代码示例精简(每个不超过10行)
- 强调实用性(不是学术介绍)
第5步:生成封面图(使用DALL-E)
主题分析:
- 关键词:LangChain、开发框架、链式调用、模块化
- 核心价值:"像搭积木一样构建AI应用"
- 目标情绪:高效、简单、创新
配色:开发工具类 → 绿橙渐变 (#10b981 → #f97316)
提示词(基于模板2:工具类,定制化):
A stunning, eye-catching cover image for LangChain framework tutorial article.
Design: vibrant gradient background from vibrant green (#10b981) to bright orange (#f97316), with glowing particles floating throughout and subtle light effects creating depth.
Central visual elements (positioned behind text):
- 3D floating modular blocks/cubes connected like chains in glass morphism style, semi-transparent with frosted glass effect
- Each cube contains a glowing icon: chain links, code brackets, API symbols, gear/cog icons
- Cubes connected by luminous cyan (#06b6d4) energy lines creating a modular architecture visualization
- Soft particle system with small glowing dots scattered across the scene
- Light rays emanating from cubes with lens flare effects
Text layout (CRITICAL - all text centered both horizontally and vertically):
- CENTER of image: Large bold title 'LangChain' in white, modern sans-serif font with subtle glow
- Directly below title in CENTER: Chinese subtitle '像搭积木一样构建AI应用' in elegant font, slightly smaller, 90% opacity
IMPORTANT: All text must be centered in the MIDDLE of the image, not at top or bottom edges.
Visual effects:
- Bokeh depth of field effect in background
- Subtle vignette darkening at edges
- Glowing highlights on cube edges
- Professional color grading with high contrast
- Clean composition with breathing space around text
Style: ultra-modern, developer-friendly, professional, magazine-quality, approachable yet powerful
Visual mood: efficient, modular, innovative, empowering, productive
Color palette: green-orange gradient (#10b981 to #f97316) with cyan (#06b6d4) and white (#ffffff) accents
CRITICAL REQUIREMENTS:
- All Chinese text in simplified Chinese (简体中文)
- Chinese characters must be clear, readable, and accurate - NO garbled text
- Text positioned in CENTER (middle) of image both horizontally and vertically
- High quality, 16:9 aspect ratio
- Professional design suitable for tech article cover调用DALL-E生成:
python scripts/generate_image.py \
--prompt "[上述提示词]" \
--api dalle \
--quality hd \
--size 1792x1024 \
--output cover.png第6步:内容配图(生成1张架构图)
判断:文章介绍了LangChain的四大核心组件及其关系 → 生成架构图
提示词(基于类型2:架构图):
A modern technical architecture diagram for LangChain framework.
Design: layered architecture with 4 main components, connected by arrows.
Components (as rounded rectangles, top to bottom):
- Tools (工具层): "搜索、计算、数据库" in Chinese
- Memory (记忆层): "对话历史、上下文" in Chinese
- Chains (链式层): "组合调用、工作流" in Chinese
- Agents (代理层): "自主决策、任务规划" in Chinese
Visual elements:
- Arrows showing data flow (bottom to top: input, top to bottom: output)
- Color coding: each layer has distinct color (green, blue, orange, purple)
- Small icons for each component (database, brain, chain link, robot)
- Chinese labels on arrows (数据流, API调用)
Style: flat design with subtle shadows, modern, clean, developer-friendly.
Background: white with subtle gradient.
All text in simplified Chinese, clear labels.
16:9 aspect ratio, professional quality.生成:
python scripts/generate_image.py \
--prompt "[上述提示词]" \
--api dalle \
--output architecture.png第7步:输出文章
输出文件:
LangChain框架介绍.md(约2600字)cover.png(DALL-E生成)architecture.png(DALL-E生成)
文章嵌入配图:
## 核心组件详解
LangChain的架构可以分为四个主要层次,每层负责不同的功能:

*图:LangChain四层架构示意*
让我们逐一了解每个组件:
### 1. Tools(工具层)
...关键学习点
1. 开发工具文章要注重实用性
- 提供可运行的代码示例
- 安装步骤要详细准确
- 强调实际应用价值
2. 架构图帮助理解复杂系统
- 分层清晰(不超过4层)
- 数据流向明确
- 配色区分不同模块
3. 使用DALL-E的注意事项
- 添加
--quality hd获得高清图 - 指定
--size 1792x1024确保16:9比例 - DALL-E对中文支持较弱,可能需要多次生成
---
通用最佳实践总结
📋 所有文章类型的共同点
1. 搜索策略:
- 第1轮:官方信息(权威性)
- 第2轮:技术细节(深度)
- 第3轮:应用案例/对比评测(实用性)
- 第4轮:补充和验证(完整性)
2. 改写原则:
- 用自己的语言(不照搬原文)
- 用比喻帮助理解(盖房子、搭积木、建筑师)
- 结构清晰(7部分结构)
- 长度适中(2000-3000字)
3. 封面图生成:
- 必须生成(强制要求)
- 选择合适的配色(AI类蓝紫、工具类绿橙)
- 副标题点明核心价值
- 验证中文清晰度
4. 内容配图决策:
- 新闻类:0张(仅封面)
- 介绍类:0-1张(架构图或对比图)
- 评测类:1-2张(性能对比、功能对比)
🎯 不同文章类型的差异
| 类型 | 重点 | 结构侧重 | 配图建议 |
|---|---|---|---|
| 新闻资讯 | 时效性、全面性 | 背景+事件+分析+展望 | 仅封面图 |
| AI模型介绍 | 能力展示、对比 | 功能+性能+案例+上手 | 封面+性能图 |
| 开发工具 | 实用性、上手 | 概念+组件+示例+应用 | 封面+架构图 |
| 概念科普 | 易懂性、深度 | 定义+原理+应用+影响 | 封面+对比图 |
| 教程指南 | 可操作性、详细 | 准备+步骤+实战+进阶 | 封面+流程图 |
💡 提升质量的技巧
1. 开头吸引人:
- 用实际场景引入(不是空洞介绍)
- 第一段就要让读者感兴趣
2. 中间有干货:
- 每个部分都有具体例子
- 数据要准确(标注来源)
- 代码要能运行
3. 结尾有升华:
- 不只是总结,要有展望
- 引发读者思考
- 留下深刻印象
4. 通篇易读性:
- 段落不超过5行
- 使用小标题分隔
- 适当使用列表和表格
- 避免长句(不超过25字)
---
快速参考:文章类型决策树
用户输入话题
│
├─ 包含"最新"、"发布"、"更名" → 新闻资讯类
│ └─ 搜索官方公告 + 社区反应
│ └─ 生成封面图(新闻感)
│ └─ 不生成内容配图
│
├─ 是AI模型/工具名称 → 介绍类
│ ├─ 是AI大模型 → AI模型介绍
│ │ └─ 搜索功能+评测+案例
│ │ └─ 生成封面图(高端感)
│ │ └─ 可选:性能对比图
│ │
│ └─ 是开发工具 → 工具介绍
│ └─ 搜索文档+教程+案例
│ └─ 生成封面图(开发者友好)
│ └─ 可选:架构图/流程图
│
└─ 是技术概念 → 概念科普
└─ 搜索定义+原理+应用
└─ 生成封面图(科普感)
└─ 可选:概念对比图---
提示:这些示例都是真实执行的流程,你可以参考这些模式来处理类似的任务!
AI图片生成指南
概述
AI生成图片可以有效补充技术文章的视觉内容,特别适合创建封面图、概念示意图和场景插画。
重要更新:现在支持直接调用生图API生成真实图片并嵌入文章,而不仅仅是提供提示词!
⚠️ 重要优化原则(2025-12-27更新)
1. 图片文字必须使用中文
- 所有图片上的文字都必须使用简体中文
- 文字数量要少,只保留关键信息
- 文字必须准确无误,不能出现错别字或拼写错误
- 在提示词中明确要求:"text in simplified Chinese, minimal text, accurate and clear"
2. 只生成真正必要的图片
必要图片的判断标准:
- ✅ 性能对比图:有明确的数据对比时必须生成
- ✅ 技术架构图:涉及复杂技术原理需要可视化时生成
- ✅ 封面图:可选,仅在需要吸引眼球时生成
- ❌ 装饰性配图:不要生成纯装饰性的图片
- ❌ 场景插画:除非对理解内容有实质帮助,否则不生成
生成决策流程: 1. 阅读文章内容 2. 判断是否有数据对比 → 是:生成对比图 3. 判断是否有复杂技术 → 是:生成架构图 4. 判断是否需要封面 → 视情况决定 5. 其他图片一律不生成
典型场景:
- 产品评测文章:生成1-2张(封面图 + 性能对比图)
- 技术解析文章:生成1-2张(技术架构图 + 可选封面图)
- 新闻资讯文章:生成0-1张(可选封面图)
3. 图片数量控制
- 每篇文章图片数量:1-3张(之前是4-6张)
- 优先级:数据图 > 架构图 > 封面图 > 其他
- 宁缺毋滥,质量优于数量
🚀 快速开始:调用生图API
方式一:使用脚本调用外部API
使用 scripts/generate_image.py 脚本可以直接调用Gemini或DALL-E API:
基本用法:
# 使用Gemini Imagen API (推荐)
python scripts/generate_image.py \
--prompt "图片描述提示词" \
--api gemini \
--output /home/claude/images/cover.png
# 使用DALL-E API (OpenAI)
python scripts/generate_image.py \
--prompt "图片描述提示词" \
--api dalle \
--output /home/claude/images/cover.png环境配置:
# 使用Gemini需要设置
export GEMINI_API_KEY="your-api-key"
# 使用DALL-E需要设置
export OPENAI_API_KEY="your-api-key"完整示例:
import subprocess
import os
# 生成封面图
subprocess.run([
'python', 'scripts/generate_image.py',
'--prompt', 'A modern cover image for an article about Claude AI. Style: minimalist, blue gradient.',
'--api', 'gemini',
'--output', '/home/claude/images/cover.png'
])
# 检查图片是否生成成功
if os.path.exists('/home/claude/images/cover.png'):
print("✅ 封面图生成成功")方式二:在claude.ai中使用Claude原生能力
如果在claude.ai环境中,可以直接使用Claude的图片生成能力(无需外部API):
请根据以下描述生成一张图片:
A modern cover image for an article about Claude AI.
Style: minimalist, professional, gradient blue background.Claude会直接生成图片,然后保存到本地并在文章中引用。
支持的API对比
| API | 优势 | 劣势 | 推荐场景 |
|---|---|---|---|
| Gemini Imagen | 质量高,速度快,价格合理 | 需要Google API密钥 | 所有场景,首选 |
| DALL-E 3 | 质量优秀,细节丰富 | 速度较慢,价格稍高 | 需要高质量封面图 |
| Claude原生 | 无需外部API,方便 | 仅在claude.ai可用 | claude.ai环境 |
工作流集成
在文章生成流程中,图片生成步骤如下:
# 1. 确定需要的图片类型和提示词
images_to_generate = [
{
"type": "cover",
"prompt": "封面图提示词",
"output": "/home/claude/images/cover.png"
},
{
"type": "concept",
"prompt": "概念图提示词",
"output": "/home/claude/images/concept.png"
},
{
"type": "scene",
"prompt": "场景图提示词",
"output": "/home/claude/images/scene.png"
}
]
# 2. 批量生成图片
for img in images_to_generate:
subprocess.run([
'python', 'scripts/generate_image.py',
'--prompt', img['prompt'],
'--api', 'gemini',
'--output', img['output']
])
# 3. 在文章中嵌入生成的图片
article = f"""
# 文章标题

## 核心概念

## 应用场景

"""
# 4. 将图片复制到输出目录
import shutil
for img in images_to_generate:
shutil.copy(img['output'], '/mnt/user-data/outputs/')---
何时使用AI生成图片
✅ 适合AI生成的场景
1. 封面图/首图
- 吸引读者点击的视觉设计
- 体现文章主题的创意图
- 品牌风格的标题图
2. 概念示意图
- 抽象技术概念的可视化
- 工作流程的示意图
- 系统架构的简化表现
3. 场景插画
- 使用场景的情景化展示
- 问题场景的描绘
- 解决方案的效果展示
4. 对比示意图
- 功能对比的视觉化
- 使用前后的对比
- 不同方案的比较
5. 装饰性配图
- 段落间的视觉分隔
- 增强阅读体验的插图
- 主题相关的背景图
❌ 不适合AI生成的场景
1. 实际产品截图
- 软件界面必须用真实截图
- 代码编辑器画面
- 实际操作步骤
2. 真实数据图表
- 性能测试数据
- 市场占有率图表
- GitHub Star趋势图
3. 官方品牌素材
- 产品Logo
- 官方宣传图
- 品牌标识
4. 技术细节图
- 复杂的架构图(需要准确性)
- 详细的流程图
- 代码结构图
技术文章的图片风格建议
整体风格原则
推荐风格:
- 🎨 现代简约 - 干净、专业
- 🎯 科技感 - 体现技术主题
- 📊 信息清晰 - 易于理解
- 🌈 色彩统一 - 全文风格一致
避免的风格:
- ❌ 过于卡通或幼稚
- ❌ 过度复杂或花哨
- ❌ 色彩杂乱无章
- ❌ 与技术主题无关
配色建议
科技蓝色系(适合AI、云计算、开发工具):
- 主色:深蓝 #1a73e8、科技蓝 #4285f4
- 辅色:浅蓝 #e8f4ff、白色 #ffffff
- 点缀:橙色 #ff6b35(用于强调)
紫色渐变系(适合AI、创新工具):
- 主色:深紫 #6366f1、亮紫 #a78bfa
- 辅色:浅紫 #f5f3ff、白色
- 点缀:粉色 #ec4899
绿色系(适合数据、性能、效率):
- 主色:深绿 #059669、亮绿 #10b981
- 辅色:浅绿 #d1fae5、白色
- 点缀:黄色 #fbbf24
黑白灰系(适合严肃、专业内容):
- 主色:深灰 #1f2937、黑色 #000000
- 辅色:浅灰 #f3f4f6、白色
- 点缀:蓝色或绿色
不同类型图片的提示词模板
1. 封面图/首图
目标:吸引眼球,传达文章主题
提示词模板:
A modern, clean cover image for a tech article about [主题].
Style: minimalist, professional, tech-focused.
Color scheme: [蓝色/紫色/绿色] gradient background.
Elements: [关键元素,如AI brain, code symbols, cloud icons, etc.]
Text: minimal text in simplified Chinese only, accurate and clear.
Composition: centered, with copy space for title text.
High quality, 16:9 aspect ratio.⚠️ 中文文字要求:
- 所有提示词必须包含:"text in simplified Chinese, minimal text, accurate"
- 图片上的文字要少而精,仅保留核心信息
- 避免复杂长句,使用简短词汇
具体示例:
示例1 - AI模型文章封面:
A modern, clean cover image for a tech article about Claude AI assistant.
Style: minimalist, professional, futuristic.
Color scheme: gradient from deep blue (#1a73e8) to light blue (#e8f4ff).
Elements: abstract AI neural network visualization, glowing nodes and connections, subtle circuit patterns in background.
Composition: centered abstract design with space at top for article title.
Mood: innovative, intelligent, approachable.
High quality, 16:9 aspect ratio, professional tech illustration.示例2 - 开源工具封面:
A modern cover image for an article about LangChain framework.
Style: clean, professional, developer-focused.
Color scheme: dark background (#1f2937) with bright green (#10b981) and blue (#4285f4) accents.
Elements: connected chain links representing workflow, code brackets, small icons of tools/modules.
Composition: horizontal layout with geometric shapes, space for title on left.
Mood: powerful, flexible, interconnected.
High quality, 16:9 aspect ratio.2. 概念示意图
目标:可视化抽象概念,帮助理解
提示词模板:
A simple, clear diagram illustrating [概念/原理].
Style: infographic, clean lines, minimal text.
Color scheme: [2-3种颜色].
Elements: [具体元素,如arrows, boxes, icons].
Layout: [flow chart / circular / hierarchical].
Professional, easy to understand, tech illustration style.具体示例:
示例1 - 工作流程图:
A clean diagram showing how LangChain processes user requests.
Style: flowchart with rounded boxes and arrows, modern infographic style.
Color scheme: white background, blue boxes (#4285f4), green success arrows (#10b981), orange highlights (#ff6b35).
Elements: 4-5 connected steps from left to right - User Input → LLM Processing → Tool Integration → Response Output.
Include simple icons in each box (message icon, brain icon, tools icon, checkmark).
Clean, professional, easy to read, tech documentation style.
Aspect ratio: 16:9, horizontal layout.示例2 - 架构示意图:
A simplified architecture diagram showing three-tier application structure.
Style: modern technical illustration, isometric or flat design.
Color scheme: dark blue background (#1a73e8), white/light blue components.
Elements: three distinct layers (Frontend, Backend, Database) represented as boxes or platforms, with bidirectional arrows showing data flow.
Include minimal icons (browser, server, database symbols).
Clean, professional, suitable for tech documentation.
No text labels needed - keep it visual.
Aspect ratio: 16:9 or 1:1.3. 场景插画
目标:展示实际应用场景,增加代入感
提示词模板:
An illustration showing [使用场景].
Style: modern flat design / isometric illustration.
Color scheme: [温暖/科技感的配色].
Characters: [可选:简化的人物剪影].
Environment: [办公室/家庭/移动场景].
Mood: [productive / innovative / user-friendly].
Clean, professional, tech article illustration.具体示例:
示例1 - 开发者使用场景:
An illustration of a developer using AI coding assistant at desk.
Style: modern flat design illustration, simple and clean.
Color scheme: purple gradient background (#6366f1 to #a78bfa), white desk, laptop.
Scene: minimalist home office setup, developer silhouette facing laptop, subtle AI sparkles/glow from screen.
Mood: focused, productive, empowered by technology.
No facial details needed - keep it simple and professional.
Aspect ratio: 16:9, horizontal composition.示例2 - 多设备使用场景:
An isometric illustration showing cross-platform application usage.
Style: clean isometric design, tech-focused.
Color scheme: light background with blue (#4285f4) and green (#10b981) device screens.
Elements: smartphone, tablet, laptop arranged in a connected layout, subtle data flow lines between devices.
Mood: connected, seamless, modern.
Professional tech illustration, minimal details.
Aspect ratio: 1:1 or 16:9.4. 对比示意图
目标:清晰展示差异或改进
提示词模板:
A before/after or comparison illustration showing [对比内容].
Style: split-screen or side-by-side layout.
Color scheme: [左侧/before用暗色或红色,右侧/after用亮色或绿色].
Elements: clearly distinguishable visual differences.
Labels: minimal, use visual cues like ✗ and ✓.
Professional comparison infographic style.具体示例:
示例1 - 性能对比:
A split-screen comparison: slow process vs fast process.
Style: minimalist infographic, clear visual contrast.
Color scheme: left side - gray/red tones showing slowness, right side - green/blue showing speed.
Left: loading spinner, progress bar at 30%, clock showing long time.
Right: checkmark, completed progress bar, clock showing short time.
Include simple speed indicators: tortoise icon left, rocket icon right.
Clean, professional, no text needed - purely visual.
Aspect ratio: 16:9, equal split down the middle.示例2 - 功能对比:
A side-by-side comparison of limited features vs full features.
Style: modern infographic, checklist visual.
Color scheme: white background, left boxes in gray with red ✗, right boxes in blue with green ✓.
Layout: 2 columns, 5 rows of feature boxes showing contrast.
Keep it abstract - use icons and checkmarks instead of text.
Professional, clean, tech comparison chart style.
Aspect ratio: 9:16 vertical or 1:1 square.5. 装饰性配图
目标:美化排版,提升视觉体验
提示词模板:
An abstract, decorative background for [主题] section.
Style: subtle, non-distracting, modern.
Color scheme: [柔和的渐变或单色].
Elements: [几何图形/流线/粒子效果].
Mood: professional, calm, tech-related.
Can be used as section divider or background.具体示例:
示例1 - 段落分隔图:
An abstract tech-themed divider image.
Style: minimalist geometric design, horizontal orientation.
Color scheme: gradient from blue (#1a73e8) to purple (#6366f1).
Elements: flowing lines, subtle circuit patterns, small glowing dots.
Composition: horizontal banner, very subtle and not distracting.
Can be used between article sections.
Aspect ratio: 21:9 ultra-wide, very flat.
Professional, modern, suitable for tech blog.示例2 - 背景纹理:
A subtle tech pattern background.
Style: minimalist, repeating pattern or gradient.
Color scheme: very light - soft blue (#e8f4ff) to white, or light gray (#f3f4f6).
Elements: faint grid lines, tiny dots, or subtle geometric shapes.
Very low contrast - should not distract from text.
Suitable as section background in article.
Seamless, tileable pattern.
High quality but subtle presence.风格统一性建议
为确保全文图片风格一致:
1. 确定主色调
在开始生成前,选择一个主色调贯穿全文:
- AI/大模型文章:蓝紫色系
- 开发工具文章:蓝绿色系
- 性能/数据文章:绿色系
- 企业级工具:黑灰蓝色系
2. 统一设计风格
整篇文章选择一种风格并坚持:
- 扁平化设计 (Flat Design)
- 等距插画 (Isometric)
- 渐变风格 (Gradient)
- 极简主义 (Minimalist)
3. 一致的复杂度
- 如果封面用简约风格,其他图也要简约
- 避免一张图很复杂,另一张很简单
- 保持视觉密度的一致性
4. 统一的提示词要素
在每个提示词中重复这些要素:
Style: [统一的风格描述]
Color scheme: [统一的配色]
Mood: professional, modern, tech-focused
Quality: high quality, clean, suitable for tech article图片生成工作流
Step 1: 规划图片需求
阅读完成的文章草稿,列出需要的图片:
示例规划表:
1. 封面图 - 主题:Claude AI - 类型:封面 - 风格:科技蓝
2. 概念图 - 展示:工作原理 - 类型:流程图 - 风格:科技蓝
3. 场景图 - 展示:使用场景 - 类型:插画 - 风格:科技蓝
4. 对比图 - 展示:性能提升 - 类型:对比 - 风格:科技蓝Step 2: 选择主色调和风格
基于文章主题选择:
- 主色调:例如 科技蓝 (#1a73e8, #4285f4, #e8f4ff)
- 设计风格:例如 现代扁平化设计
- 情绪基调:专业、创新、易用
Step 3: 编写统一的提示词
为每张图编写提示词,确保包含统一要素:
提示词检查清单:
- [ ] 明确了图片类型和内容
- [ ] 指定了统一的风格
- [ ] 使用了统一的配色方案
- [ ] 说明了构图和比例
- [ ] 标注了质量要求
- [ ] 确保了与主题的相关性
Step 4: 生成并检查
生成后检查:
- ✅ 风格是否一致
- ✅ 色调是否协调
- ✅ 清晰度是否足够
- ✅ 是否与内容相关
- ✅ 是否适合公众号排版
Step 5: 嵌入文章并标注
在文章中嵌入图片时:

*AI生成图片:展示Claude的核心工作流程*提示词优化技巧
1. 具体而非抽象
❌ "A nice tech image" ✅ "A clean infographic showing data flow with blue arrows on white background"
2. 描述风格参考
❌ "Modern style" ✅ "Modern flat design illustration, similar to tech blog graphics, professional and clean"
3. 明确构图
❌ "Some icons" ✅ "Three icons arranged horizontally in the center, equal spacing, on gradient background"
4. 控制复杂度
❌ "Complex system architecture" ✅ "Simplified 3-tier architecture with 3 main components and connecting arrows"
5. 指定情绪和氛围
❌ "Tech background" ✅ "Tech background with mood: innovative, trustworthy, user-friendly"
常见问题处理
Q: 生成的图片太复杂了怎么办?
A: 在提示词中强调:
- "minimalist"
- "simple"
- "clean design"
- "maximum 5 elements"
Q: 颜色不够统一?
A: 明确指定颜色代码:
- "Color scheme: only use #1a73e8 (blue), #ffffff (white), and #000000 (black)"
Q: 图片和文章主题不搭?
A: 在提示词开头明确主题:
- "For an article about [具体主题]..."
- "In the context of [技术领域]..."
Q: 风格不够专业?
A: 添加质量描述词:
- "professional tech illustration"
- "suitable for enterprise blog"
- "high-quality documentation style"
输出格式示例
在文章中整合AI生成图片时的格式:
## 核心功能
Claude Sonnet 4拥有强大的多模态理解能力:

*AI生成概念图:展示Claude如何同时处理文本、图片和文档*
如上图所示,Claude可以...
---
## 文章配图列表
### 真实截图(来自官方/网络)
1. **GitHub仓库首页**
- 来源:抓取自官方
- 图片URL: https://...
### AI生成图片
1. **封面图**
- 类型:AI生成
- 主题:Claude AI助手
- 风格:科技蓝渐变,现代简约
- 用途:文章开头
2. **工作原理图**
- 类型:AI生成
- 内容:多模态处理流程
- 风格:蓝色信息图
- 用途:"核心功能"部分
3. **应用场景图**
- 类型:AI生成
- 内容:开发者使用场景
- 风格:扁平化插画
- 用途:"使用场景"部分最佳实践总结
1. ✅ 混合使用:真实截图 + AI生成图,各取所长 2. ✅ 提前规划:先确定需要哪些图,再统一生成 3. ✅ 风格统一:全文使用相同的色系和风格 4. ✅ 简约优先:技术文章配图宜简不宜繁 5. ✅ 标注来源:清楚标明哪些是AI生成 6. ✅ 质量检查:生成后检查清晰度和相关性 7. ✅ 适度装饰:不要为了配图而配图
通过合理使用AI生成图片,可以让技术文章更加生动专业,同时保持高效的创作流程!
API 配置指南(小龙虾适配版)
默认:即梦文生图3.0(火山引擎)
即梦是字节跳动旗下的AI绘画工具,文生图3.0在文字响应、排版美感、语义理解方面表现优秀,且支持中文提示词。
1. 获取密钥
1. 注册/登录火山引擎:https://console.volcengine.com/ 2. 开通「智能视觉」服务 3. 获取 AccessKey:https://console.volcengine.com/iam/keymanage/
2. 设置环境变量
export VOLC_ACCESSKEY="your_access_key"
export VOLC_SECRETKEY="your_secret_key"
# 建议写入 ~/.bashrc 持久化
echo 'export VOLC_ACCESSKEY="your_access_key"' >> ~/.bashrc
echo 'export VOLC_SECRETKEY="your_secret_key"' >> ~/.bashrc
source ~/.bashrc3. 测试
python scripts/generate_image.py \
--prompt "一只可爱的小龙虾,科技风格" \
--api jimeng \
--output test.png看到 ✅ 图片已生成: test.png 就配置成功了!
尺寸预设
| 宽高比 | 标清1K | 高清2K |
|---|---|---|
| 1:1 | 1328x1328 | 2048x2048 |
| 4:3 | 1472x1104 | 2304x1728 |
| 16:9 | 1664x936 | 2560x1440 |
用 --quality hd 切换高清模式。
---
备选:Gemini API
export GEMINI_API_KEY="your-api-key"
python scripts/generate_image.py \
--prompt "提示词" \
--api gemini \
--output cover.png获取密钥:https://aistudio.google.com/app/apikey
备选:DALL-E API
export OPENAI_API_KEY="sk-your-key"
python scripts/generate_image.py \
--prompt "提示词" \
--api dalle \
--output cover.png获取密钥:https://platform.openai.com/api-keys
---
常见问题
Q: 即梦API报错 50412/50413? A: 提示词含敏感内容,修改提示词后重试。
Q: 即梦API报错 50429? A: QPS超限,等几秒再试。
Q: 生成速度慢? A: 即梦是异步API,通常需要 5-15 秒。脚本会自动轮询等待。
内容配图生成指南
核心原则:宁缺毋滥,质量优于数量。只在真正需要时才生成内容配图(0-2张)。
---
一、判断是否需要内容配图
决策流程图
┌─────────────────────┐
│ 阅读文章正文内容 │
└──────────┬──────────┘
│
┌──────▼──────┐
│ 是否有明确的 │
│ 数据对比? │
└──┬───────┬──┘
│ │
是 否
│ │
生成对比图 │
│ ┌──▼──────┐
│ │是否有复杂│
│ │技术架构?│
│ └──┬───┬──┘
│ │ │
│ 是 否
│ │ │
│ 生成 │
│ 架构图 │
│ │ │
┌──▼───────▼───▼─┐
│ 其他情况一律 │
│ 不生成配图 │
└─────────────────┘生成内容配图的典型场景
场景1:性能/数据对比
何时生成:
- 文章中提到多个产品/模型的性能数据
- 有明确的指标对比(速度、准确率、成本等)
- 数字较多,纯文字不够直观
示例触发条件:
# 文章中出现类似内容
"Claude Sonnet 4在推理速度上比GPT-4快30%,比Gemini Pro快15%..."
"VSCode的启动时间从2.3秒降至0.8秒..."
"Cursor的用户满意度达到92%,而VSCode为87%..."生成内容:横向对比柱状图、雷达图、性能曲线图
场景2:技术架构说明
何时生成:
- 介绍系统架构、框架设计
- 解释复杂的数据流向、调用关系
- 说明多层次的技术栈
示例触发条件:
# 文章中出现类似内容
"VSCode的AI功能分为三层:UI层、Agent层、模型层..."
"数据处理流程:采集 → 清洗 → 转换 → 加载..."
"微服务架构包括:API网关、服务注册中心、配置中心..."生成内容:架构示意图、流程图、层次结构图
场景3:概念对比/前后差异
何时生成:
- 对比新旧两种方式
- 解释范式转变
- 说明升级带来的变化
示例触发条件:
# 文章中出现类似内容
"传统编程 vs Vibe Coding"
"手动配置 vs 自动化配置"
"单体应用 vs 微服务架构"生成内容:左右对比图、before/after图
不应该生成配图的情况
❌ 不要生成的场景:
1. 装饰性配图
- 仅为美观,不传达信息
- 通用的科技插画、人物剪影
- 与内容关系不大的背景图
2. 重复性配图
- 已有封面图表达了相同主题
- 与文字描述完全一致,没有额外信息
3. 简单文字可说清的内容
- 简单列表(3-5项)用文字更清晰
- 单一步骤流程
- 仅有1-2个数据点
4. 场景插画
- "一个人在电脑前工作"
- "团队开会讨论"
- "未来城市科技场景"
配图数量控制
| 文章类型 | 封面图 | 内容配图 | 总计 | 说明 |
|---|---|---|---|---|
| 产品评测 | 1张(强制) | 0-2张 | 1-3张 | 性能对比图、功能对比图 |
| 技术解析 | 1张(强制) | 0-2张 | 1-3张 | 架构图、流程图 |
| 新闻资讯 | 1张(强制) | 0张 | 1张 | 新闻类不需要内容配图 |
| 教程指南 | 1张(强制) | 0-1张 | 1-2张 | 流程图(可选),步骤用文字 |
| 概念科普 | 1张(强制) | 0-1张 | 1-2张 | 概念对比图(可选) |
关键原则:内容配图总数不超过2张(封面图除外)
---
二、内容配图的类型和提示词
类型1:性能对比柱状图
适用场景:对比3-5个产品/模型的性能指标
提示词模板:
A clean performance comparison chart for [主题].
Design: horizontal bar chart with 3-4 bars, each representing a different [产品/模型].
Style: minimalist, professional data visualization with gradient fills.
Color scheme: gradient from blue (#3b82f6) to purple (#7c3aed) for bars.
Elements:
- Y-axis: product names in simplified Chinese ([产品1], [产品2], [产品3])
- X-axis: performance metric in Chinese ([指标名称,如"响应速度(ms)"])
- Bar labels: exact values at the end of each bar
- Legend: simple and clear in Chinese
Visual style: modern, clean, corporate presentation quality.
Background: white or light gradient, not distracting.
All text in simplified Chinese, accurate and clear.
16:9 aspect ratio, high contrast for readability.变量填充示例:
[主题] = "AI模型响应速度对比"
[产品1] = "Claude Sonnet 4"
[产品2] = "GPT-4 Turbo"
[产品3] = "Gemini Pro"
[指标名称] = "响应时间(秒)"设计要点:
- 最慢的数据放最上方,最快的放最下方(或反之,保持一致)
- 使用渐变色而非纯色(更现代)
- 数值要清晰标注
- 避免3D效果(难以准确读数)
类型2:技术架构图
适用场景:展示系统分层、模块关系、数据流
提示词模板:
A modern technical architecture diagram for [系统名称].
Design: layered architecture with 3-4 tiers, connected by arrows showing data flow.
Style: clean, professional, developer-oriented.
Layers from top to bottom:
- [层级1]: [组件名称] - represented as rounded rectangles
- [层级2]: [组件名称] - represented as rounded rectangles
- [层级3]: [组件名称] - represented as rounded rectangles
Visual elements:
- Arrows showing data flow direction (with Chinese labels like "数据流", "API调用")
- Color coding: each layer has a distinct color (blue, green, orange)
- Icons: subtle tech icons for each component (API, database, UI)
Style: flat design with subtle shadows, modern and clean.
Background: light gradient, not distracting.
All text in simplified Chinese, clear labels.
16:9 aspect ratio, high quality.变量填充示例:
[系统名称] = "VSCode AI架构"
[层级1] = "UI层:编辑器界面、Chat面板"
[层级2] = "Agent层:Copilot、任务执行器"
[层级3] = "模型层:Claude、GPT、Gemini"设计要点:
- 从上到下或从左到右的清晰流向
- 每层用不同颜色区分
- 箭头明确标注数据流向
- 避免过于复杂(不超过10个模块)
类型3:概念对比图(左右对比)
适用场景:对比两种方式、新旧差异、优劣分析
提示词模板:
A clear comparison image showing [概念A] vs [概念B].
Layout: split screen design, left side for [概念A], right side for [概念B].
Design:
- Left side: [概念A的视觉表现,如"传统编程:一行行代码"]
- Color: cooler tones (blue-gray) representing traditional/old
- Visual: [具体视觉元素]
- Right side: [概念B的视觉表现,如"Vibe Coding:对话框和AI"]
- Color: warmer/brighter tones (green-blue) representing modern/new
- Visual: [具体视觉元素]
- Center: "VS" or arrow showing transformation
Text labels:
- Left: "[概念A名称]" in Chinese
- Right: "[概念B名称]" in Chinese
- Optional: key differences listed below each side in Chinese
Style: clean, modern, infographic-style, easy to understand.
All text in simplified Chinese, clear and readable.
16:9 aspect ratio.变量填充示例:
[概念A] = "传统编程"
[概念A的视觉表现] = "code editor with lines of code, manual typing"
[概念B] = "Vibe Coding"
[概念B的视觉表现] = "chat interface with AI assistant, natural language commands"设计要点:
- 左右明显区分(颜色、风格)
- 中间的VS或箭头醒目
- 关键差异点简洁列出(不超过5点)
类型4:流程图
适用场景:展示工作流程、数据处理步骤
提示词模板:
A modern workflow diagram for [流程名称].
Design: horizontal flow from left to right with 4-6 steps.
Steps:
1. [步骤1] - represented as rounded rectangle with icon
2. [步骤2] - represented as rounded rectangle with icon
3. [步骤3] - represented as rounded rectangle with icon
4. [步骤4] - represented as rounded rectangle with icon
Visual elements:
- Arrows connecting steps (left to right, bold and clear)
- Icons inside each step box (search, process, write, check)
- Color gradient: steps transition from blue to green across the flow
- Chinese labels inside and below each step
Style: clean, modern, professional process diagram.
Background: white or subtle gradient.
All text in simplified Chinese, clear and concise.
16:9 aspect ratio.设计要点:
- 步骤数量:4-6步(不超过8步)
- 箭头清晰,流向明确
- 每步配一个图标增强识别性
- 颜色渐变显示进展
类型5:数据雷达图(多维对比)
适用场景:对比多个产品在多个维度的表现
提示词模板:
A professional radar chart comparing [对比主题].
Design: spider/radar chart with 5-6 dimensions, showing 2-3 products.
Dimensions (axes):
- [维度1,如"性能"]
- [维度2,如"易用性"]
- [维度3,如"成本"]
- [维度4,如"生态"]
- [维度5,如"扩展性"]
Products (lines):
- [产品1]: blue line (#3b82f6)
- [产品2]: purple line (#7c3aed)
- [产品3]: green line (#10b981)
Visual elements:
- Semi-transparent fill for each product
- Clear legend in Chinese
- Axis labels in Chinese
- Grid lines for reference (subtle)
Style: modern, professional, data visualization quality.
All text in simplified Chinese.
Square aspect ratio (1:1), high quality.设计要点:
- 维度数:5-6个(太少失去意义,太多难以阅读)
- 产品数:2-3个(不超过4个)
- 使用半透明填充,多条线重叠时仍可见
- 每个维度的量表一致(如都是0-10分)
---
三、生成执行步骤
步骤1:从文章中提取数据
数据收集清单:
如果是对比图:
- [ ] 产品/模型名称(2-5个)
- [ ] 对比指标(响应时间、准确率、价格等)
- [ ] 具体数值(带单位)
- [ ] 数据来源(确保准确性)
如果是架构图:
- [ ] 系统名称
- [ ] 层级划分(2-4层)
- [ ] 每层的主要组件
- [ ] 组件间的关系和数据流向
如果是流程图:
- [ ] 流程名称
- [ ] 主要步骤(4-6步)
- [ ] 每步的简短描述
- [ ] 步骤顺序和依赖关系
步骤2:选择合适的图表类型
决策矩阵:
| 数据特征 | 推荐图表类型 | 原因 |
|---|---|---|
| 2-5个产品,单一指标 | 横向柱状图 | 直观,易对比 |
| 2-3个产品,多维度 | 雷达图 | 全面展示优势劣势 |
| 分层结构 | 架构图 | 清晰显示层次关系 |
| 顺序步骤 | 流程图 | 强调先后顺序 |
| 新旧对比 | 左右对比图 | 突出差异 |
步骤3:构建提示词
组装检查清单:
- [ ] 选择了正确的模板
- [ ] 填充了所有变量(产品名、指标名等)
- [ ] 强调了中文要求
- [ ] 指定了配色方案
- [ ] 明确了图表类型(bar chart, architecture diagram等)
- [ ] 包含质量关键词(professional, clean, modern)
提示词质量自检: 1. 是否包含"simplified Chinese"至少2次? 2. 是否明确了颜色代码或配色方案? 3. 是否指定了具体的图表类型? 4. 是否限制了元素数量(避免过于复杂)?
步骤4:调用API生成
python scripts/generate_image.py \
--prompt "你构建的完整提示词" \
--api gemini \
--output "输出路径/comparison.png"参数建议:
- 对比图、流程图:使用16:9比例(
--aspect-ratio 16:9) - 雷达图、架构图:可使用1:1比例(更紧凑)
步骤5:验证和优化
验证清单:
- [ ] 数据准确(数值、名称与文章一致)
- [ ] 中文清晰(无乱码、可读)
- [ ] 视觉清晰(元素不重叠、对比度足够)
- [ ] 配色合理(与封面图风格协调)
- [ ] 传达信息明确(读者一眼能看懂)
常见问题修复:
| 问题 | 修复方法 |
|---|---|
| 数据错误 | 重新生成,提示词中强调准确数据:"exactly these values: A=90, B=85, C=78" |
| 文字太小 | 强调:"large, readable labels" |
| 颜色混乱 | 指定具体色彩代码:"use only #3b82f6, #7c3aed, #10b981" |
| 太复杂 | 简化:"show only 3 products, 4 metrics maximum" |
---
四、嵌入文章的最佳实践
嵌入位置
原则:图片应紧跟相关文字段落之后
示例:
## VSCode与Cursor的性能对比
在响应速度方面,VSCode最新版本表现出色。根据测试数据,
VSCode的启动时间为0.8秒,比Cursor的1.2秒快33%。在代码
补全延迟方面,VSCode平均为150ms,而Cursor为180ms。

*图:VSCode vs Cursor 性能对比*
从数据可以看出,VSCode在性能优化上已经赶上并超越了Cursor...图注(Caption)规范
格式:

*图X:简短的图片说明*图注内容:
- 简洁说明(不超过15字)
- 不重复图片中已有的信息
- 可选:数据来源
示例:
✅ 好的图注
*图1:主流AI模型响应速度对比(单位:毫秒)*
❌ 不好的图注
*图1:这张图展示了Claude Sonnet 4、GPT-4和Gemini Pro三个模型在响应速度方面的详细对比,可以看出Claude最快*
(太啰嗦,信息已在图中)文件命名规范
命名模式:{类型}-{主题}.png
示例:
performance-comparison.png # 性能对比图
architecture-diagram.png # 架构图
workflow.png # 流程图
before-after-comparison.png # 前后对比图避免:
image1.png # 无意义的名称
图片_final_v2.png # 混用中英文、版本号图片大小控制
目标:
- 封面图:500-800KB
- 内容配图:200-500KB
- 总计:< 2MB
过大时压缩:
# 使用ImageMagick压缩(如果可用)
convert input.png -quality 85 -resize 1920x1080 output.png---
五、高级技巧
技巧1:数据可视化颜色选择
颜色语义:
- 蓝色:稳定、可靠、专业(适合主导产品)
- 绿色:增长、正面、环保(适合性能提升)
- 橙色:警示、次要、中性(适合对比项)
- 红色:警告、减少、负面(慎用)
- 紫色:创新、高端、未来(适合新技术)
对比配色方案:
- 蓝 vs 紫:#3b82f6 vs #7c3aed(经典对比)
- 蓝 vs 绿:#3b82f6 vs #10b981(性能对比)
- 橙 vs 蓝:#f97316 vs #3b82f6(冷暖对比)
技巧2:确保数据准确性
在提示词中嵌入精确数据:
Create a bar chart with these EXACT values:
- Claude Sonnet 4: 850ms
- GPT-4 Turbo: 1100ms
- Gemini Pro: 950ms
IMPORTANT: Use these exact numbers, do not approximate.生成后验证:
- 目测检查数值
- 如有误差,重新生成并强调精确性
技巧3:风格统一
如果生成多张配图:
- 使用相同的配色方案
- 使用一致的字体风格
- 保持相似的设计语言(扁平/3D、极简/丰富)
示例提示词统一元素:
Style consistency:
- Color palette: blue (#3b82f6), purple (#7c3aed), green (#10b981)
- Design: flat, modern, minimal
- Font: sans-serif, bold for titles
- Background: white with subtle gradient技巧4:针对移动端优化
考虑要素:
- 文字大小:移动端阅读时文字要足够大
- 对比度:确保在小屏幕上仍可辨识
- 简化:移动端避免过于复杂的图表
提示词调整:
Design for mobile viewing:
- Large, bold labels (minimum 14pt equivalent)
- High contrast colors
- Simple layout with clear spacing
- Maximum 4 data points for clarity---
六、常见问题
Q1:何时该生成2张内容配图,何时只生成1张?
答:遵循"需求优先"原则:
- 如果文章有性能对比和架构说明,两者都很重要 → 生成2张
- 如果只有一个复杂点需要图解 → 生成1张
- 如果都是简单内容 → 0张
经验法则:如果你需要思考"要不要生成",那就不生成。
Q2:生成的图表数据与文章不符怎么办?
答: 1. 在提示词中用大写强调:EXACT VALUES: A=85, B=90, C=78 2. 重新生成2-3次,选择最准确的 3. 如仍不准确,考虑用文字列表代替图表
Q3:生成的架构图太复杂,看不清?
答:简化策略:
- 减少层级(从4层减至3层)
- 合并同类组件(将多个微服务合并为"微服务集群")
- 去除次要连接线(只保留主要数据流)
- 分两张图展示(一张总览,一张局部放大)
Q4:如何判断配图是否真的有用?
自测:
- 遮住图片,只读文字 → 是否能理解?
- 能理解 → 配图可能不必要
- 难以理解 → 配图有价值
- 给非专业人士看图 → 是否秒懂?
- 秒懂 → 好配图
- 困惑 → 需要改进或删除
---
七、内容配图检查清单
生成前检查
- [ ] 确认真的需要这张配图(不是装饰)
- [ ] 选择了合适的图表类型
- [ ] 准备了准确的数据
- [ ] 配色与封面图协调
生成后检查
- [ ] 数据准确无误
- [ ] 中文清晰可读
- [ ] 视觉清晰不混乱
- [ ] 文件大小合理(< 500KB)
- [ ] 文件命名规范
嵌入文章后检查
- [ ] 位置紧跟相关段落
- [ ] 有恰当的图注
- [ ] 与文字内容呼应
- [ ] 在移动端可读
---
八、最佳实践总结
✅ 应该做的
1. 少而精 - 0-2张配图,每张都有明确作用 2. 数据准确 - 图表数据必须与文章一致 3. 风格统一 - 配图与封面图配色协调 4. 适时插入 - 紧跟相关文字段落 5. 移动友好 - 确保小屏幕可读
❌ 不应该做的
1. 为了配图而配图 - 没有信息价值的装饰图 2. 图表过于复杂 - 超过5个数据点或10个组件 3. 风格杂乱 - 每张图配色、风格完全不同 4. 数据错误 - 图表数值与文字不符 5. 文件过大 - 单张图超过1MB
📊 质量标准
优秀内容配图(满分10分):
- 信息价值:4分(传达了文字难以表达的信息)
- 准确性:3分(数据、标签完全准确)
- 清晰度:2分(视觉清晰、易读)
- 风格协调:1分(与整体风格一致)
及格线:7分 优秀线:9分
---
记住:内容配图不是必需的,但如果生成,必须有价值、准确、清晰!
封面图生成详细指南
重要性:封面图是文章打开率的关键因素,必须生成一张高质量、吸引眼球的主题封面图。
---
一、封面图设计原则
封面图的目的是吸引读者点击,必须遵循以下设计原则:
1. 鲜明的主题色彩
根据文章类型选择合适的配色方案:
| 文章类型 | 推荐配色 | 色彩代码 | 视觉效果 |
|---|---|---|---|
| AI/科技类 | 蓝紫渐变 | #1a1f5c → #7c3aed | 未来感、科技感 |
| 工具/效率类 | 绿橙渐变 | #10b981 → #f97316 | 活力、高效 |
| 数据/分析类 | 蓝绿渐变 | #0891b2 → #06b6d4 | 专业、理性 |
| 创意/设计类 | 粉紫渐变 | #ec4899 → #a855f7 | 创新、灵动 |
| 企业/商业类 | 深蓝金色 | #1e3a8a → #f59e0b | 稳重、高端 |
色彩搭配技巧:
- 使用渐变比纯色更有层次感
- 避免超过3种主色
- 确保文字与背景对比度足够(至少4.5:1)
2. 清晰的视觉层次
三层结构: 1. 主标题:大而醒目(中英文结合更有设计感)
- 字体:粗体、现代无衬线字体
- 颜色:白色或高对比度颜色
- 位置:画面中央(垂直和水平居中)
2. 副标题:简短精炼的中文说明(1句话概括核心价值)
- 字体:略小于主标题,优雅字体
- 颜色:稍透明的白色(80-90%透明度)
- 位置:主标题下方
3. 视觉元素:与主题相关的图标、插画或抽象图形
- 3D立体元素优于平面图形
- 有动感(箭头、粒子、光效)
- 不抢主标题的风头
示例布局:
┌─────────────────────────────────────┐
│ [渐变背景 + 粒子效果] │
│ │
│ [3D视觉元素:代码/AI/图表] │
│ │
│ 主标题(大、粗、白) │
│ 副标题:核心价值说明 │
│ 【居中显示,中央位置】 │
│ │
│ [装饰性光效] │
└─────────────────────────────────────┘3. 现代化设计风格
当前流行趋势:
- ✅ 3D立体元素(球体、立方体、浮动面板)
- ✅ 玻璃拟态效果(半透明、模糊背景)
- ✅ 渐变光效(发光边缘、光束)
- ✅ 粒子系统(飘浮的点、星星)
- ✅ 简约留白(不拥挤,有呼吸感)
过时风格(避免):
- ❌ 扁平化纯色块
- ❌ 拟物化写实风格
- ❌ 过度装饰的花纹
- ❌ 低分辨率位图
4. 情感共鸣
封面图要激发读者的情绪反应:
| 目标情绪 | 视觉策略 | 文案方向 | 示例 |
|---|---|---|---|
| 好奇 | 神秘光效、未知元素 | "你不知道的秘密" | AI能做到这一步了? |
| 兴奋 | 爆炸效果、上升箭头 | "改变工作方式" | 效率提升10倍 |
| 痛点 | 对比图、前后差异 | "告别重复劳动" | 从2小时到20分钟 |
| 启发 | 灯泡、思考元素 | "新视角" | 重新思考编程 |
| 价值 | 奖杯、勋章 | "从小白到专家" | 零基础上手 |
5. 禁忌事项
❌ 不要做的事:
- 纯文字堆砌,没有视觉设计
- 颜色过于暗淡(灰色调)或刺眼(纯红、纯绿)
- 文字过多,信息过载(超过15个汉字)
- 与主题完全无关的装饰图(如随机的风景、人物)
- 使用低质量的素材(模糊、锯齿)
- 违反版权的品牌logo或图片
---
二、封面图提示词模板
根据文章类型选择合适的模板,然后定制化修改。
模板1:AI/大模型类
适用场景:介绍AI模型、机器学习工具、智能应用
A stunning, eye-catching cover image for [主题名称] article.
Design: vibrant gradient background from deep blue (#1a1f5c) to electric purple (#7c3aed), with glowing particles floating throughout and subtle light effects creating depth.
Central visual elements (positioned behind text):
- 3D floating geometric cubes in glass morphism style, semi-transparent with frosted glass effect
- Each cube contains a glowing icon: code brackets symbol, AI brain circuit pattern, automation gear
- Cubes connected by luminous cyan (#06b6d4) energy lines creating a network visualization
- Soft particle system with small glowing dots scattered across the scene
- Light rays emanating from cubes with lens flare effects
Text layout (CRITICAL - all text centered both horizontally and vertically):
- CENTER of image: Large bold title '[主题名称]' in white, modern sans-serif font with subtle glow
- Directly below title in CENTER: Chinese subtitle '[一句话价值说明]' in elegant font, slightly smaller, 90% opacity
IMPORTANT: All text must be centered in the MIDDLE of the image, not at top or bottom edges.
Visual effects:
- Bokeh depth of field effect in background
- Subtle vignette darkening at edges
- Glowing highlights on cube edges
- Professional color grading with high contrast
- Clean composition with breathing space around text
Style: ultra-modern, tech-forward, sci-fi inspired, professional, magazine-quality
Visual mood: innovative, powerful, intelligent, cutting-edge, transformative
Color palette: blue-purple gradient (#1a1f5c to #7c3aed) with cyan (#06b6d4) and white (#ffffff) accents
CRITICAL REQUIREMENTS:
- All Chinese text in simplified Chinese (简体中文)
- Chinese characters must be clear, readable, and accurate - NO garbled text
- Text positioned in CENTER (middle) of image both horizontally and vertically
- High quality, 16:9 aspect ratio
- Professional design suitable for tech article cover变量替换:
[主题名称]:如"Claude Sonnet 4"、"GPT-5"、"Midjourney v7"[一句话价值说明]:如"超越人类的推理能力"、"让AI秒懂你的需求"
配色变体:
- 深度学习主题:深蓝 → 青色 (#0f172a → #06b6d4)
- 创意AI主题:紫色 → 粉色 (#7c3aed → #ec4899)
模板2:开发工具/框架类
适用场景:介绍编程框架、开发工具、技术栈
A professional cover image for [工具名] tutorial article.
Design: clean gradient background from [主题色1] to [主题色2] with subtle code-related visual elements.
Background elements: 3D modular blocks or connected nodes representing the tool's architecture, with floating code snippets subtly integrated.
Text layout (CRITICAL - centered composition):
- CENTER (vertically and horizontally): main title "[工具名]" in bold, white font with slight shadow
- Directly below title (still in center area): subtitle "[核心价值说明]" in Chinese, elegant font
IMPORTANT: All text must be positioned in the CENTER of the image, both horizontally and vertically, NOT at top or sides.
Visual elements: terminal window frames, abstract code syntax highlighting, geometric shapes connected by lines around the centered text.
Style: developer-friendly, modern, clean, inspiring, minimal but not boring.
Visual mood: efficient, reliable, professional.
All text in simplified Chinese, clear and minimal.
16:9 aspect ratio, high resolution.示例填充:
[工具名] = "VSCode"
[核心价值说明] = "从代码编辑器到AI编程工作室"
[主题色1] = "#10b981" (绿色)
[主题色2] = "#f97316" (橙色)视觉元素选择:
- 前端框架:组件拼图、响应式网格
- 后端框架:服务器集群、API管道
- 数据库工具:数据流动、表格结构
- 测试工具:检查标记、流程图
模板3:效率/生产力类
适用场景:介绍提效工具、自动化方案、工作流优化
An inspiring cover image for productivity article about [主题].
Design: energetic gradient background (orange #f97316 to pink #ec4899, or green #10b981 to blue #3b82f6).
Background elements: upward arrow, rocket launching, or growth chart visualization in 3D, with dynamic motion effects subtly integrated.
Text layout (CRITICAL - centered composition):
- CENTER (vertically and horizontally): bold headline "[主题]" in large white font
- Directly below headline (still in center area): Chinese tagline "[提效价值,如:从2小时到20分钟]" with number highlighting
IMPORTANT: All text must be positioned in the CENTER of the image, both horizontally and vertically, NOT at top or bottom.
Visual elements: clock/timer symbols, speed lines, ascending graphs, productivity icons around the centered text.
Visual mood: energetic, optimistic, empowering, motivational.
Style: clean, modern, vibrant, action-oriented.
All text in simplified Chinese, bold and clear.
16:9 aspect ratio, professional quality.价值表达技巧:
- 使用具体数字:"效率提升10倍"、"从2小时到20分钟"
- 使用对比:"告别手工操作"、"自动化一切"
- 使用动作词:"飞速提升"、"秒级完成"
模板4:新闻/资讯类
适用场景:行业动态、技术新闻、产品发布
A modern news cover image for [新闻主题].
Design: bold gradient from dark [品牌色] to lighter shade, with geometric patterns and light streaks.
Background elements: 3D representation of the news topic (product, logo reimagined, or abstract symbol) subtly integrated, with breaking news effect.
Text layout (CRITICAL - centered composition):
- Small badge (above main title, center area): urgent tag "重磅" or "最新"
- CENTER (vertically and horizontally): main "[新闻标题]" in bold impactful font
- Directly below main title (still in center area): Chinese description "[关键信息]"
IMPORTANT: All main text must be positioned in the CENTER of the image, both horizontally and vertically, NOT at top or bottom edges.
Visual elements: alert icons, spotlight effects, geometric frames, modern tech aesthetics around the centered text.
Visual mood: urgent, important, timely, authoritative.
Style: news-worthy, professional, attention-grabbing.
All text in simplified Chinese, clear hierarchy.
16:9 aspect ratio.紧迫感营造:
- 使用警示色:红色、橙色元素
- 添加标签:"独家"、"重磅"、"突发"
- 使用放射状光线、聚光灯效果
模板5:教程/指南类
适用场景:技术教程、入门指南、实战案例
A friendly tutorial cover image for [教程主题].
Design: approachable gradient (soft blue to green, or warm orange to yellow), with guiding visual elements.
Background elements: step-by-step pathway visualization in 3D, or learning journey metaphor (stairs, roadmap) subtly integrated.
Text layout (CRITICAL - centered composition):
- CENTER (vertically and horizontally): main "[教程标题]" in friendly bold font
- Directly below main title (still in center area): subtitle "[目标受众/学习目标]" in Chinese, encouraging tone
IMPORTANT: All text must be positioned in the CENTER of the image, both horizontally and vertically, NOT at top or bottom.
Visual elements: checkmarks, progress indicators, friendly icons, guide arrows around the centered text.
Visual mood: encouraging, accessible, clear, supportive.
Style: approachable, modern, not intimidating, beginner-friendly.
All text in simplified Chinese, warm and inviting.
16:9 aspect ratio.亲和力营造:
- 使用暖色系(橙黄、浅蓝、绿色)
- 添加进度指示器、步骤图标
- 避免过于冷酷的科技感
---
三、生成封面图的执行步骤
步骤1:分析主题,确定封面图方向
分析清单:
1. 提取主题关键词(2-3个核心词)
- 示例:"VSCode更名" → 关键词:VSCode、AI、编辑器、转型
2. 概括核心价值(一句话)
- 方法:用"让X可以Y"或"从X到Y"的句式
- 示例:"从代码编辑器到氛围编程工作室"
3. 确定目标情绪
- 问自己:读者看到封面应该产生什么感受?
- 示例:好奇("VSCode改名了?")、兴奋("AI编程新时代")
4. 选择文章类型
- 对照上述5个模板,选择最匹配的
步骤2:选择配色方案
决策树:
是AI/智能相关?
├─ 是 → 蓝紫渐变 (#1a1f5c → #7c3aed)
└─ 否 → 继续判断
├─ 是开发工具?
│ └─ 是 → 绿橙渐变 (#10b981 → #f97316)
└─ 是效率/自动化?
└─ 是 → 橙粉渐变 (#f97316 → #ec4899)配色验证:
- 在白色文字下,背景是否足够深?
- 渐变是否自然(不生硬)?
- 是否符合主题气质?
步骤3:构建提示词
组装步骤:
1. 选择模板(从上述5个模板中选择)
2. 填充变量:
- 替换
[主题]为实际主题 - 填入核心价值的中文表述
- 选择合适的配色代码
- 选择合适的视觉元素
3. 强化中文文字要求:
- 必须包含:
text in simplified Chinese, minimal text, accurate - 重申一次:
All Chinese characters must be clear and correct
4. 添加质量关键词:
- high quality, professional design
- 16:9 aspect ratio
- modern, eye-catching
示例(完整提示词):
A stunning cover image for VSCode AI transformation article.
Design: gradient background from deep blue (#1a1f5c) to vibrant purple (#7c3aed) with glowing particles and light effects.
Center: modern 3D elements representing code editor transforming into AI assistant, with floating code snippets, neural network nodes, and sparkles.
Text layout:
- Top center: bold title "VSCode × AI" in white, modern sans-serif font
- Below: Chinese subtitle "从代码编辑器到氛围编程工作室" in elegant font, slightly smaller
Visual elements: VSCode-style interface fragments, AI brain/circuit patterns, transformation arrows with glow effect.
Style: modern, tech-forward, innovative, eye-catching with depth and dimension.
Visual mood: transformative, intelligent, cutting-edge, exciting.
All text in simplified Chinese where applicable, minimal and impactful.
All Chinese characters must be clear and correct.
16:9 aspect ratio, high quality, professional design.步骤4:调用API生成
使用generate_image.py脚本:
cd /root/.claude/skills/wechat-tech-writer
python scripts/generate_image.py \
--prompt "你构建的完整提示词" \
--api gemini \
--output "输出路径/cover.png"API选择建议:
- 首选Gemini:质量高,中文支持好,速度快
- 备选DALL-E:质量稳定,但中文可能有乱码
常见参数:
--api gemini # 使用Gemini API(推荐)
--api dalle # 使用DALL-E API
--quality hd # 高清质量(仅DALL-E)
--size 1792x1024 # 16:9尺寸(仅DALL-E)
--proxy http://... # 设置代理(如需要)错误处理:
- API密钥未配置 → 检查环境变量
GEMINI_API_KEY - 生成失败 → 简化提示词,减少复杂要求
- 中文乱码 → 强化提示词中的中文要求,或换API
步骤5:验证封面图质量
质量检查清单:
✅ 文字检查:
- [ ] 中文文字清晰可读,无乱码
- [ ] 文字数量适中(不超过15个汉字)
- [ ] 文字与背景对比度足够
✅ 颜色检查:
- [ ] 配色鲜明,吸引眼球
- [ ] 渐变自然,无生硬过渡
- [ ] 整体色调符合主题
✅ 视觉检查:
- [ ] 视觉重点突出(标题最醒目)
- [ ] 层次清晰(主标题 > 副标题 > 视觉元素)
- [ ] 不拥挤,有留白
✅ 主题检查:
- [ ] 视觉元素与主题相关
- [ ] 传达的情绪符合预期
- [ ] 能激发读者点击欲望
不满意时的调整策略:
| 问题 | 调整方案 |
|---|---|
| 文字模糊/乱码 | 强化提示词:"large, clear Chinese characters";或换API |
| 颜色暗淡 | 提高对比度:"vibrant colors, high contrast" |
| 视觉元素太多 | 简化提示词:"minimal design, clean composition" |
| 与主题不符 | 明确视觉元素:"code editor interface, NOT generic tech" |
| 布局混乱 | 强调层次:"clear hierarchy, title at top center" |
迭代策略:
- 第1次:按模板生成
- 第2次:基于问题微调提示词
- 第3次:大幅调整(换模板或换API)
保存最佳版本:
# 生成多个版本
python scripts/generate_image.py --prompt "..." --output cover_v1.png
python scripts/generate_image.py --prompt "..." --output cover_v2.png
python scripts/generate_image.py --prompt "..." --output cover_v3.png
# 选择最佳版本重命名
cp cover_v2.png cover.png---
四、高级技巧
技巧1:利用负面提示(Negative Prompts)
部分API支持负面提示,告诉AI不要生成什么:
Negative prompt: blurry text, messy layout, too many colors, generic stock photos, outdated design, flat 2D style技巧2:参考知名品牌风格
可以参考(但不抄袭)知名科技品牌的设计风格:
- Apple风格:极简、留白、优雅字体
- Google风格:多彩、几何、友好
- Microsoft风格:流畅设计、亚克力效果、现代
- Tech媒体风格(如The Verge):大胆配色、强对比、视觉冲击
提示词示例:
Style: inspired by modern tech media like The Verge, bold colors and clean typography技巧3:使用情绪板(Mood Board)
在提示词中明确情绪参考:
Visual mood: like launching a rocket (exciting), discovering a secret (mysterious), solving a puzzle (satisfying)技巧4:分层生成(适用于复杂封面)
对于特别复杂的封面,可以分两次生成后合成:
1. 生成背景层(渐变 + 粒子效果) 2. 生成前景层(3D元素 + 文字) 3. 使用图像编辑工具合成
注意:大多数情况下一次生成即可,除非有特殊要求。
---
五、常见问题排查
Q1:生成的封面图文字全是英文,没有中文?
原因:提示词中中文要求不够强调
解决: 1. 在提示词多处强调中文:
Text layout:
- Top: "[中文标题]" in CHINESE CHARACTERS
- Below: Chinese subtitle "[中文副标题]" in simplified Chinese
IMPORTANT: All text must be in simplified Chinese (简体中文), clear and readable.2. 如果仍然失败,换用DALL-E API
Q2:封面图颜色与预期不符?
原因:色彩代码未被准确识别
解决:
- 使用颜色名称替代代码:
deep blue to vibrant purple而非#1a1f5c to #7c3aed - 添加颜色描述:
gradient from midnight blue (dark, professional) to electric purple (vibrant, modern)
Q3:封面图太"抽象",看不出主题?
原因:视觉元素描述不够具体
解决:
- 明确具体物体:
❌ "tech elements"
✅ "code editor window with syntax highlighting, AI neural network nodes, transformation arrows"Q4:生成速度很慢或超时?
原因:提示词过于复杂,或API服务器繁忙
解决:
- 简化提示词,删除次要细节
- 增加timeout参数:
--timeout 180 - 换个时间段重试
Q5:封面图质量不够高清?
原因:API默认设置或压缩
解决:
- DALL-E使用:
--quality hd --size 1792x1024 - Gemini已默认高质量,无需额外设置
- 生成后检查文件大小,应 > 200KB
---
六、封面图最佳实践总结
✅ 应该做的
1. 强制生成封面图 - 每篇文章必须有 2. 选择合适配色 - 根据主题选择模板 3. 强调中文要求 - 在提示词多处声明 4. 验证质量 - 用清单检查 5. 保存到正确位置 - 与文章在同一目录
❌ 不应该做的
1. 不要跳过封面图 - 即使时间紧也要生成 2. 不要使用无关图片 - 必须与主题契合 3. 不要过度装饰 - 保持简洁有力 4. 不要忽视文字质量 - 中文必须清晰 5. 不要使用低质量图片 - 分辨率和清晰度很重要
📊 质量标准
优秀封面图的标准(满分10分):
- 视觉吸引力:3分(色彩鲜明、设计现代)
- 主题契合度:3分(一看就知道讲什么)
- 文字清晰度:2分(中文无乱码、易读)
- 情感共鸣:2分(激发点击欲望)
及格线:7分(可以使用) 优秀线:9分(直接使用)
---
记住:封面图是读者对文章的第一印象,值得花时间打磨!
事实核查指南
为什么事实准确性至关重要
在技术科普文章中,事实错误会:
- 损害作者的专业信誉
- 误导读者
- 造成传播错误信息
- 影响读者的技术决策
核心原则:宁可保守,不要夸大;宁可不说,不要说错。
必须核查的信息类型
1. 产品/工具的基本信息
需要核查:
- ✅ 产品的全称和简称
- ✅ 开发公司/团队
- ✅ 发布时间
- ✅ 最新版本号
- ✅ 官方网站URL
- ✅ GitHub仓库地址(如适用)
核查方法:
- 访问官方网站确认
- 查看GitHub仓库的README
- 检查多个来源的信息一致性
常见错误示例: ❌ "OpenAI的Claude模型..."(错误:Claude是Anthropic的) ❌ "LangChain由Google开发"(错误:是独立开源项目)
2. 技术参数和性能数据
需要核查:
- ✅ 模型参数量
- ✅ 上下文窗口大小
- ✅ 处理速度/性能指标
- ✅ 支持的语言/格式
- ✅ 价格/收费模式
核查方法:
- 查阅官方文档
- 参考官方发布的Benchmark
- 如果不同来源数据不一致,采用官方数据
表述建议: ✅ "根据官方文档,Claude Sonnet 4支持200K token的上下文窗口" ✅ "在官方Benchmark测试中,性能提升约30%" ⚠️ 避免:使用未经证实的"传闻"数据
3. 功能特性
需要核查:
- ✅ 产品确实具备所述功能
- ✅ 功能的具体实现方式
- ✅ 功能的限制条件
核查方法:
- 查看官方功能列表
- 阅读产品文档
- 如可能,实际测试验证
常见陷阱: ❌ 将"路线图中的功能"当作"已实现的功能" ❌ 夸大功能效果 ❌ 忽略重要的使用限制
4. 对比和排名
需要核查:
- ✅ 对比的维度是否公平
- ✅ 数据来源是否可靠
- ✅ 测试条件是否一致
安全表述: ✅ "在某某评测中,XX排名第一"(指明评测来源) ✅ "根据GitHub Star数,XX是同类工具中最受欢迎的之一" ⚠️ 避免:主观的"最好"、"最强"等绝对化表述
5. 技术原理
需要核查:
- ✅ 技术术语使用正确
- ✅ 原理解释符合实际
- ✅ 避免过度简化导致错误
处理建议:
- 对于复杂原理,用类比时要注明"简单来说"
- 不确定的原理细节可以略过,重点讲应用
- 引用权威解释而非臆测
6. 时间相关信息
需要核查:
- ✅ 发布时间
- ✅ 更新时间
- ✅ "最新"、"最近"等时效性表述
注意事项:
- 明确标注时间点
- 避免使用可能过时的"最新"表述
- 如信息可能变化,加上"截至XX时间"
核查流程
步骤1:抓取阶段的初步核查
在抓取文章内容后:
1. 识别关键事实:标记所有涉及数字、名称、时间的信息 2. 交叉验证:对比多个来源的同一信息 3. 优先级排序:官方来源 > 权威媒体 > 技术博客 > 社交媒体
步骤2:改写阶段的再次核查
在改写文章时:
1. 每个数据都确认来源:确保不是凭记忆或猜测 2. 谨慎处理二手信息:如果只有一个来源,需要特别谨慎 3. 避免推断性表述:除非有明确依据
步骤3:输出前的最后检查
文章完成后,逐项检查:
- [ ] 产品名称、公司名称拼写正确
- [ ] 所有数字都有来源支撑
- [ ] 技术术语使用准确
- [ ] 没有夸大或误导性表述
- [ ] 对比数据公平且有依据
- [ ] 时间信息准确且有时效性说明
信息可靠性分级
高可靠性来源(优先使用)
1. 官方来源
- 官方网站
- 官方文档
- 官方博客
- GitHub官方仓库
2. 权威技术媒体
- TechCrunch、The Verge等知名科技媒体
- IEEE、ACM等学术机构
- 大型科技公司的技术博客
中等可靠性来源(需交叉验证)
1. 技术博客和社区
- Medium、Dev.to
- 掘金、CSDN(选择高质量文章)
- Stack Overflow
2. 行业分析报告
- Gartner、IDC等
- 独立测评机构
低可靠性来源(谨慎使用)
1. 社交媒体
- Twitter、Reddit
- 微信公众号(非官方)
- 用户评论
2. 匿名或来源不明的内容
不确定时的处理策略
策略1:保守表述
不确定时: ❌ "Claude Sonnet 4的参数量达到1000亿" ✅ "据报道,Claude Sonnet 4是一个大规模语言模型"(不提具体数字)
策略2:明确来源
表述模式:
- "根据官方文档..."
- "在XX评测中..."
- "开发团队表示..."
- "据多个来源报道..."
策略3:使用限定词
限定词库:
- 约、大约、估计
- 之一(避免"最")
- 声称、据称
- 可能、通常
- 在某些情况下
示例: ✅ "被认为是最受欢迎的AI工具之一" ✅ "在某些任务上性能提升约30%"
策略4:省略细节
当无法确认细节时,省略比猜测更好:
❌ "该工具使用了xxx算法"(不确定) ✅ "该工具通过先进的算法实现了xxx功能"(只讲结果)
常见事实错误类型
错误1:混淆产品和公司
❌ "OpenAI的Claude模型" ✅ "Anthropic的Claude模型"
错误2:数据过时
❌ "GPT-4是最新的OpenAI模型"(可能已过时) ✅ "截至2024年X月,GPT-4是OpenAI的主流模型之一"
错误3:以偏概全
❌ "AI都会产生幻觉" ✅ "大语言模型可能产生不准确的输出,这被称为'幻觉'"
错误4:因果关系错误
❌ "因为使用了Transformer,所以性能最好" ✅ "采用了Transformer架构,在某些任务上表现出色"
错误5:绝对化表述
❌ "完全解决了xx问题" ✅ "在很大程度上改善了xx问题"
高风险信息清单
以下信息务必多次核查:
🔴 极高风险(错了影响很大):
- 公司名称、产品名称
- 价格、收费模式
- 开源协议类型
- 安全性相关声明
- 法律法规相关内容
🟡 中高风险(容易出错):
- 技术参数(上下文长度、参数量等)
- 性能数据和Benchmark结果
- 发布时间、版本号
- 支持的功能特性
🟢 低风险(影响相对较小):
- 使用体验描述
- 应用场景举例
- 行业趋势判断
事实核查工具和方法
快速核查技巧
1. 搜索多个关键词变体
- 产品全称 + 简称
- 中文名 + 英文名
- 加上 "官方"、"official" 等关键词
2. 查看多个来源
- 至少对比2-3个独立来源
- 官方信息优先
3. 检查时间戳
- 确认信息发布时间
- 优先使用最新信息
4. 验证链接有效性
- 确保官网、GitHub链接可访问
- 避免引用已失效的链接
输出时的标注建议
为了保持透明度,在适当位置标注:
数据来源标注:
> 数据来源:官方文档(截至2024年12月)不确定性标注:
注:关于XX的具体参数,官方未公开详细信息,以上为根据公开资料的合理推测。时效性提醒:
*本文信息截至2024年12月,产品功能可能随版本更新而变化,请以官方最新信息为准。*最后的自我提问
完成文章后,问自己:
1. 我能为文章中的每个关键事实指出来源吗? 2. 如果读者质疑某个数据,我能提供证据吗? 3. 有没有使用"最好"、"最强"等无法证实的表述? 4. 文章中的技术术语使用准确吗? 5. 有没有把未来计划当作现有功能? 6. 对比和评价是否公平客观? 7. 所有链接都能正常访问吗?
如果有任何一项回答"不确定",就需要重新核查或修改表述。
图片选择与处理指南
说明:本文档主要讲解如何从抓取的文章中提取和选择真实图片。关于AI生成图片的详细指南,请参考 ai-image-generation.md。图片获取的双轨策略
技术文章配图应该采用真实截图 + AI生成的混合策略:
真实图片(优先)
- ✅ 产品实际界面截图
- ✅ GitHub仓库页面
- ✅ 官方架构图和流程图
- ✅ 真实的数据图表
本文档内容 - 如何提取这些真实图片
AI生成图片(补充)
- ✅ 封面图/首图
- ✅ 概念示意图
- ✅ 场景插画
- ✅ 装饰性配图
参考文档 - references/ai-image-generation.md
---
图片在公众号文章中的作用
好的配图可以:
- 增强视觉吸引力
- 帮助理解复杂概念
- 打破大段文字,提升阅读体验
- 提供具体的产品/功能展示
图片数量建议
文章长度与图片数量对应:
- 1000-1500字:3-4张图片
- 1500-2500字:4-6张图片
- 2500-4000字:6-8张图片
分布原则:
- 每2-3个段落后配一张图
- 避免连续多段文字无图
- 文章开头最好有一张吸引眼球的图
优先选择的图片类型
1. 产品截图(最优先)
适用场景:介绍工具、平台、应用
选择标准:
- 界面清晰,文字可读
- 展示核心功能
- 尺寸适中(不要太小)
示例:
- AI对话界面的截图
- 代码编辑器的界面
- 工具的操作面板
2. 架构图/流程图
适用场景:解释技术原理、工作流程
选择标准:
- 图示清晰,逻辑明确
- 不要过于复杂(元素不超过10个)
- 中文标注优先,英文也可接受
示例:
- 系统架构图
- 数据流向图
- 使用流程示意图
3. 对比图表
适用场景:功能对比、性能对比
选择标准:
- 数据来源可靠
- 对比维度清晰
- 视觉对比明显
示例:
- 不同模型的性能对比柱状图
- 功能特性对比表
- 使用场景对比
4. 示例展示
适用场景:展示实际应用效果
选择标准:
- 效果直观
- 与文章内容紧密相关
示例:
- AI生成的代码示例
- 工具处理前后的对比
- 实际应用案例截图
5. Logo和品牌图
适用场景:文章开头或介绍产品时
选择标准:
- 官方高清Logo
- 背景简洁
不推荐的图片类型
❌ 纯文字图片
- 除非是特别有设计感的标题图
- 文字内容应该用正文表达
❌ 模糊或分辨率过低的图片
- 影响专业度
- 手机端显示效果差
❌ 与内容无关的配图
- 不要为了凑数而用无关图片
- 会分散读者注意力
❌ 过于复杂的技术图
- 密密麻麻的代码截图
- 超过20个元素的复杂架构图
- 普通用户看不懂的底层原理图
❌ 侵权风险高的图片
- 带有明显水印的图片
- 商业图库的未授权图片
从抓取文章中提取图片
提取策略
1. 浏览抓取的文章内容,识别包含<img>标签或Markdown图片语法的部分
2. 提取图片URL,格式通常为:
<img src="https://...jpg">
3. 评估图片质量:
- 检查URL是否有效(不是placeholder或broken link)
- 判断图片类型是否符合上述"优先选择"标准
- 避免提取广告图、无关配图
4. 记录图片信息:
- 图片URL
- 图片说明(如果原文有)
- 建议插入位置(文章的哪个部分)
提取示例
从HTML内容提取:
<img src="https://example.com/claude-interface.png" alt="Claude对话界面">提取为:
- URL: https://example.com/claude-interface.png
- 说明: Claude对话界面
- 建议位置: "功能介绍"部分
从Markdown内容提取:
提取为:
- URL: https://example.com/langchain-arch.png
- 说明: LangChain架构图
- 建议位置: "技术原理"部分
图片在文章中的呈现方式
在Markdown中标注图片
使用标准Markdown语法 + 说明:
## 核心功能
Claude Sonnet 4的对话界面非常简洁直观:

*Claude的对话界面,支持长文本输入和多轮对话*
如上图所示,你可以...图片说明文字(Caption)
每张图片都应该有简短说明:
格式:*说明文字*(斜体)
内容:
- 10-20字最佳
- 点明图片展示的内容
- 与正文呼应
示例:
- 图1:Claude Sonnet 4的主界面
- GPT-4与Claude在代码生成任务上的性能对比
- LangChain的核心组件架构
输出格式
在文章末尾单独列出所有图片信息,方便用户下载:
---
## 文章配图列表
1. **封面图/首图**
- 图片URL: https://...
- 说明: XXX产品Logo或主视觉图
- 建议位置: 文章开头
2. **图1:产品界面**
- 图片URL: https://...
- 说明: XXX的操作界面截图
- 建议位置: "核心功能"部分
3. **图2:架构图**
- 图片URL: https://...
- 说明: XXX的技术架构示意图
- 建议位置: "技术原理"部分
... (以此类推)
**注意**:请检查图片链接是否有效,如失效请用相似图片替换。无法获取图片时的处理
如果抓取的文章中没有合适的图片,或图片链接失效:
1. 在文章中标注图片位置
[此处建议插入:Claude Sonnet 4的对话界面截图]2. 在图片列表中说明
## 文章配图建议
由于原文图片不可用,建议补充以下配图:
1. **产品Logo或官网截图**
- 建议来源: 访问官网 https://...
- 建议位置: 文章开头
2. **功能演示截图**
- 建议来源: 使用产品并截图,或搜索相关图片
- 建议位置: "核心功能"部分3. 提供图片搜索建议
推荐图片搜索关键词:
- "Claude Sonnet 4 interface"
- "LangChain architecture diagram"
- "GitHub项目名称 screenshot"图片质量检查清单
输出前检查:
- [ ] 每张图片都有URL和说明
- [ ] 图片与内容相关性强
- [ ] 避免了纯文字图片(除非特殊设计)
- [ ] 图片数量适中(3-6张)
- [ ] 图片分布均匀,不过于集中
- [ ] 优先选择了产品截图、架构图等高价值图片
- [ ] 所有图片URL已整理到列表中
- [ ] 如有无法获取的图片,已给出替代建议
内容结构图生成指南
快速开始
每篇文章必须生成一张内容结构图,放在封面图之后。使用以下命令:
cd /root/.claude/skills/wechat-product-manager-writer
python scripts/generate_image.py \
--prompt "你的提示词" \
--api gemini \
--output structure.png---
风格说明
内容结构图采用图形记录(Graphic Recording)/ 视觉思维(Visual Thinking)风格:
| 元素 | 说明 |
|---|---|
| 背景 | 干净的白纸背景,无线条 |
| 线条 | 黑色细线笔,清晰轮廓 |
| 着色 | 彩色标记笔(青色、橙色、柔和红色) |
| 标题 | 3D 风格矩形框,居中放置 |
| 布局 | 放射状分布,用箭头连接想法 |
| 文字 | 手写大写字母印刷体 |
| 比例 | 16:9 |
---
提示词模板
通用模板
Create a hand-drawn sketch visual summary of these notes about [文章主题].
Key points to visualize:
- [要点1]
- [要点2]
- [要点3]
- [要点4]
- [要点5]
Use a clean white paper background (no lines).
Art style should be 'graphic recording' or 'visual thinking', using black fine-tip pen for clear outlines and text.
Use colored markers (especially cyan, orange, and soft red) for simple coloring and emphasis.
Place main title '[文章标题]' centered in a 3D-style rectangular box.
Surround the title with radially distributed simple doodles, business icons, stick figures, and diagrams to explain concepts.
Connect ideas with arrows.
Text should be clear, hand-written uppercase block letters.
Layout should be 16:9.---
内容类型示例
AI 产品拆解
Create a hand-drawn sketch visual summary of these notes about Cursor AI code editor analysis.
Key points to visualize:
- AI-powered code completion
- Context-aware suggestions
- Multi-file editing
- Natural language commands
- Pricing vs competitors
Use a clean white paper background (no lines).
Art style should be 'graphic recording' or 'visual thinking', using black fine-tip pen for clear outlines and text.
Use colored markers (especially cyan, orange, and soft red) for simple coloring and emphasis.
Place main title 'Cursor 产品拆解' centered in a 3D-style rectangular box.
Surround the title with radially distributed simple doodles, business icons, stick figures, and diagrams to explain concepts.
Connect ideas with arrows.
Text should be clear, hand-written uppercase block letters.
Layout should be 16:9.场景解决方案
Create a hand-drawn sketch visual summary of these notes about building customer service chatbot with Dify.
Key points to visualize:
- Problem: manual customer support is slow
- Solution: AI chatbot with knowledge base
- Steps: create app, upload docs, configure workflow
- Results: 80% queries automated
- Tips: keep prompts simple
Use a clean white paper background (no lines).
Art style should be 'graphic recording' or 'visual thinking', using black fine-tip pen for clear outlines and text.
Use colored markers (especially cyan, orange, and soft red) for simple coloring and emphasis.
Place main title '用 Dify 搭建客服机器人' centered in a 3D-style rectangular box.
Surround the title with radially distributed simple doodles, business icons, stick figures, and diagrams to explain concepts.
Connect ideas with arrows.
Text should be clear, hand-written uppercase block letters.
Layout should be 16:9.效率提升实战
Create a hand-drawn sketch visual summary of these notes about Claude Code workflow optimization.
Key points to visualize:
- Tip 1: Use project context
- Tip 2: Chain commands with &&
- Tip 3: Leverage slash commands
- Tip 4: Custom instructions
- Result: 3x faster coding
Use a clean white paper background (no lines).
Art style should be 'graphic recording' or 'visual thinking', using black fine-tip pen for clear outlines and text.
Use colored markers (especially cyan, orange, and soft red) for simple coloring and emphasis.
Place main title 'Claude Code 工作流优化' centered in a 3D-style rectangular box.
Surround the title with radially distributed simple doodles, business icons, stick figures, and diagrams to explain concepts.
Connect ideas with arrows.
Text should be clear, hand-written uppercase block letters.
Layout should be 16:9.产品方法论
Create a hand-drawn sketch visual summary of these notes about AI Product Manager technical depth.
Key points to visualize:
- Core question: How technical should PM be?
- Level 1: Understand concepts
- Level 2: Read documentation
- Level 3: Build prototypes
- Balance: Enough to communicate, not to code
Use a clean white paper background (no lines).
Art style should be 'graphic recording' or 'visual thinking', using black fine-tip pen for clear outlines and text.
Use colored markers (especially cyan, orange, and soft red) for simple coloring and emphasis.
Place main title 'AI 产品经理的技术深度' centered in a 3D-style rectangular box.
Surround the title with radially distributed simple doodles, business icons, stick figures, and diagrams to explain concepts.
Connect ideas with arrows.
Text should be clear, hand-written uppercase block letters.
Layout should be 16:9.行业观察
Create a hand-drawn sketch visual summary of these notes about whether Agent is necessary.
Key points to visualize:
- Hype vs Reality
- 90% scenarios don't need Agent
- When Agent helps: complex multi-step tasks
- When simple prompts work: single-turn queries
- My take: Start simple, add complexity when needed
Use a clean white paper background (no lines).
Art style should be 'graphic recording' or 'visual thinking', using black fine-tip pen for clear outlines and text.
Use colored markers (especially cyan, orange, and soft red) for simple coloring and emphasis.
Place main title 'Agent 真的有必要吗' centered in a 3D-style rectangular box.
Surround the title with radially distributed simple doodles, business icons, stick figures, and diagrams to explain concepts.
Connect ideas with arrows.
Text should be clear, hand-written uppercase block letters.
Layout should be 16:9.---
内容要点提取流程
在生成结构图前,按以下步骤提取文章要点:
1. 核心主题(1句话)
这篇文章主要讲什么?
2. 主要观点(3-5个)
文章的核心论点或步骤是什么?
3. 关键概念关系
这些观点之间有什么联系?
- 因果关系(A 导致 B)
- 对比关系(A vs B)
- 递进关系(1 → 2 → 3)
- 并列关系(A、B、C 同等重要)
4. 核心结论
读者应该记住什么?采取什么行动?
---
视觉元素建议
| 概念类型 | 推荐图标/符号 |
|---|---|
| 问题/痛点 | 问号、皱眉火柴人、红色X |
| 解决方案 | 灯泡、绿色勾、工具图标 |
| 步骤/流程 | 数字、箭头、流程图 |
| 对比 | 天平、vs、左右分栏 |
| 结论 | 星星、重点标记、框线强调 |
| 工具/产品 | 简化 logo、电脑图标 |
| 人物 | 火柴人、简笔头像 |
| 数据 | 简单图表、上升箭头 |
---
质量检查
生成后确认:
- [ ] 标题清晰可读,放在中央
- [ ] 核心要点都已可视化
- [ ] 布局放射状,不杂乱
- [ ] 箭头连接合理
- [ ] 颜色使用恰当(青色、橙色、柔和红色)
- [ ] 整体手绘风格一致
- [ ] 16:9 比例正确
---
常见问题
文字不清晰:在提示词中强调 "Text should be clear, hand-written uppercase block letters"
布局太乱:减少要点数量,保持 3-5 个核心点
颜色太杂:强调 "especially cyan, orange, and soft red",限制颜色种类
风格不够手绘:强调 "hand-drawn sketch"、"doodles"、"fine-tip pen"
中文显示问题:标题可以用中文,但要点描述建议用英文让AI更好理解,生成的图中会有视觉化表达
微信公众号写作风格指南
⚠️ 重要优化原则(2025-12-27更新)
1. 文章结构简化
- 只输出正文内容,不要添加任何附加部分
- ❌ 禁止添加:
- "参考资料与延伸阅读"章节
- "关于优缺点的说明"章节
- "文章配图说明"章节
- "本文信息来源"等元信息
- 任何其他非正文内容
- ✅ 只保留:
- 文章标题
- 正文各章节
- 文章结尾总结段落
2. 链接格式规范
- 所有URL必须使用纯文本格式,不使用markdown超链接
- ❌ 错误格式:
[小米官网](https://www.xiaomi.com/) - ✅ 正确格式:
小米官网:https://www.xiaomi.com/ - 如果文中需要提及链接,直接写:
官方网站:https://www.example.com/
GitHub仓库:https://github.com/user/repo
API文档:https://api.example.com/docs3. 配图精简原则
- 每篇文章图片数量:1-3张(不再是4-6张)
- 只生成真正必要的图片:
- 有数据对比 → 生成对比图
- 有复杂技术 → 生成架构图
- 可选封面图
- 不生成装饰性配图和场景插画
核心原则
1. 为普通用户写作
目标读者:对技术感兴趣但不一定有深厚技术背景的普通用户
实践方法:
- 避免未解释的技术术语
- 使用类比和比喻帮助理解
- 先解释"是什么"和"为什么",再讲"怎么做"
示例对比:
❌ 不好的写法:
"Claude采用了Transformer架构,通过自注意力机制实现上下文理解,支持200K token的上下文窗口。"
✅ 好的写法:
"Claude就像一个记忆力超强的助手,可以一次性记住相当于一本小说的内容(约15万字),并在对话中准确引用这些信息。它通过一种叫做Transformer的技术来理解你说的话,就像我们人类在对话时会根据上下文理解意思一样。"
2. 用自己的语言改写
绝对禁止:
- 直接复制粘贴原文段落
- 仅改几个词就当作改写
- 保留原文的句式结构
改写技巧:
- 理解核心观点后,用自己的话重新表达
- 重新组织信息顺序
- 增加自己的解释和例子
- 改变句式和段落结构
示例:
原文:
"LangChain是一个用于开发由大型语言模型驱动的应用程序的框架。它提供了一系列工具、组件和接口,简化了创建由LLM驱动和链接的应用程序的过程。"
❌ 差的改写(仅换词):
"LangChain是一个用于开发大语言模型应用的框架。它提供了工具、组件和接口,让创建LLM应用变得更简单。"
✅ 好的改写(重新表达):
"想象你要用AI搭建一个应用,但发现需要把很多功能拼凑在一起——比如让AI记住对话历史、查询数据库、调用第三方API等。LangChain就是为了解决这个问题而生的。它就像搭积木的工具箱,把这些常用功能都封装好了,你只需要按需组合,就能快速搭建出AI应用。"
3. 增加可读性
段落控制:
- 每段2-4句话
- 避免超过5行的长段落
- 重要观点单独成段
句子长度:
- 多用短句(15-20字)
- 复杂概念拆成多个简单句
- 避免一句话超过40字
列表使用: 适当使用项目符号或数字列表,便于快速浏览:
- 功能特性列举
- 步骤说明
- 对比要点
4. 增强互动感
人称使用:
- 多用"你"、"我们"
- 避免"用户"、"读者"等疏离词汇
- 创造对话感
提问引导: 在适当位置使用反问,引发思考:
- "你是否也遇到过这样的问题?"
- "那么,它到底是怎么做到的呢?"
情感词汇: 适当使用情感词汇增加感染力:
- "令人惊讶的是..."
- "更厉害的是..."
- "这个功能特别实用..."
文章结构模板
标题
公式:{吸引注意} + {核心关键词}
示例:
- "Claude Sonnet 4来了!这个AI助手能帮你做什么?"
- "开发者必看:LangChain让AI应用开发效率提升10倍"
- "GitHub上爆火的XXX工具,5分钟带你上手"
开头段(钩子)
用100-200字吸引读者,可以采用:
方式1:场景引入
"你有没有遇到过这样的情况:想让AI帮你写代码,但它总是'忘记'你前面说过的需求?或者聊了几轮之后,它就'失忆'了?今天要介绍的Claude Sonnet 4,就彻底解决了这个痛点。"
方式2:问题引入
"大语言模型很强大,但如果你想让它查询数据库、调用API、记住对话历史,该怎么办?一个个手写代码显然太麻烦。这就是为什么LangChain会成为AI开发者的'必装工具'。"
方式3:数据/事实引入
"GitHub上一个新工具刚发布两周,Star数就突破了5000。它能做什么?简单说,它让部署AI应用从几小时缩短到几分钟。"
主体内容
按照SKILL.md中推荐的结构展开: 1. 是什么 2. 能做什么 3. 为什么选择它 4. 如何开始
每部分都要有:
- 小标题(用emoji增加视觉吸引力)
- 2-3个段落
- 至少1个具体例子
- 适当的图片(如果有)
结尾
总结要点(2-3句话) 行动号召(1句话)
示例:
"总的来说,Claude Sonnet 4在长文本理解、代码生成和多轮对话方面都有明显提升。如果你正在寻找一个靠谱的AI助手,不妨试试看。
>
文末附上了官方文档和使用教程,感兴趣的朋友可以自己探索更多功能。"
语言风格细节
Emoji使用建议
适度使用(每篇3-5个):
- 小标题前:📌、💡、🎯、✨、🚀
- 强调重点:⚡、🔥、💪、👍
- 总结部分:📝、🎁、🌟
避免过度: 不要每句话都加emoji,会显得不专业
比喻和类比库
抽象概念具象化:
- API → "插座和电器的关系"
- 框架 → "搭积木的工具箱"
- 上下文窗口 → "记忆容量"
- Token → "字数单位"
- 训练数据 → "教材"
常用技术词汇的通俗解释
| 技术词汇 | 通俗解释 |
|---|---|
| 大语言模型(LLM) | AI对话助手、智能助手 |
| 提示词(Prompt) | 给AI的指令、问AI的问题 |
| 微调(Fine-tuning) | 针对性训练、专项优化 |
| API | 程序之间的"对话接口" |
| 开源 | 代码公开、免费使用 |
| Star(GitHub) | 点赞、收藏 |
| Fork | 复制一份来改造 |
| Token | AI理解的文本单位(类似字数) |
质量自检
改写完成后,问自己:
1. ✅ 如果我是完全不懂技术的人,能看懂这篇文章吗? 2. ✅ 有没有哪个段落直接照搬了原文? 3. ✅ 技术术语都解释清楚了吗? 4. ✅ 有没有具体的例子和应用场景? 5. ✅ 读起来是"听人讲解"还是"看说明书"?(应该像前者) 6. ✅ 标题能吸引目标读者点开吗? 7. ✅ 文章有明确的结构和逻辑吗?
避免的常见错误
❌ 错误1:堆砌功能列表 不要只是列出"功能1、功能2、功能3...",而要解释每个功能解决什么问题。
❌ 错误2:过度技术化 "采用分布式架构,通过负载均衡实现高并发处理" → 这对普通用户没有意义
✅ 改进: "即使同时有成千上万人使用,也不会卡顿"
❌ 错误3:缺乏具体例子 只说"功能强大"、"性能优秀",不如给一个具体场景。
❌ 错误4:结构混乱 想到哪写到哪,读者看不出重点。
❌ 错误5:过度营销化 "史上最强"、"秒杀一切"这类词汇要避免,保持客观。
# Python dependencies for wechat-writer skill
# 微信公众号写作助手的Python依赖
# HTTP请求(需要 >=2.31.0 以兼容 urllib3 2.x,避免中文编码错误)
requests>=2.31.0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""按照优化后的设计原则生成封面图"""
import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from generate_image import GeminiImageGenerator
def generate_optimized_cover():
"""
按照新的设计原则生成Claude Skills封面图
设计原则:
1. 鲜明的主题色彩 - 蓝紫渐变 (科技创新类)
2. 清晰的视觉层次 - 主标题 + 副标题 + 视觉元素
3. 现代化设计风格 - 3D元素、玻璃拟态、渐变光效
4. 情感共鸣 - "告别重复劳动"、"秒变专家"
"""
# 步骤1: 主题分析
# 关键词: Claude Skills, AI提效, 技能包, 专家系统
# 核心价值: 让AI秒变领域专家
# 目标情绪: 好奇、兴奋、启发
# 步骤2: 配色方案
# 科技创新类: 蓝紫渐变 (#1a1f5c → #7c3aed)
# 步骤3: 构建提示词(使用AI/大模型类模板)
prompt = """A stunning, eye-catching cover image for Claude Skills article.
Design specifications:
- Background: vibrant gradient from deep blue (#1a1f5c) to electric purple (#7c3aed), with subtle particle effects and glowing accents
- Center focal point: futuristic 3D floating cubes/modules in glass morphism style, representing different skills
- Each cube has a glowing icon inside: document (文档), code brackets (代码), chart (数据)
- Cubes are connected by luminous blue energy lines, creating a network effect
- Depth and dimension: strong 3D perspective with light reflections
Text layout (CRITICAL - all text in simplified Chinese):
- Top center: Large bold title "Claude Skills" in white, modern sans-serif font
- Below title: Chinese subtitle "让AI秒变领域专家" in elegant, clean font
- Bottom left corner: Small text "告别重复劳动 | 10倍提效" as a tagline
Visual effects:
- Glowing particles floating in the background
- Soft light rays emanating from the cubes
- Professional depth of field (bokeh effect)
- Clean, uncluttered composition with proper whitespace
Style: ultra-modern, tech-forward, professional, highly attractive, sci-fi inspired
Mood: innovative, powerful, exciting, transformative
Color harmony: blue-purple gradient with cyan and white accents
IMPORTANT: All text in simplified Chinese (简体中文), minimal text, accurate and clear.
Aspect ratio: 16:9, high quality, magazine cover style.
"""
output_path = r"G:\git_pull\微信公众号文章\AI提效系列\claude_skills_cover_optimized.png"
try:
print("Generating optimized cover image with enhanced design principles...")
print("Theme: Claude Skills - AI Capability Extension System")
print("Core value: Turn AI into domain experts instantly")
print("Color scheme: Blue-purple gradient (tech innovation)")
print("Emotional appeal: Curiosity, excitement, empowerment")
print("")
generator = GeminiImageGenerator()
result = generator.generate(prompt, output_path)
print(f"Success: {result}")
print("")
print("Quality checklist:")
print("- Clear and readable Chinese text")
print("- Eye-catching colors")
print("- Strong visual hierarchy")
print("- Aligned with theme")
return 0
except Exception as e:
print(f"Error: {str(e)}")
return 1
if __name__ == "__main__":
sys.exit(generate_optimized_cover())
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""临时图片生成脚本,避免emoji输出问题"""
import sys
import os
# 添加脚本目录到路径
sys.path.insert(0, os.path.dirname(__file__))
from generate_image import GeminiImageGenerator
def generate_cover():
"""生成封面图"""
prompt = """A modern, professional cover image for Claude Skills technology article.
Design features a gradient background from deep blue (#1a1f5c) to purple (#7c3aed).
In center, floating modular 3D blocks representing different skills, each block labeled in simplified Chinese:
'文档处理' (Document Processing), '代码审查' (Code Review), '数据分析' (Data Analysis).
Blocks are connected by glowing blue lines suggesting interconnectivity.
At the top, large bold text 'Claude Skills' with Chinese subtitle '让AI秒变领域专家' (Turn AI into Domain Experts).
Style: minimalist, tech-forward, professional, clean.
All text in simplified Chinese, minimal text, clear and accurate.
16:9 aspect ratio, high quality."""
output_path = r"G:\git_pull\微信公众号文章\AI提效系列\claude_skills_cover.png"
try:
print("Generating cover image...")
generator = GeminiImageGenerator()
result = generator.generate(prompt, output_path)
print(f"Success: {result}")
return 0
except Exception as e:
print(f"Error: {str(e)}")
return 1
def generate_architecture():
"""生成架构图"""
prompt = """A technical architecture diagram illustrating the three-layer loading mechanism of Claude Skills.
The diagram shows three horizontal layers stacked vertically with distinct colors:
- Top layer in light blue (#60a5fa) labeled '元数据层 ~100词' (Metadata Layer ~100 words)
- Middle layer in medium blue (#3b82f6) labeled '核心指令层 <5k词' (Core Instruction Layer <5k words)
- Bottom layer in dark blue (#1e40af) labeled '资源层 无限制' (Resource Layer Unlimited)
On the right side, arrows show progressive loading from top to bottom with text '按需加载' (Load on Demand).
On the left, simple icons represent each layer: lightbulb for metadata, gear for instructions, database for resources.
Style: clean, professional technical diagram, minimal design, data visualization style.
All text in simplified Chinese, minimal and accurate text.
16:9 aspect ratio, high quality."""
output_path = r"G:\git_pull\微信公众号文章\AI提效系列\claude_skills_architecture.png"
try:
print("Generating architecture diagram...")
generator = GeminiImageGenerator()
result = generator.generate(prompt, output_path)
print(f"Success: {result}")
return 0
except Exception as e:
print(f"Error: {str(e)}")
return 1
if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] == "architecture":
sys.exit(generate_architecture())
else:
sys.exit(generate_cover())
Related skills
FAQ
How long are the articles?
The skill rewrites researched material into a 2000-3000 character article using short sentences of at most 25 characters.
Does it generate images?
Yes. Every article must generate one 16:9 cover image via the Jimeng API, with 0-2 optional in-content images.