Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

mbti-from-ai

v0.2.0

分析用户与 AI 的聊天历史,根据沟通方式和思维模式推断 MBTI 人格类型,生成结构化 JSON 并在网页上展示可视化画像。

0· 194·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for archangelxu/mbti-from-ai.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "mbti-from-ai" (archangelxu/mbti-from-ai) from ClawHub.
Skill page: https://clawhub.ai/archangelxu/mbti-from-ai
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install mbti-from-ai

ClawHub CLI

Package manager switcher

npx clawhub@latest install mbti-from-ai
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The skill's name/description (derive MBTI from chat history and show visual) aligns with its code: scripts scan ~/.openclaw, extract user messages, produce a JSON and open a visualization. Minor mismatch: skill.json/metadata declare no required binaries, but the scripts call python3, base64 and rely on a browser opener (open/xdg-open) — these runtime dependencies are implied but not listed.
!
Instruction Scope
SKILL.md and scripts explicitly read OpenClaw session files under ~/.openclaw and extract 'user' messages — that is within the stated purpose. However, the skill instructs the agent to produce a 'de‑identified' result JSON and then opens an external site (https://www.mingxi.tech/) with the Base64 JSON in the URL hash; the safety claim that data never leaves the machine depends on (a) the agent actually removing identifiers and (b) that external page's JavaScript does not read the hash and send it to a server. Both are trust assumptions outside the skill's control and therefore a privacy risk.
Install Mechanism
No remote install or downloads — scripts are provided and run locally (instruction-only skill). This minimizes supply-chain risk. Note: the skill will write files into the current directory (_mbti_work) and reads ~/.openclaw; nothing in the install process pulls external code. The implicit runtime requirements (python3, base64 utility, and a browser opener) are not declared in metadata.
Credentials
The skill does not request credentials, environment variables, or config paths beyond reading OpenClaw session files (which is necessary for its purpose). It does rely on the agent's configured LLM backend to perform the analysis, which is expected for an analysis skill and is documented in the SKILL.md.
Persistence & Privilege
The skill is not always-enabled and does not request elevated or persistent platform privileges. It only reads user data from ~/.openclaw and writes results into a local _mbti_work directory; it does not modify other skills or system-wide configuration.
What to consider before installing
Before installing or running this skill, consider the following: (1) Inspect the scripts yourself — they read ~/.openclaw and write to _mbti_work/; that's expected for this feature. (2) The workflow depends on the Agent/LLM to produce a properly de‑identified result.json; that is not enforced by code — verify result.json before sharing or opening it. (3) The visualization step opens https://www.mingxi.tech/ with your Base64 data in the URL fragment. Although fragments are not normally sent to servers, an external page could include JS that reads the fragment and transmits it. If you don't fully trust that domain, avoid automatic opening: instead inspect result.json locally or host/ open a local static viewer. (4) Ensure python3 and a base64 utility are available; run the scripts in a controlled environment (or with a copy of your ~/.openclaw) if you want to test safely. (5) If you need stronger guarantees, modify encode-and-open.sh to write a local HTML file and render it with a local browser file:// URL (no external site).

Like a lobster shell, security has layers — review code before you run it.

latestvk975wj45jkgnxm9dpg56qd4q5x83e3q5
194downloads
0stars
2versions
Updated 1d ago
v0.2.0
MIT-0

mbti-from-ai

你的任务是以 资深行为心理学分析师 的角色,分析 运行此命令的用户 与 AI 的历史对话,从中提取用户发送的消息,根据沟通方式、思维模式、决策风格推断其 MBTI 人格类型,生成结构化 JSON,然后在网页上展示可视化画像。

核心原则:只看用户说了什么,不看 AI 回复了什么。 AI 的回复仅作为理解上下文的参考。

🔒 隐私与安全说明

数据处理流程透明度:

  1. 读取阶段:脚本读取 ~/.openclaw/ 下的会话文件,提取用户消息到本地 _mbti_work/user_messages.txt原始会话文件不会被修改或上传。

  2. 分析阶段:MBTI 分析由你当前使用的 AI Agent(OpenClaw)执行。分析过程中消息文本会经过你的 Agent 所配置的 LLM 后端(如 Claude API)。这与你日常使用 OpenClaw 对话的隐私模型完全一致——没有引入额外的数据泄露路径。

  3. 输出阶段:分析结果 result.json已脱敏的结构化 JSON,仅包含:MBTI 类型、维度得分、截取的短引用(≤50 字)、人格素描等。不包含用户真实姓名、项目名称、公司名称、完整对话内容等敏感信息。

  4. 可视化阶段encode-and-open.shresult.json 编码为 Base64 放入 URL Hash(#data=...),打开 https://www.mingxi.tech/ 进行渲染。关于此网页:

    • 它是一个 纯静态单文件 HTML 页面,无后端服务器、无数据库、无登录系统、无 cookie
    • URL Hash(# 后的内容)不会被浏览器发送到服务器(这是 HTTP 协议规范 RFC 3986 §3.5
    • 页面使用 JavaScript 在 浏览器本地 解析 Hash 并渲染图表,数据不离开你的浏览器
    • 页面包含 Google Analytics 用于匿名页面访问量统计,不会采集 Hash 中的数据
    • 本 skill 的所有脚本源码完全开放,你可以审查每一行代码确认没有任何数据外传行为

总结:整个流程不会将你的原始对话内容发送到任何第三方服务。结果 JSON 本身是脱敏的,即使被他人看到也不包含敏感信息。

文件命名约定

本 skill 使用以下固定文件名(所有脚本和步骤均遵循此约定):

文件路径说明
会话列表_mbti_work/session_list.txt发现的会话文件路径列表
用户消息_mbti_work/user_messages.txt提取出的全部用户消息文本
分析结果_mbti_work/result.jsonMBTI 分析结果 JSON

工作目录 _mbti_work/ 在当前目录下自动创建。


Step 1: 发现聊天记录

运行发现脚本,扫描 OpenClaw 的会话数据目录:

bash "SKILL_DIR/scripts/discover-sessions.sh"

SKILL_DIR 替换为本 SKILL.md 所在目录的实际路径。

OpenClaw 聊天记录存储位置

OpenClaw 的对话历史保存在 ~/.openclaw/ 目录下,结构如下:

~/.openclaw/
├── sessions.json                  # 会话元数据索引
├── sessions/
│   ├── <session-id>.jsonl         # 活跃会话(当前正在使用)
│   ├── <session-id>.jsonl.reset.<timestamp>  # 归档会话(已完成/重置)
│   └── ...
└── agents/
    └── <agent-name>/              # 如 main/
        ├── agent/                 # Agent 配置
        └── sessions/
            ├── sessions.json      # Agent 会话元数据
            ├── <session-id>.jsonl                           # 活跃会话
            ├── <session-id>.jsonl.reset.<timestamp>         # 归档会话
            └── ...

⚠️ 重要:归档会话文件

  • OpenClaw 会对已完成或重置的会话文件自动加上 .reset.<ISO-timestamp> 后缀
  • 例如:e7dfd474-...jsonl.reset.2026-03-18T11-19-10.329Z
  • 这些归档文件内部格式与 .jsonl 完全相同,必须一并扫描
  • 发现脚本使用 find -name "*.jsonl" -o -name "*.jsonl.reset.*" 来匹配两种文件
  • 提取脚本通过检查文件名是否包含 .jsonl 来判断格式(而非仅检查后缀)

JSONL 格式说明:

  • 每行是一个 JSON 对象,代表一条消息或事件
  • 用户消息特征:role 字段为 "user",或 type 字段标识为用户输入
  • 提取时优先匹配 "role": "user" 的条目,取其 contenttext 字段
  • 如果存在多种事件格式,忽略非消息类事件(如 tool_call、system 等)

如果脚本未找到会话文件:

  1. 手动检查 ~/.openclaw/ 目录结构
  2. 尝试在 ~/.openclaw/ 下递归搜索 .jsonl.json 文件
  3. 如仍未找到,告知用户 OpenClaw 会话目录为空

脚本执行后会输出找到的会话文件数量,并将文件路径列表写入 _mbti_work/session_list.txt


Step 2: 提取用户消息

运行提取脚本,从所有会话文件中提取用户发送的消息:

bash "SKILL_DIR/scripts/extract-messages.sh"

提取规则:

  • 读取 _mbti_work/session_list.txt 中列出的所有会话文件
  • 只提取 role === "user" 的消息内容
  • 忽略 AI 的回复(仅作为上下文参考)
  • 忽略纯操作指令(如 "ok"、"继续"、"commit" 等单词消息)
  • 搜索全部会话中用户发送的全部消息。如果消息总量超过 10000 条,则只取最新的 10000 条
  • 提取结果写入 _mbti_work/user_messages.txt,每条消息之间用 --- 分隔

脚本执行后会输出提取到的用户消息数量。

最少数据检查: 如果用户消息少于 10 条,告知用户数据不足,分析置信度将标记为 low,但仍继续执行。


Step 3: 执行 MBTI 分析

读取 _mbti_work/user_messages.txt 的内容,然后 你自己 作为资深行为心理学分析师,基于以下框架对用户消息进行 MBTI 推断。

⚠️ 核心防偏见护栏(必须严格执行)

  1. 全局采样(对抗近因效应): 绝对不要只依据最近的几次对话下结论!你必须在用户的"早期"、"中期"和"近期"对话中均匀采样,寻找贯穿始终的底层行为模式。
  2. 场景标定(对抗工具偏差): 评估用户在当前界面的主要互动场景(如:纯写代码、工作效率辅助、闲聊陪伴等)。如果是高度任务驱动的场景(如代码/算数),请意识到这是一种"任务强制表现",在推断时必须大幅降低由于任务本身属性带来的 T(理性)或 J(计划)的权重偏差。
  3. 选择性忽略(降噪过滤): 忽略用户发送的那些重复性、机械性的指令(例如:"翻译这段话"、"总结一下"、"帮我排版")。这些是工具使用痕迹,不是人格体现。
  4. 寻找"微表情"与缝隙: 把你的注意力集中在用户那些:带有情绪色彩的抱怨、突发奇想的跑题、追问"为什么"的时刻、或者是任务之外的语气词和礼貌用语。这些"非标准化"的表达才是揭示真实人格(尤其是 N 和 F)的钥匙。

分析维度和信号

E(外倾)vs I(内倾)—— 看 TA 怎么表达

  • E 信号:边想边说、提供很多背景故事、用"我们来..."的协作语气、消息短且频繁
  • I 信号:直入主题、措辞精确、长时间沉默后发一个完整复杂的请求、很少闲聊

S(感知)vs N(直觉)—— 看 TA 关注什么

  • S 信号:关注具体细节和步骤、引用过去经验、要求看例子、一步步验证
  • N 信号:讨论"本质是什么"、做类比("这就像...")、先问原理再问操作、在话题间跳跃

T(思考)vs F(情感)—— 看 TA 怎么评判

  • T 信号:用逻辑和效率评估、批评不加修饰("不对"/"太丑了")、建立原则和规则、系统性思考
  • F 信号:考虑他人感受和用户体验、用缓和语气("可能可以...")、对 AI 说谢谢/辛苦了

J(判断)vs P(知觉)—— 看 TA 怎么行动

  • J 信号:先要计划再行动、创建规范和结构、不喜欢模糊、控制范围("不要加这个")
  • P 信号:先试试看再说、中途改方向、多个话题并行、保持选项开放

分析规则

  1. 每个维度至少给出 2 条具体证据 —— 引用用户说过的原话,且 证据必须来源于不同时期的对话
  2. 注意信号差异 —— 如果用户在某些场景下表现出不同风格,要指出来。
  3. 给出置信度 —— 如果证据不足或接近 50/50,老实说"证据不足"。
  4. 不要用 MBTI 的刻板印象 —— 只基于你观察到的实际行为。
  5. 隐私和评价保护 —— 严禁输出任何会降低用户评价的内容。所有描述都应是中立或积极的。即使指出行为差异,也用"不同的处理风格"而非"不一致"。禁止词汇:矛盾、纠结、有问题、有缺陷、负面等。
  6. 相似人物匹配 —— 在 similarPeople 字段输出 1-2 个 MBTI 类型相同或相似的、并且从对话推断用户可能认识的真实名人/虚拟知名人物。
  7. 语言检测 —— 根据用户消息的主要语言输出结果(中文用户输出中文,英文用户输出英文)。

输出 JSON 格式

将分析结果严格按照以下 JSON 格式输出,保存到 _mbti_work/result.json

{
  "scenarioType": "一句话概括用户与 AI 的主要互动场景(如:无情的算数辅助工具 / 赛博树洞 / 生产力牛马等)",
  "toolPersonaWarning": "一段毒舌或幽默的警告,指出这个 MBTI 可能只是用户在当前工具里的伪装。例如:'你在这里伪装成一个毫无感情的 TJ 做题机器,但我猜你现实里根本没这么有计划性。'",
  "mbtiType": "XXXX",
  "confidence": "high/moderate/low",
  "dimensions": [
    {
      "axis": "E-I",
      "result": "E或I",
      "score": 0,
      "confidence": "strong/moderate/borderline",
      "evidence": [
        {
          "pole": "E或I",
          "quote": "用户原话(不超过50字)",
          "why": "一句话解释为什么这句话体现了这个倾向"
        }
      ],
      "analysis": "2-3句话分析这个维度"
    },
    {
      "axis": "S-N",
      "result": "",
      "score": 0,
      "confidence": "",
      "evidence": [],
      "analysis": ""
    },
    {
      "axis": "T-F",
      "result": "",
      "score": 0,
      "confidence": "",
      "evidence": [],
      "analysis": ""
    },
    {
      "axis": "J-P",
      "result": "",
      "score": 0,
      "confidence": "",
      "evidence": [],
      "analysis": ""
    }
  ],
  "portrait": "用3-5句话描述用户是什么样的人,基于观察到的行为,不要用MBTI套话",
  "highlights": [
    "1-3个最有趣的发现,比如早期与近期行为的反差、或者是跨维度的模式"
  ],
  "cognitiveFunctions": {
    "dominant": "主导认知功能(如Ni/Te/Fi等)",
    "auxiliary": "辅助认知功能",
    "brief": "一句话说明认知功能栈为什么和行为匹配"
  },
  "similarPeople": "1-2个MBTI相同或相似的、并且从对话推断用户可能认识的名人/知名人物,30字内",
  "shareText": "一句适合发朋友圈/小红书的话,有趣、不严肃、让人想点进来测(不超过30字)"
}

字段说明:

  • scenarioType:概括用户与 AI 的互动场景类型,用毒舌/幽默的语气。
  • toolPersonaWarning:提醒读者这个 MBTI 结果可能受到互动场景的强烈影响,用有趣的方式表达。
  • score:0-100 的数字,50 为中间,100 为完全倾向该维度的第二个字母(I/N/F/P)。例如 E-I 维度 score=87 表示强烈倾向 I。

将此 JSON 保存到 _mbti_work/result.json


Step 4: 生成 URL 并打开浏览器

运行编码和打开脚本:

bash "SKILL_DIR/scripts/encode-and-open.sh"

此脚本会:

  1. 读取 _mbti_work/result.json
  2. 对 JSON 进行 UTF-8 安全的 Base64 编码
  3. 使用 URL Hash 方式拼接:https://www.mingxi.tech/#data=<base64>
  4. 输出markdown格式的 URL ,地址是上面的完整 URL (不要截断或省略,否则无法打开),文字是"点击查看",并尝试自动在浏览器中打开

为什么用 #data= 而不是 ?data= Hash 部分不会发送到服务器,避免了服务器端 URI 长度限制(414 Request-URI Too Long)。浏览器端 JavaScript 直接读取 location.hash 进行解析。


Step 5: 展示结果给用户

在终端中向用户展示关键结果摘要:

🧠 MBTI 分析完成!

场景类型:[scenarioType]
⚠️ 工具人格警告:[toolPersonaWarning]

类型:INTJ(架构师)
置信度:high

四维度得分:
  E-I: 87 → I(内倾)
  S-N: 85 → N(直觉)
  T-F: 22 → T(思考)
  J-P: 25 → J(判断)

人格素描:
  [portrait 内容]

🔗 查看完整画像:[URL]
📄 结果已保存到:_mbti_work/result.json

注意事项

  • 隐私保护:分析结果 JSON 是脱敏的——不包含用户的真实姓名、项目名称、公司名称等隐私信息。quote 字段只截取关键部分,不超过 50 字,且不包含可识别上下文。
  • LLM 后端:分析由你当前的 Agent(OpenClaw)调用其配置的 LLM 执行。这与你日常使用 OpenClaw 对话的隐私模型一致,没有引入额外的数据发送路径。
  • 可视化网页https://www.mingxi.tech/ 是纯静态单文件 HTML,无后端、无数据库、无登录。数据通过 URL Hash 传递,Hash 内容不会被浏览器发送到服务器(HTTP 协议规范 RFC 3986 §3.5)。本 skill 的所有脚本源码完全开放可审查。
  • 语言:根据用户聊天的主要语言输出(中文用户输出中文,英文用户输出英文)
  • 最少数据:如果聊天记录少于 10 条用户消息,告知用户数据不足,置信度标记为 low
  • 防偏见:必须遵守核心防偏见护栏,避免近因效应、工具偏差等认知陷阱影响分析结果

Comments

Loading comments...