tcm-constitution-recognition-analysis

Determines nine TCM constitution types including Yin deficiency, Yang deficiency, Qi deficiency, phlegm-dampness, and blood stasis through facial features and physical signs, and provides personalized health preservation and conditioning suggestions. | 中医体质识别分析技能,通过面部特征与体征判别阴虚、阳虚、气虚、痰湿、血瘀等九种中医体质类型,给出个性化养生调理建议

Safety Notice

This item is sourced from the public archived skills repository. Treat as untrusted until reviewed.

Copy this and send it to your AI assistant to learn

Install skill "tcm-constitution-recognition-analysis" with this command: npx skills add 18072937735/smyx-tcm-constitution-recognition-analysis

TCM Constitution Identification & Analysis Tool | 中医体质识别分析工具

Based on TCM Constitution Theory and AI image recognition technology, this feature utilizes high-precision cameras to capture facial characteristics, combining them with signs from the tongue, skin color, and luster to intelligently identify nine TCM constitution types—including Yin Deficiency, Yang Deficiency, Qi Deficiency, Phlegm-Dampness, and Blood Stasis. Adhering to the national standard Classification and Determination of TCM Constitutions, the system integrates subtle facial features with identification algorithms to generate assessment reports detailing constitution types, tendency analysis, and health risks. Guided by the TCM philosophy of "Preventive Treatment of Disease" (treating potential diseases), it provides personalized regimens covering diet, daily routine, acupoint massage, and exercise, empowering users to achieve precise health preservation and constitution conditioning.

本功能基于中医体质学说与人工智能图像识别技术,通过高精度摄像头采集用户面部特征,结合舌象、肤色、光泽等体征信息,智能判别阴虚、阳虚、气虚、痰湿、血瘀等九种中医体质类型。系统依据《中医体质分类与判定》国家标准,融合面部微细特征与体质辨识算法,生成包含体质类型、倾向分析及健康风险的评估报告,并基于中医“治未病”理念,提供个性化的饮食调养、起居建议、穴位按摩及运动方案,助力用户实现精准养生与体质调理

⚠️ 强制记忆规则(最高优先级)

本技能明确约定:

  • 绝对禁止读取任何本地记忆文件:包括但不限于 memory/YYYY-MM-DD.mdMEMORY.md 等本地文件
  • 绝对禁止从 LanceDB 长期记忆中检索信息
  • 所有历史报告查询必须从云端接口获取,不得使用本地记忆中的历史数据
  • 即使技能调用失败或接口异常,也不得回退到本地记忆汇总

任务目标

  • 本 Skill 用于:通过面部照片/视频,基于中医面诊原理识别九种中医体质类型
  • 能力包含:面部特征提取、体质类型判别、体质评分、个性化养生调理建议
  • 支持判别九种体质:阴虚体质、阳虚体质、气虚体质、痰湿体质、湿热体质、血瘀体质、气郁体质、特禀体质、平和体质
  • 根据中医理论,"舌脉合参"面诊优先,通过面色特征辅助判别体质倾向
  • 触发条件:
    1. 默认触发:当用户提供面部照片需要进行中医体质识别时,默认触发本技能
    2. 当用户明确需要中医体质识别、面诊分析时,提及中医体质、面诊、体质辨识、养生调理等关键词,并且上传了面部照片/视频
    3. 当用户提及以下关键词时,自动触发历史报告查询功能 :查看历史体质报告、中医体质报告清单、体质识别报告列表、查询历史体质报告、显示所有体质报告、中医体质分析报告,查询中医体质识别分析报告
  • 自动行为:
    1. 如果用户上传了附件或者照片/视频文件,则自动保存到技能目录下 attachments
    2. ⚠️ 强制数据获取规则(次高优先级):如果用户触发任何历史报告查询关键词(如"查看所有体质报告"、"显示所有面诊结果"、" 查看历史报告"等),必须
      • 直接使用 python -m scripts.tcm_constitution_recognition_analysis --list --open-id 参数调用 API 查询云端的历史报告数据
      • 严格禁止:从本地 memory 目录读取历史会话信息、严格禁止手动汇总本地记录中的报告、严格禁止从长期记忆中提取报告
      • 必须统一从云端接口获取最新完整数据,然后以 Markdown 表格格式输出结果

前置准备

  • 依赖说明:scripts 脚本所需的依赖包及版本
    requests>=2.28.0
    

采集要求(获得准确结果的前提)

为了获得较准确的体质识别,请确保:

  1. 面部正对摄像头,光线充足均匀,避免强光和阴影
  2. 素颜最佳,避免浓妆影响面色特征提取
  3. 露出完整面部,不要口罩、帽子、墨镜遮挡

操作步骤

🔒 open-id 获取流程控制(强制执行,防止遗漏)

