发色与发型顾问

分析自拍照,推荐发型和发色,并使用 Perfect Corp AI 预览用户选择的造型。

youcam-api
2026年10月16日
0 收藏
350 下载

安装与下载

1 ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install youcam-hair-color-style-advisor

2 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/
工作区 {'/skills/'}

优先级:工作区 › 全局 › 内置

3 提示词安装

将此提示词复制到 Openclaw 即可自动安装。

请帮我使用 Clawhub 安装 skill-youcam-hair-color-style-advisor。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

更倾向于下载?

获取包含原生技能文件的ZIP压缩包。

下载技能 (.zip)

基本信息

名称 发色与发型顾问
Slug youcam-hair-color-style-advisor
创建者 youcam-api
创建时间 2026-10-16 06:06:40
更新时间 2026-10-16 06:06:40
收藏数 0
使用量 350
浏览量 11

安装指南

  1. ClawHub CLI 从源直接安装技能的最快方式。
    npx clawhub@latest install youcam-hair-color-style-advisor
  2. 手动安装 将技能文件夹复制到以下位置之一
    全局模式
    ~/.openclaw/skills/
    工作区
    /skills/
    优先级:工作区 > 本地 > 内置
  3. 提示词安装 将此提示词复制到 OpenClaw 即可自动安装。
    请帮我使用 Clawhub 安装 youcam-hair-color-style-advisor。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
    更倾向于下载?
    获取包含原生技能文件的ZIP压缩包。
    下载技能 (.zip)

什么是

发色与发型顾问是一项 Openclaw Skills 体验,可通过 AI 生成预览,为用户提供个性化发型和发色建议。它可以分析面部特征和肤色,再根据分析结果提供建议,而不是依赖通用的造型推荐。
用户可以选择预览发型变化、发色变化,或两者兼有。该技能使用 Perfect Corp 的 YouCam APIs 生成所选变换,并返回结果图片 URL。它用于造型建议和虚拟试戴,而非头发健康诊断、皮肤、化妆或服装。

应用场景

用户想根据自己的脸型获取发型建议。
用户想探索适合自己肤色的发色选项。
用户想预览预设模板或参考照片中的造型。
用户想在咨询专业发型师之前比较 AI 预览效果。
用户询问头发健康诊断;应转交给单独的头发诊断技能。

工作原理

确认用户提供了清晰、正面且能显示头发的自拍照,然后验证 YouCam API 密钥。
生成前,询问用户想要更换发型、改变发色,还是两者都要。查询所选生成功能以及将运行的任何分析功能的当前积分费用,并在继续前告知用户。
获取每项所用功能的最新 Perfect Corp API 规范。根据需要运行面部属性分析以判断脸型和长宽比例,并根据需要运行肤色分析以提供发色建议。
谨慎解读结果。使用该技能的指南,将脸型与发型轮廓、肤色与色彩类别相对应。如果脸型为 Unknown,不要猜测;仅使用长宽比例提供一般性的偏长或偏宽建议。
对于更换发型,让用户选择列出的头发迁移模板或提供参考照片。对于改变发色,使用受支持的预设或文档所述的自定义选项。
仅运行用户选择的变换。如果任务仍在运行,应轮询其现有任务 ID,而不是启动另一个会收费的任务。
按原样返回结果图片 URL,说明推荐与分析结果之间的关联,并以规定的 AI 预览免责声明结尾。

配置指南

为该技能提供一张清晰、正面且能显示头发的自拍照。
将 YouCam API 密钥配置为 YOUCAM_API_KEY 环境变量,或将其存储在技能根目录中的 credentials.json 里。使用 credentials.example.json 作为格式参考。通过 Perfect Corp API 控制台获取密钥。
使用零积分验证命令确认密钥:
python scripts/youcam_core.py validate-key
确保环境可以运行 Python 并访问 yce-api-01.makeupar.com。该技能需要根据需要访问面部属性分析、肤色分析、头发迁移和发色 APIs。
每次运行时,检查所用功能的当前 Perfect Corp API 文档。如果 API 版本比 api-fallback.yaml 更新,请通过 --version 指定。
生成图片前,查询并告知当前积分费用。例如:
python scripts/youcam_core.py cost --feature hair-transfer
python scripts/youcam_core.py cost --feature hair-color
如果还要使用分析功能,也要查询这些功能的费用。用户选择选项之前,不要生成图片。

数据架构

该技能使用用户提供的自拍照和可选的造型参考图片;文档所述工作流程未指定单独的本地图像生成输出格式。
数据或元数据 用途
YOUCAM_API_KEY 身份验证,通过环境变量或 credentials.json 提供。 --src_file 用于分析或变换的源自拍照。 --ref_file 可选的发型参考图片,用于头发迁移。 features 面部属性分析必需参数,用于选择 faceShape 和 faceAspectRatio 等属性。
faceshape 分析结果:Triangle、Diamond、Heart、InvTriangle、Oblong、Oval、Round、Square 或 Unknown。
face_aspect_ratio 分析结果以 [1, r] 表示;如果脸型为 Unknown,指南会据此谨慎提供偏长或偏宽的建议。
template_id 所选头发迁移预设的标识符;模板列表还包含 title 和 thumb。
发色参数 例如 Honey Blonde 这样的预设,或自定义图案和调色板选项;根据 API 文档,渐变染发需要 blend_strength 和 line_offset。
task_id 和 task_status 用于检查异步生成任务。任务 ID 在 24 小时内有效。
data.results.url 生成的预览图片 URL;必须按原样返回。
预设模板可以使用 --starting_token 分页。除上述分析属性、功能名称、模板字段和任务字段外,该工作流程未定义单独的元数据分类体系。

