头发诊断

头发诊断利用 YouCam AI 从自拍照片中分析选定的头发健康指标,并将结果整合为一份清晰的报告。

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

安装与下载

1 ClawHub CLI

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

npx clawhub@latest install youcam-hair-diagnostics

2 手动安装

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

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

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

3 提示词安装

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

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

更倾向于下载?

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

下载技能 (.zip)

基本信息

名称 头发诊断
Slug youcam-hair-diagnostics
创建者 youcam-api
创建时间 2026-10-16 06:07:00
更新时间 2026-10-16 06:07:00
收藏数 0
使用量 343
浏览量 5

安装指南

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

什么是

头发诊断是一个 Openclaw Skills 检测工作流,用于通过 Perfect Corp YouCam AI API 评估头发密度、发质、毛躁度和长度。它允许用户仅选择所需的指标、查看适用的点数成本、提交所需的自拍照角度,并在综合报告中接收通俗易懂的调查结果。
该技能专为头发健康洞察而设计,而非发型或发色试戴。它验证 API 密钥、在每次运行前检索最新的 API 文档、监控异步任务、使用附带的指南解释返回的术语,并添加实用的护理指导以及重要的非医疗免责声明。

应用场景

从清晰的自拍照中评估可见的头发密度和头皮可见度。
使用正面、右侧和左侧照片识别发质。
从所需的三个角度照片集中评估毛躁度。
从单个正面自拍照中估计头发长度。
生成涵盖密度、发质、毛躁度和长度的完整报告。
在咨询皮肤科医生之前提供头发健康参考信息。
触发诸如头发诊断、头发健康报告、发质分析或头发分析等请求。
将发型和发色试戴请求转交给单独的 hair-color-style-advisor 技能。

工作原理

识别请求的指标并解释每次检测都会消耗点数。
查询每个选定 API 功能的当前成本,并在运行任何内容之前告知用户总额。
请求正确的图像:一张清晰的正面自拍照用于密度或长度,正好三张按正面、右侧和左侧顺序排列的图像用于发质或毛躁度。密度还要求头部向下倾斜约 45 度,以便露出头皮和发际线。
通过零点数密钥检查验证 YouCam 凭据。
在提交请求之前,阅读每个选定指标的最新 Perfect Corp API 规范。
仅运行用户批准的检测,使用适当的单文件或三文件命令。
如果请求是异步的,请保留其任务 ID 并轮询状态,而不是再次提交请求,从而避免重复收费。任务 ID 在 24 小时内保持有效。
解析每个成功的 JSON 响应,使用 references/guide.md 解释返回的映射和术语,并省略响应中缺少的指标。
将选定的结果组合成一份包含通俗易懂的注释、总体摘要、温和护理指导和所需医疗免责声明的报告。

配置指南

确保 Python 可用,并将技能文件(包括 scripts/youcam_core.py、references/guide.md 和 credentials.example.json)放在技能根目录中。
通过 Perfect Corp API 控制台创建 YouCam API 密钥:https://yce.perfectcorp.com/api-console。
通过环境变量或紧邻 SKILL.md 的 credentials.json 文件配置密钥。
export YOUCAM_API_KEY="your_api_key"
或者,使用 credentials.example.json 中显示的格式创建 credentials.json。 4. 确认允许对 yce-api-01.makeupar.com 进行出站网络访问,并且允许执行 Python。 5. 在消耗点数之前验证凭据:
python scripts/youcam_core.py validate-key
在请求任何检测之前检索成本:
python scripts/youcam_core.py cost --feature hair-density-detection
python scripts/youcam_core.py cost --feature hair-type-detection
python scripts/youcam_core.py cost --feature hair-frizziness-detection
python scripts/youcam_core.py cost --feature hair-length-detection
每次运行,请查阅所选 API 的最新相关 Perfect Corp 文档。在用户批准成本并提供所需的图像输入之前,请勿运行指标。

数据架构