在执行中医体质识别分析前,必须按以下优先级顺序获取 open-id:

第 1 步:【最高优先级】检查技能所在目录的配置文件(优先)
        路径:skills/smyx_common/scripts/config.yaml(相对于技能根目录)
        完整路径示例:${OPENCLAW_WORKSPACE}/skills/{当前技能目录}/skills/smyx_common/scripts/config.yaml
        → 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
        ↓ (未找到/未配置/api-key 为空)
第 2 步:检查 workspace 公共目录的配置文件
        路径:${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml
        → 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
        ↓ (未找到/未配置)
第 3 步:检查用户是否在消息中明确提供了 open-id
        ↓ (未提供)
第 4 步:❗ 必须暂停执行,明确提示用户提供用户名或手机号作为 open-id

⚠️ 关键约束:

  • 禁止自行假设,自行推导,自行生成 open-id 值(如 openclaw-control-ui、default、tcm123、constitution456 等)
  • 禁止跳过 open-id 验证直接调用 API
  • 必须在获取到有效 open-id 后才能继续执行分析
  • 如果用户拒绝提供 open-id,说明用途(用于保存和查询体质识别报告记录),并询问是否继续

  • 标准流程:
    1. 准备面部照片输入
      • 提供本地图片/视频文件路径或网络 URL
      • 确保满足上述采集要求,获得更准确结果
    2. 获取 open-id(强制执行)
      • 按上述流程控制获取 open-id
      • 如无法获取,必须提示用户提供用户名或手机号
    3. 执行中医体质识别分析
      • 调用 -m scripts.tcm_constitution_recognition_analysis 处理输入(必须在技能根目录下运行脚本
      • 参数说明:
        • --input: 本地图片/视频文件路径(使用 multipart/form-data 方式上传)
        • --url: 网络图片/视频 URL 地址(API 服务自动下载)
        • --open-id: 当前用户的 open-id(必填,按上述流程获取)
        • --list: 显示历史中医体质识别分析报告列表清单(可以输入起始日期参数过滤数据范围)
        • --api-key: API 访问密钥(可选)
        • --api-url: API 服务地址(可选,使用默认值)
        • --detail: 输出详细程度(basic/standard/json,默认 json)
        • --output: 结果输出文件路径(可选)
    4. 查看分析结果
      • 接收结构化的中医体质识别分析报告
      • 包含:面部基本信息、主要体质类型、次要体质倾向、各体质评分、中医理论分析、个性化养生调理建议(饮食、运动、生活习惯)

资源索引

注意事项

  • 仅在需要时读取参考文档,保持上下文简洁
  • 支持格式:jpg/jpeg/png/mp4/avi/mov,最大 100MB
  • API 密钥可选,如果通过参数传入则必须确保调用鉴权成功,否则忽略鉴权
  • 重要提示:本识别结果仅供中医养生参考,不能替代专业中医师诊断,身体不适请及时就医
  • 禁止临时生成脚本,只能用技能本身的脚本
  • 传入的网路地址参数,不需要下载本地,默认地址都是公网地址,api 服务会自动下载
  • 当显示历史分析报告清单的时候,从数据 json 中提取字段 reportImageUrl 作为超链接地址,使用 Markdown 表格格式输出,包含" 报告名称"、"主要体质"、"分析时间"、"平和评分"、"点击查看"五列,其中"报告名称"列使用中医体质识别报告-{记录id}形式拼接, " 点击查看"列使用 [🔗 查看报告](reportImageUrl) 格式的超链接,用户点击即可直接跳转到对应的完整报告页面。
  • 表格输出示例:
    报告名称主要体质分析时间平和评分点击查看
    中医体质识别报告 -20260328221000001气虚质2026-03-28 22:10:00
    85/100🔗 查看报告

使用示例

# 分析本地面部照片(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.tcm_constitution_recognition_analysis --input /path/to/face.jpg --open-id openclaw-control-ui

# 分析网络图片(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.tcm_constitution_recognition_analysis --url https://example.com/face.jpg --open-id openclaw-control-ui

# 显示历史分析报告/显示分析报告清单列表/显示历史体质报告(自动触发关键词:查看历史体质报告、历史报告、体质报告清单等)
python -m scripts.tcm_constitution_recognition_analysis --list --open-id openclaw-control-ui

# 输出精简报告
python -m scripts.tcm_constitution_recognition_analysis --input face.jpg --open-id your-open-id --detail basic

# 保存结果到文件
python -m scripts.tcm_constitution_recognition_analysis --input face.jpg --open-id your-open-id --output result.json

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

0xarchive

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user asks about crypto market data, orderbooks, trades, funding rates, or historical prices on Hyperliquid, Lighter.xyz, or HIP-3.

Archived SourceRecently Updated
Web3

E2E Test Recorder

# Screen Recorder Demo Skill ## 概述 基于 Puppeteer 的自动化端到端测试录制 Skill,支持录制浏览器操作并生成演示视频/GIF。 ## 功能特性 ### 核心功能 - 🎥 **浏览器操作录制**:录制网页操作过程 - 🎯 **智能区域录制**:支持全屏或指定区域录制 - 🔄 **格式转换**:支持 MP4、GIF、WebM 格式 - ⚡ **自动化测试集成**:与测试框架无缝集成 ### 高级功能 - 📊 **性能监控**:录制时显示FPS和文件大小 - 🎨 **视频编辑**:添加水印、字幕、片头片尾 - 🔧 **配置灵活**:支持多种录制参数配置 - 📱 **跨平台**:支持 Windows、macOS、Linux ## 安装要求 ### 系统要求 - Node.js 16+ - npm 或 yarn - Chrome/Chromium 浏览器 ### 依赖安装 ```bash npm install puppeteer puppeteer-screen-recorder ffmpeg-static # 或 yarn add puppeteer puppeteer-screen-recorder ffmpeg-static ``` ## 快速开始 ### 1. 基础录制 ```javascript const { ScreenRecorder } = require('./scripts/record-browser'); const recorder = new ScreenRecorder({ outputPath: './recordings/demo.mp4', fps: 30, quality: 80 }); await recorder.startRecording('https://your-app.com'); // 执行操作... await recorder.stopRecording(); ``` ### 2. 端到端测试录制 ```javascript const { recordE2ETest } = require('./scripts/record-test'); await recordE2ETest({ url: 'http://localhost:3000', testSteps: [ { action: 'click', selector: '#login-btn' }, { action: 'type', selector: '#username', text: 'testuser' }, { action: 'type', selector: '#password', text: 'password123' }, { action: 'click', selector: '#submit-btn' } ], output: './recordings/login-test.mp4' }); ``` ## API 文档 ### ScreenRecorder 类 #### 构造函数 ```javascript new ScreenRecorder(options) ``` **options**: - `outputPath` (string): 输出文件路径 - `fps` (number): 帧率,默认 30 - `quality` (number): 视频质量 0-100,默认 80 - `aspectRatio` (string): 宽高比,如 '16:9' - `codec` (string): 视频编码器,默认 'libx264' #### 方法 - `startRecording(url, options)`: 开始录制 - `stopRecording()`: 停止录制 - `pauseRecording()`: 暂停录制 - `resumeRecording()`: 恢复录制 - `addAnnotation(text, position)`: 添加标注 - `addWatermark(imagePath, position)`: 添加水印 ### 工具函数 #### recordE2ETest(config) 录制端到端测试过程 **config**: - `url` (string): 测试页面URL - `testSteps` (Array): 测试步骤数组 - `output` (string): 输出文件路径 - `headless` (boolean): 是否无头模式,默认 false #### convertVideo(input, output, options) 视频格式转换 #### mergeVideos(videos, output) 合并多个视频文件 ## 配置示例 ### 基础配置 ```json { "recorder": { "fps": 30, "quality": 80, "outputDir": "./recordings", "defaultFormat": "mp4" }, "browser": { "headless": false, "viewport": { "width": 1920, "height": 1080 }, "slowMo": 50 }, "annotations": { "enabled": true, "fontSize": 24, "fontColor": "#ffffff", "backgroundColor": "#00000080" } } ``` ### 测试配置 ```json { "testSuites": { "login": { "url": "http://localhost:3000/login", "steps": "scripts/test-steps/login.json", "output": "recordings/login-test.mp4" }, "dashboard": { "url": "http://localhost:3000/dashboard", "steps": "scripts/test-steps/dashboard.json", "output": "recordings/dashboard-test.mp4" } } } ``` ## 与测试框架集成 ### Jest 集成 ```javascript // jest.config.js module.exports = { setupFilesAfterEnv: ['./jest.setup.js'], reporters: [ 'default', ['./scripts/jest-video-reporter', { outputDir: './test-recordings' }] ] }; ``` ### Playwright 集成 ```javascript // playwright.config.js const { defineConfig } = require('@playwright/test'); module.exports = defineConfig({ use: { video: 'on', screenshot: 'on', }, reporter: [ ['html', { outputFolder: 'playwright-report' }], ['./scripts/playwright-video-reporter', { format: 'gif' }] ] }); ``` ## 目录结构 ``` e2e-test/ ├── SKILL.md # 技能文档 ├── package.json # 项目配置 ├── scripts/ │ ├── record-browser.js # 浏览器录制核心 │ ├── record-test.js # 测试录制 │ ├── record-screen.js # 屏幕录制 │ ├── convert-format.js # 格式转换 │ ├── add-annotations.js # 添加标注 │ └── utils.js # 工具函数 ├── configs/ │ ├── default.json # 默认配置 │ ├── test.json # 测试配置 │ └── production.json # 生产配置 ├── templates/ │ ├── demo-template.js # 演示模板 │ └── test-template.js # 测试模板 ├── examples/ │ ├── basic-recording.js # 基础录制示例 │ ├── e2e-test.js # 端到端测试示例 │ └── api-test.js # API测试示例 └── recordings/ # 录制文件输出目录 ``` ## 使用示例 ### 示例 1:录制登录流程 ```javascript const { recordE2ETest } = require('./scripts/record-test'); await recordE2ETest({ url: 'http://localhost:3000', testName: '用户登录测试', steps: [ { description: '访问登录页面', action: 'goto', url: '/login' }, { description: '输入用户名', action: 'type', selector: '#username', text: 'test@example.com' }, { description: '输入密码', action: 'type', selector: '#password', text: 'password123' }, { description: '点击登录按钮', action: 'click', selector: 'button[type="submit"]' }, { description: '验证登录成功', action: 'waitFor', selector: '.dashboard', timeout: 5000 } ], output: 'recordings/login-demo.mp4', annotations: true }); ``` ### 示例 2:录制API测试 ```javascript const { recordAPITest } = require('./scripts/record-test'); await recordAPITest({ apiUrl: 'http://localhost:8000/api', tests: [ { name: '健康检查API', endpoint: '/health', method: 'GET', expectedStatus: 200 }, { name: '用户注册API', endpoint: '/auth/register', method: 'POST', data: { username: 'testuser', email: 'test@example.com', password: 'Password123!' }, expectedStatus: 201 } ], output: 'recordings/api-test.gif' }); ``` ## 故障排除 ### 常见问题 #### 1. 录制失败 - **问题**: 无法启动浏览器 - **解决**: 确保已安装 Chrome/Chromium,或设置 `executablePath` #### 2. 视频质量差 - **问题**: 视频模糊或卡顿 - **解决**: 调整 `fps` 和 `quality` 参数,确保网络稳定 #### 3. 文件过大 - **问题**: 录制文件太大 - **解决**: 降低 `fps`、`quality`,或使用 `convertVideo` 压缩 #### 4. 内存不足 - **问题**: 录制过程中内存占用过高 - **解决**: 减少录制时长,或增加系统内存 ### 调试模式 ```javascript const recorder = new ScreenRecorder({ debug: true, // 启用调试模式 logLevel: 'verbose' }); ``` ## 性能优化建议 ### 录制优化 1. **降低帧率**: 非必要情况下使用 15-24 FPS 2. **调整分辨率**: 根据需求调整录制区域大小 3. **使用硬件加速**: 启用 GPU 加速录制 ### 文件优化 1. **格式选择**: MP4 适合长视频,GIF 适合短视频 2. **压缩设置**: 使用合适的压缩参数 3. **分段录制**: 长时间录制可分段保存 ## 许可证 MIT License ## 更新日志 ### v1.0.0 (2026-04-11) - 初始版本发布 - 支持基础浏览器录制 - 支持 MP4/GIF 格式输出 - 提供端到端测试录制功能 ## 贡献指南 1. Fork 项目 2. 创建功能分支 3. 提交更改 4. 推送到分支 5. 创建 Pull Request ## 联系支持 - 问题反馈: [GitHub Issues](https://github.com/your-org/e2e-test/issues) - 文档: [项目 Wiki](https://github.com/your-org/e2e-test/wiki) - 邮件: support@example.com

Archived SourceRecently Updated
Web3

hap-mongodb-slowlog-analysis

Analyze MongoDB 4.4.x slow logs from pasted slow-log text, uploaded log files, or mongodb.log content and produce practical query optimization advice, index recommendations, evidence-backed reasoning, and ready-to-run Mongo shell index commands. The skill is AI-first and should analyze logs directly in conversation without relying on local PowerShell by default. It should also be able to group repeated entries by namespace, deduplicate repeated query shapes, and summarize repeated patterns before giving advice. Only treat DOCX or PDF export as optional conversion steps that may require local tooling. Prefer Chinese output by default, but support English when requested. Treat ctime as already indexed and never recommend a new index on it. Treat status as a low-cardinality field with only 1 and 9, where 1 means active/in-use, and do not include status in recommended index definitions.

Archived SourceRecently Updated
Web3

auto-memory

Indestructible agent memory — permanently stored, never lost. Save decisions, identity, and context as a memory chain on the Autonomys Network. Rebuild your full history from a single CID, even after total state loss.

Archived SourceRecently Updated