高级特性

支持三种由用户选择的生成方式:更换发型、改变发色或两者兼有;只应运行用户选择的选项。
头发迁移支持使用预设模板 ID 或发型参考照片。发现模板不消耗积分,并支持使用 --starting_token 分页。
发色功能支持预设以及文档所述的自定义图案和调色板选项;渐变染发设置包括
blend_strength
line_offset
。
使用脸型和肤色分析作为建议依据。如果脸型为 Unknown,则不会编造分类,并且仅根据长宽比例提供偏长或偏宽的建议。
通过使用现有任务 ID 轮询
status
,直到异步生成任务成功或出错。重新运行生成命令可能会创建新任务并再次收费。
每次运行时检查当前 API 文档;如果有比后备规范更新的 API 版本,则支持显式指定 --version 。
原样提供生成的图片 URL,并要求清楚说明预览由 AI 生成、结果可能有所不同,且染发应咨询专业发型师。


name: hair-color-style-advisor description: >- Recommend a hairstyle and hair color based on the user's face shape and skin tone,
then preview them with YouCam (Perfect Corp) AI. Use for "推薦髮型", "換髮色",
"hairstyle advice", "hair color try-on". Do NOT use for hair health diagnostics
(that's hair-diagnostics), skin, makeup, or clothes.
version: 1.1.1
requirements:
credentials:

  • name: YOUCAM_API_KEY source: env | credentials.json (in the skill root, next to SKILL.md)
    network:
  • yce-api-01.makeupar.com apis:
  • face-attr-analysis
  • skin-tone-analysis
  • hair-transfer
  • hair-color permissions:
  • type: exec commands: [python]

Hair Color & Style Advisor

An analysis + generation skill: analyze face shape and skin tone, then recommend and preview a hairstyle and/or hair color.

When to trigger

When the user wants a hairstyle/color recommendation or try-on. For hair-health diagnostics, hand off to hair-diagnostics.

Ask first (this skill has multiple generation options) and state cost

Before generating, ask the user what they want and tell them the credit cost of each:

Restyle (change hairstyle) — hair-transfer
Recolor (change hair color) — hair-color
Both Get costs with python scripts/youcam_core.py cost --feature hair-transfer and --feature hair-color (plus the analysis features if you run them), tell the user, and only run what they choose.
Get the latest API spec (do this every run)
Facial attributes: https://docs.perfectcorp.com/reference/ai_face_analyzer.md
Skin tone: https://docs.perfectcorp.com/reference/ai_skin_tone_analysis.md
Restyle: https://docs.perfectcorp.com/reference/ai_hairstyle.md (latest may be hair-transfer v2.1)
Recolor: https://docs.perfectcorp.com/reference/ai_hair_color.md Pass --version if newer than api-fallback.yaml.

Prerequisites

A clear, front-facing selfie that shows the hair.
Run python scripts/youcam_core.py validate-key (0 credits) to confirm the key. If it is not set, tell the user to get one at https://yce.perfectcorp.com/api-console and set the YOUCAM_API_KEY env var, or create credentials.json in the skill root (see credentials.example.json for the format).

Flow

Analyze (as needed): face shape with python scripts/youcam_core.py run --feature face-attr-analysis --src_file --param features='["faceShape","faceAspectRatio"]' (features is required and picks which attributes to measure), and run --feature skin-tone-analysis for colors. The face shape comes back as faceshape: one of Triangle, Diamond, Heart, InvTriangle, Oblong, Oval, Round, Square, or Unknown; references/guide.md has advice for Round, Oblong, Square, and Heart.

If it is Unknown, don't guess a shape. face_aspect_ratio comes back as [1, r] (ideal 1 : 1.46): r above about 1.6 means a long face, below about 1.3 a short/wide one. Use it only for that long-vs-wide advice, and keep the rest general.

Recommend: use references/guide.md — face shape → hairstyle silhouette, skin tone → color family.
Restyle (hair-transfer): style source can be a preset template or a reference photo.
Template: list the styles with python scripts/youcam_core.py templates --feature hair-transfer (0 credits; each has an id, title, and thumb image; pass --starting_token for the next page), let the user pick one, then run --feature hair-transfer --src_file --param template_id= Reference photo: run --feature hair-transfer --src_file --ref_file Recolor (hair-color): run --feature hair-color --src_file --param preset="Honey Blonde" (or custom pattern + palettes; ombre needs blend_strength / line_offset — see the doc). The generation returns a result image URL in data.results.url.

If run prints "task_status": "running", the task is still processing and run stopped waiting. Do not run it again, since that starts a new task and charges again. Check back with python scripts/youcam_core.py status --feature --task_id , using the task_id from that output, until task_status is success or error. A task_id stays valid for 24 hours.

Output rules

Return the result image URL exactly as given (hyperlink is OK; do not modify it).
Explain the recommendation (face shape → style, skin tone → color).
Always end with this note: "This preview image is AI-generated and for reference only; real hairstyle/color results may vary. For coloring, consult a professional stylist."
虚拟试衣工作室

Beauty Advisor