技能元数据
Frontmatter 定义了技能身份和运行时要求:
字段 值
名称 hair-diagnostics
版本 1.1.1
凭据 来自环境或根级 credentials.json 的 YOUCAM_API_KEY
网络 yce-api-01.makeupar.com
权限 Python 执行
API hair-density-detection, hair-type-detection, hair-frizziness-detection, hair-length-detection
输入分类
密度: 一张清晰的正面自拍照,头部向下倾斜约 45 度,以便露出发际线和头皮。
长度: 一张清晰的正面自拍照,展示头发。
发质: 严格按照此顺序的三张图像:正面、右侧、左侧。
毛躁度: 严格按照此顺序的三张图像:正面、右侧、左侧。
API 响应结构
每个选定的检测都会返回包含功能特定结果的 JSON,结构等效于 data.results.hair_*,带有 mapping 和 term 字段。该术语通过 references/guide.md 进行解释并转换为通俗易懂的报告条目。
任务元数据
异步请求可能会返回 task_status: "running" 和一个 task_id。存储任务 ID 以便使用相同功能进行状态检查;它在 24 小时内保持有效。成功或失败的完成由 task_status: "success" 或 task_status: "error" 表示。
该技能未指定持久的报告文件格式;其主要输出是组装好的综合报告。缺失的指标必须省略,而不是推断。

高级特性

选择性执行可防止未批准的检测和不必要的点数消耗。
完整报告模式将所有四个支持的头发指标合并为一个响应。
成本发现在 API 执行之前内置于工作流中。
零点数 API 密钥验证有助于及早发现配置错误。
每次运行时的最新规范查找使请求与当前的 Perfect Corp API 文档保持一致。
多图像工作流强制执行发质和毛躁度的精确三角度要求。
异步任务轮询使用原始任务 ID,并避免意外创建和收取重复任务的费用。
特定于功能的 risulta 解释使用
references/guide.md
而不仅仅是公开原始 API 术语。
优雅处理会跳过缺失的 API 指标,而不是捏造结果。
每个报告都包含一个标准化的免责声明,即输出基于 AI,并非医疗诊断或治疗,并建议针对脱发或头皮问题寻求皮肤科医生的建议。
作为 Openclaw Skills 工作流,它可以集成到收集用户同意、请求图像、运行 Python 命令并呈现简明头发健康摘要的代理中。


name: hair-diagnostics description: >- Diagnose hair-health metrics — density, type, frizziness, length — from a single
selfie using YouCam (Perfect Corp) AI, and return one combined report. Use for
"頭髮體檢", "髮質分析", "hair diagnostics", "hair health report". Do NOT use for
hairstyle/color try-on (that's hair-color-style-advisor), 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:
  • hair-density-detection
  • hair-type-detection
  • hair-frizziness-detection
  • hair-length-detection permissions:
  • type: exec commands: [python]

Hair Diagnostics

A detection skill that can call up to four hair-diagnostic APIs and combine them into one report.

When to trigger

When the user wants hair-health insight (density / type / frizziness / length). For hairstyle or color try-on, hand off to hair-color-style-advisor.

Ask first (this skill has multiple detections) and state cost

Before running, ask the user which metrics they want and tell them the credit cost of each:

Density (hair-density-detection)
Type (hair-type-detection)
Frizziness (hair-frizziness-detection)
Length (hair-length-detection)
All four (full report) Get costs with python scripts/youcam_core.py cost --feature hair-density-detection (and the others), tell the user the total, and only run what they choose.
Get the latest API spec (do this every run)

Open the doc section(s) for the chosen metrics and read the latest version:

https://docs.perfectcorp.com/reference/ai_hair_density_detection.md
https://docs.perfectcorp.com/reference/ai_hair_type_detection.md
https://docs.perfectcorp.com/reference/ai_hair_frizziness_detection.md
https://docs.perfectcorp.com/reference/ai_hair_length_detection.md

Prerequisites (photo)
Density and Length: a single clear, front-facing selfie that shows the hair.
Type and Frizziness need 3 angle photos instead of one — front-facing, right-facing, and left-facing, in that order (the API requires exactly 3).
Only if Density is selected, ask for a photo with the head tilted down ~45° so the hairline and scalp are visible (density needs to see scalp visibility). If the user only wants type/frizziness/length, do NOT require the tilted pose.
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).
Run (only the chosen metrics)

python scripts/youcam_core.py run --feature hair-density-detection --src_file
python scripts/youcam_core.py run --feature hair-type-detection --src_files
python scripts/youcam_core.py run --feature hair-frizziness-detection --src_files
python scripts/youcam_core.py run --feature hair-length-detection --src_file
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.

Each returns JSON (data.results.hair_*{mapping, term}). Interpret with references/guide.md and assemble one report.

Output rules

For each selected metric, give the term + a plain-language note; end with an overall summary and gentle care directions.

If a metric is missing in the response, skip it — do not fill it in.

Always end with this note: "This is an AI-based hair detection, not a medical diagnosis or treatment. Results are for reference only; for hair-loss or scalp concerns, consult a dermatologist. Photo quality and pose can affect the results."
皮肤分析专家
虚拟试衣工作室