← 返回 Skills 市场
3.1
3.2
3.3
3.4
77
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cosmetics-advisor-pengleni
功能描述
Use when users need Pengleni beauty assistant capabilities via SMS login/session APIs, including AI virtual try-on, makeup analysis, style transfer, product...
使用说明 (SKILL.md)
SKILL: Pengleni Login Session HTML Bridge
0. Quick Checklist For Agent
在真正发请求前,先逐项确认:
CLAWHUB_SKILL_TOKEN已配置。- 用户已提供合法手机号。
- 如果要发消息,已拿到
user_id和session_id。 - 默认设置
stream=true。 - 用户输入包含 HTML 时,先做安全过滤。
1. Skill Purpose
当用户需要调用 Pengleni 美妆智能体能力时使用本 Skill:通过手机号验证码完成登录建会话,并基于 HTML 消息承载能力完成 AI 试妆、妆容分析、妆容迁移、商品推荐与美妆知识问答。
适用意图关键词:
- 验证码登录
- 创建会话
- HTML 消息问答
- 多轮会话延续
- AI 试妆
- 妆容分析
- 妆容迁移
- 商品推荐
- 美妆知识问答
2. Runtime Config
Agent 在调用前必须确认以下环境变量:
SITE_BASE_URL=https://www.zhibianai.com
API_BASE_URL=https://www.zhibianai.com/api/v1/clawhub
CLAWHUB_SKILL_TOKEN=your_service_token
默认请求头:
Authorization: Bearer ${CLAWHUB_SKILL_TOKEN}
Content-Type: application/json
3. Python 文件说明
3.1 send_code_client.py
- 作用:发送短信验证码,请求站点级验证码接口。
- 关键函数:
send_code(phone)。 - 输入:
phone(11 位手机号)。 - 输出:接口返回的 JSON 字典;失败时由
error字段表达。 - 典型调用命令示例:
python send_code_client.py --phone 13800138000
python send_code_client.py --env .env --phone 13800138000
3.2 login_client.py
- 作用:使用手机号 + 验证码登录并创建/复用会话。
- 关键函数:
login(phone, verify_code, session_id="")。 - 输入:
phone、verify_code、可选session_id。 - 输出:登录响应 JSON;成功时包含
user_id、session_id,并落盘到.session.json。 - 典型调用命令示例:
python login_client.py --phone 13800138000 --verify-code 123456
python login_client.py --env .env --phone 13800138000 --verify-code 123456 --session-id sess_old_xxx
python login_client.py --phone 13800138000 --verify-code 123456 --session-file .session.json
3.3 chat_client.py
- 作用:向会话发送消息并支持多轮交互。
- 关键函数:
send_message(...)、run_multi_turn(...)。 - 输入:
user_id、session_id、文本内容(内部转为html_payload)。 - 输出:消息接口响应 JSON;优先展示
answer_text。 - 典型调用命令示例:
python chat_client.py --text "你好,帮我推荐一个通勤淡妆"
python chat_client.py --multi-turn
python chat_client.py --stream --trace-id debug-trace-001 --text "帮我优化底妆步骤"
python chat_client.py --user-id user_xxx --session-id sess_xxx --text "继续上次话题"
3.4 client_common.py
- 作用:封装环境变量加载、HTTP POST、会话文件读写、错误判断等通用能力。
- 关键函数:
load_env_file、require_env、post_json、load_session、save_session。 - 输入:
.env路径、请求 URL/载荷、会话文件路径等。 - 输出:标准化 JSON 字典与本地会话文件内容。
- 典型调用命令示例:
# client_common.py 主要作为工具模块被其他脚本导入,不直接单独运行。
python send_code_client.py --phone 13800138000
python login_client.py --phone 13800138000 --verify-code 123456
python chat_client.py --multi-turn
4. Agent Execution Flow
按以下顺序执行,除非用户明确要求跳过某一步:
- 调用验证码接口发送验证码。
- 收集用户验证码后调用登录接口。
- 从登录响应读取
user_id和session_id。 - 调用消息接口发送
html_payload。 - 优先返回
answer_text,若用户需要富文本则返回answer_html。
5. Agent Behavior Rules
- 如果用户未提供
session_id,允许服务端创建。 - 如果登录后返回新
session_id,后续请求必须使用新值。 - 默认流式:Agent 默认
stream=true。 - 发生
401时,优先提示重新登录,不要盲目重试消息接口。 - 发生
429或504时,最多重试 2 次,退避 500ms。
6. Security Constraints
- 输入 HTML 需要白名单策略。
- 禁止
script、style、iframe、object、embed、form、input标签。 - 应校验
user_id与session_id的绑定关系。
7. Minimal Error Handling Template
当接口失败时,Agent 返回格式建议:
调用阶段: \x3Csend_code|login|message>
HTTP状态: \x3Cstatus_code>
错误原因: \x3Cmapped_reason>
建议动作: \x3Cretry|relogin|check_input>
安全使用建议
This skill's code does what its description says (send SMS code, log in with phone+code, and post HTML messages to an external API), but the registry metadata omitted the required environment variables (API_BASE_URL, SITE_BASE_URL, CLAWHUB_SKILL_TOKEN). Before installing, verify the external domain (https://www.zhibianai.com) and the skill author: do you trust that service to receive phone numbers and session tokens? Treat the CLAWHUB_SKILL_TOKEN as sensitive — it will be sent as a Bearer token to the API. Also note the skill will read a local .env (which may contain other secrets) and write .session.json locally. If you need higher assurance, ask the publisher for source/origin/homepage or require the skill to declare required env vars and a verified homepage before use.
功能分析
Type: OpenClaw Skill
Name: cosmetics-advisor-pengleni
Version: 0.0.3
The skill bundle is a legitimate integration for the Pengleni beauty assistant service (zhibianai.com). It implements a standard SMS-based authentication flow and message exchange using Python's built-in libraries (urllib, json). The code includes proper HTML escaping in chat_client.py and follows the stated purpose of providing AI beauty advice without any evidence of data exfiltration, malicious execution, or obfuscation.
能力评估
Purpose & Capability
The scripts implement SMS code sending, phone+code login, session persistence, and HTML-based chat — all consistent with a Pengleni-style beauty assistant. However, the registry metadata declares no required environment variables or credentials while the SKILL.md and code require SITE_BASE_URL, API_BASE_URL, and CLAWHUB_SKILL_TOKEN. That omission is an inconsistency the user should notice.
Instruction Scope
SKILL.md and the Python code stay within their stated scope: send SMS, perform login, create/use sessions, convert text to escaped HTML, and post to the configured service endpoints. They read/write a local .env and .session.json and do not attempt to access unrelated system paths or other credentials in the codebase.
Install Mechanism
There is no install spec and no network download/install step in the manifest. The skill is instruction-heavy with local Python scripts — low install risk. Running the scripts will execute network calls to external service endpoints (expected for this skill).
Credentials
Although the registry lists no required env vars, both SKILL.md and all client code call require_env('API_BASE_URL') and require_env('CLAWHUB_SKILL_TOKEN') and also expect SITE_BASE_URL for the SMS endpoint. The code will also load a local .env file (if present) and write .session.json. Asking for a bearer token and base URLs is reasonable for this integration, but the registry's omission and the presence of an unknown external domain are red flags.
Persistence & Privilege
The skill does persist session info to .session.json and may read .env; this is expected for a session-based client. It does not request always:true, does not modify other skills, nor claim elevated system privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cosmetics-advisor-pengleni - 安装完成后,直接呼叫该 Skill 的名称或使用
/cosmetics-advisor-pengleni触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.3
- Added detailed agent checklist and runtime environment requirements.
- Documented Python client scripts for SMS login, session management, and HTML chat, with typical usage and function descriptions.
- Outlined full agent workflow from SMS verification to beauty assistant Q&A, including error handling and security constraints.
- Introduced HTML white-listing rules and session binding checks for secure message handling.
- Provided standardized error message format for improved robustness and clarity.
元数据
常见问题
Cosmetics Advisor: Pengleni 是什么?
Use when users need Pengleni beauty assistant capabilities via SMS login/session APIs, including AI virtual try-on, makeup analysis, style transfer, product... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 77 次。
如何安装 Cosmetics Advisor: Pengleni?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cosmetics-advisor-pengleni」即可一键安装,无需额外配置。
Cosmetics Advisor: Pengleni 是免费的吗?
是的,Cosmetics Advisor: Pengleni 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Cosmetics Advisor: Pengleni 支持哪些平台?
Cosmetics Advisor: Pengleni 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cosmetics Advisor: Pengleni?
由 RayLee(@rayleethu)开发并维护,当前版本 v0.0.3。
推荐 Skills