关于 avatar-portrait
此技能指导使用 Gemini 图像生成,根据参考照片制作风格化头像,同时兼顾人物辨识度与指定画风,适用于头像和团队资料图创作。
主要功能
- 01根据照片生成风格化头像
- 02保留人物可辨识特征
- 03提供风格调整与迭代建议
- 04包含头像背景风格参考
适用场景
- 01将个人照片转换为像素风或插画头像
- 02为团队成员制作统一风格的资料图
- 03根据反馈调整头像的画风或相似度
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ b-open-io/ gemskills --skill avatar-portrait安装后在 Claude Code 中输入/avatar-portrait确认已加载。
附带文件.clawnet/unsigned-skill.json
详细介绍
头像肖像
使用 Gemini 图像生成,根据参考照片生成风格化头像肖像,在应用指定视觉风格的同时保留可辨识的相貌特征。
适用场景
用户提出以下需求时使用此技能:
- 根据照片制作头像
- 以特定风格生成团队成员的个人资料图片
- 将头像照转换为风格化肖像(像素、复古、插画、现代)
- 制作与真人相貌相似且风格统一的角色肖像
核心原则
平衡相貌相似度与风格
关键挑战在于同时做到:
- 相貌清晰可辨——必须看起来像源照片中的人物
- 忠实呈现所选风格——风格鲜明;除非用户提出要求,否则不要做成照片写实风格
常见问题:
- 过于照片写实 = 忽略了用户要求的风格
- 风格化过度 = 失去与源照片中人物的相似度
单一来源输入
仅使用目标人物的照片作为输入。切勿使用其他人物的图像作为风格参考,否则会导致面部特征混合,降低相貌相似度。
提示词模板
Generate a styled avatar portrait from the reference photo.
## INPUT IMAGE
[path to subject's photo] - USE ONLY THIS IMAGE
## CRITICAL: LIKENESS PRESERVATION
Capture the subject's EXACT features from the photo:
- Face shape and jawline
- Eye shape, spacing, and expression
- Nose shape and size
- Mouth/smile characteristics
- Hair texture, color, and style
- Facial hair pattern and coverage (if applicable)
The result must be RECOGNIZABLE as this specific person.
## STYLE REQUIREMENTS
- Style: [style requested by user, e.g. pixel art, painterly, anime, low-poly]
- Keep style cues consistent across linework, shading, and color treatment
- Stylized but maintains individual features
- NOT photorealistic unless explicitly requested
## APPEARANCE
- [Describe clothing from photo or as specified]
- [Describe expression]
- [Describe any accessories]
## BACKGROUND
- [Describe background style and colors]
- Background style should match the character style
## TECHNICAL
- NO TEXT on the image
- 512x512 output
- Portrait orientation, head and shoulders
- Square format
## OUTPUT
Save to: [output path]
示例:个人头像
团队成员 Dan 的参考照片中留着深色短发、蓄着胡须、穿着黑色 V 领上衣:
Generate a styled avatar portrait from the reference photo.
## INPUT IMAGE
/path/to/dan-photo.png - USE ONLY THIS IMAGE
## CRITICAL: LIKENESS PRESERVATION
Capture Dan's EXACT features from the photo:
- His specific face shape and jawline
- His eye shape and expression
- His nose shape
- His smile characteristics
- Short dark hair - exact texture and style from photo
- Full dark beard - exact pattern and coverage
The result must be RECOGNIZABLE as Dan.
## STYLE REQUIREMENTS
- Style: retro 16-bit pixel art
- Visible pixels but NOT a pixelated photo filter
- Clean lines, rich colors, consistent shading
- Stylized but maintains individual features
## APPEARANCE
- Black v-neck shirt
- Warm smile showing teeth
- Friendly, approachable expression
## BACKGROUND
- California sunset cityscape
- Warm oranges, pinks, teals
- Pixel art style matching the character
## TECHNICAL
- NO TEXT on the image
- 512x512 output
- Portrait orientation, head and shoulders
## OUTPUT
Save to: /path/to/output/dan-pixel.png
上下文纪律
不要将生成的头像图像读回上下文。 脚本只会输出文件路径。请用户目视检查结果并提供反馈,以便迭代。如需通过程序检查,请先优化图像(使用 optimize-images 技能)。
迭代工作流
- 首次尝试:使用详细提示词生成
- 检查:确认相貌相似度和风格是否到位
- 必要时调整:
- 如果过于照片写实:强调“风格化像素艺术角色”
- 如果相貌特征丢失:根据源照片强化特征描述
- 如果特征有误:更具体地说明需要捕捉哪些特征
常见问题
面部与源照片不符
- 确保输入中仅使用目标人物的照片
- 添加更具体的特征描述
- 参考照片中清晰可见的具体细节
过于照片写实
- 强调风格类别和关键风格特征
- 要求“风格化”并带有“插画感”
- 除非用户要求照片写实,否则加入明确的反照片写实要求
过于卡通化/相貌相似度不足
- 强化保留相貌特征的部分
- 列出需要捕捉的具体特征
- 强调“能清楚辨认出是这个人”
参考文件
背景风格参考:
references/background-styles.md- 头像常用的背景处理方式
评论
支持 Markdown