Files
nanocode/skills/baoyu-imagine/SKILL.md
T
2026-07-07 16:00:02 +08:00

92 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: baoyu-imagine
description: |
生成专业信息图 (Infographic)。支持 21 种布局 × 21 种视觉风格组合,
适用于技术架构图、时间线、流程图、对比图等复杂可视化需求。
零 token 本地渲染,调用 Seedream/OpenAI 等生成高清图片。
Use when: creating infographics, architecture diagrams, timelines,
flowcharts, comparison charts, or any complex visual content.
available: true
---
# baoyu-imagine - 专业信息图生成
## 快速使用
### 1. 交互式模式(推荐)
用户提供主题,自动完成分析→推荐→生成:
```
用户:生成一个"AI 发展历史"的信息图
→ 自动分析内容
→ 推荐 layout + style 组合
→ 生成图片
```
### 2. 指定参数模式
```bash
# 基础用法
cd /home/ubuntu/forgithub/baoyu-skills/skills/baoyu-imagine
ARK_API_KEY="$ARK_API_KEY" npx -y bun scripts/main.ts \
--provider seedream \
--promptfiles /path/to/system-prompt.md /path/to/content-prompt.md \
--image /path/to/output.png
```
## 支持的布局 (21种)
| 布局 | 用途 |
|------|------|
| winding-roadmap | 旅程、时间线、成长路径 |
| linear-progression | 线性流程、步骤说明 |
| hierarchical-layers | 层级结构、组织架构 |
| bento-grid | 多维度对比、概览 |
| radial-comparison | 中心辐射对比 |
| timeline-horizontal | 水平时间轴 |
| ... | 共21种 |
## 支持的风格 (21种)
| 风格 | 特点 |
|------|------|
| storybook-watercolor | 水彩绘本,温暖怀旧 |
| craft-handmade | 手工质感,温馨 |
| hand-drawn-edu | 手绘教育风 |
| morandi-journal | 莫兰迪色调,优雅 |
| cyberpunk-neon | 赛博朋克霓虹 |
| ... | 共21种 |
## 配置
API Key 已配置:
- 路径:`~/.config/baoyu/keys.conf`
- 环境变量:`ARK_API_KEY` (已写入 `~/.bashrc`)
## 注意事项
- **Seedream API 敏感内容检测**:如果生成的提示词中包含具体数据点(数字、统计、货币金额等),可能触发 Seedream API 的敏感内容检测导致失败。解决办法:改用抽象概念描述(如"增长图表"代替"增长30%","经济数据"代替具体金额)。
- **默认模型**: Seedream provider 默认使用 doubao-seedream-4-5-251128 模型
- **最小图片尺寸**: Seedream API 要求图片分辨率不低于 3686400 像素(如 2560×1440)
## 工作流
1. **分析** - 解析用户主题,提取关键信息
2. **推荐** - 基于内容匹配最佳 layout + style
3. **结构化** - 将内容拆分为可视化单元
4. **生成 Prompt** - 组合 system-prompt + content-prompt
5. **调用图像生成** - Seedream/OpenAI 等
6. **输出** - 返回图片路径
## 依赖
- bun (via npx)
- ARK_API_KEY (Seedream) 或其他图像生成 API
## 相关 Skills
- `wewrite` - 公众号文章 + 简单配图
- `baoyu-infographic` - 同库技能,分析→推荐工作流
- `hand-drawn-diagram` - 零 token SVG 图表(无需 AI)