📦 MbtiClaudeInfer — MBTI人格推测

v1.1.0

读取本地多个AI工具(Claude Code、Codex、Gemini等)的历史对话文件,通过分析提示词语言特征,自动推断用户MBTI人格类型,支持中英双语关键词识别。

0· 15·0 当前·0 累计
下载技能包
最后更新
2026/4/19
0
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
可疑
medium confidence
该技能行为(读取大量本地AI提示/历史文件)与其声明用途相符,但未声明所需配置路径,会访问可能敏感的本地对话——安装前请审查。
评估建议
此技能将遍历主目录下的多个本地AI历史文件以推断MBTI。安装前,(1) 在GitHub仓库查看SKILL.md/README,确认无数据上传或外部调用,(2) 检查实际读取文件(~/.claude、~/.codex、~/.gemini、~/.local/state/opencode、~/.openclaw)是否含敏感内容,(3) 优先离线或在隔离账户/容器运行,(4) 要求作者声明所需配置路径并添加本地脱敏/清洗逻辑。若不愿暴露本地对话历史,请勿安装或运行。...
详细分析 ▾
用途与能力
名称/描述(从提示历史推断MBTI)与代码/指令中提取多AI工具本地提示历史的能力一致。提取这些文件对该用途合理,但注册元数据未声明所需配置路径,而运行时指令明确读取多个主目录历史文件——存在不一致需关注。
指令范围
SKILL.md指示代理读取Claude Code、Codex、Gemini、OpenCode、OpenClaw的提示/历史文件(用户主目录下路径)。这些操作在分析提示范围内,但涉及读取可能敏感的用户对话并可能包含机密。指令未含明确防护措施(如脱敏、仅限本地)。
安装机制
技能仅为指令,无注册安装规范(安装风险最低)。README建议通过GitHub或curl/npx获取代码,但属于使用说明而非自动安装步骤。
凭证需求
注册表未列出所需配置路径或凭证,但SKILL.md与README依赖读取多个主目录文件(~/.claude、~/.codex、~/.gemini、~/.local/state/opencode、~/.openclaw)。该不匹配属不一致:技能需访问多工具历史但未声明。访问这些文件可能暴露敏感用户数据;技能未请求或记录最小权限约束。
持久化与权限
always:false且未请求特殊权限,符合预期。但允许自主调用(平台默认);结合读取多本地历史能力,若未经审查启用/允许,潜在影响范围增大。
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

版本

latestv1.1.02026/4/19

版本1.1.0引入增强MBTI分析逻辑: - 改进E/I、S/N维度检测,支持中英提示关键词,提升人格推断准确性。 - 降低提示细节与长度阈值,适配不同沟通风格。 - 扩展并加权信息处理关键词列表,更好区分抽象与具象思维。 - 新增提示问题频率与结构分析,实现更细致的沟通分析。

可疑

安装命令

点击复制
官方npx clawhub@latest install mbticlaude
镜像加速npx clawhub@latest install mbticlaude --registry https://cn.longxiaskill.com

技能文档

# MBTIClaude 通过分析用户在多个 AI 工具(Claude Code、Codex、Gemini、OpenCode、OpenClaw)中的提示词来推测 MBTI 性格类型。 ## 功能 - 自动提取五种 AI 工具的用户提示词历史 - 分析沟通风格、信息处理方式、决策模式和生活方式 - 基于行为模式推测 MBTI 类型 - 提供详细的特征分析和建议 ## 使用方法 ``bash /mbticlaude ` ## 分析维度 ### 1. 沟通风格 (E vs I) - 提示词长度和详细程度 - 社交性表达 vs 任务导向 - 背景说明的丰富程度 ### 2. 信息处理 (S vs N) - 关注具体细节 vs 抽象概念 - 实现导向 vs 概念导向 - 创造性思维的体现 ### 3. 决策方式 (T vs F) - 逻辑性 vs 情感性 - 任务导向 vs 人际关系考虑 - 技术语言 vs 情感表达 ### 4. 生活方式 (J vs P) - 计划性 vs 灵活性 - 结构化 vs 探索性 - 快速迭代 vs 系统规划 ## 数据来源 - Claude Code: ~/.claude/history.jsonl - Codex: ~/.codex/history.jsonl - Gemini: ~/.gemini/tmp//chats/.json - OpenCode: ~/.local/state/opencode/prompt-history.jsonl - OpenClaw: ~/.openclaw/agents//sessions/.jsonl ## 重要提醒 ⚠️ 重要提醒: 1. 样本基于工作场景,可能不反映真实性格 2. MBTI 本身科学性存疑,仅供参考 3. 这是基于行为模式的推测,非专业心理测评 4. 需要足够的历史数据才能得出较准确的结论 ## 实现 `python #!/usr/bin/env python3 import json import os from pathlib import Path from collections import Counter def extract_claude_code_prompts(limit=100): """提取 Claude Code 用户提示词""" history_file = Path.home() / ".claude" / "history.jsonl" prompts = [] if history_file.exists(): with open(history_file, 'r') as f: for line in f: try: data = json.loads(line) if data.get('display'): prompts.append(data['display']) except: continue return prompts[-limit:] if prompts else [] def extract_codex_prompts(limit=100): """提取 Codex 用户提示词""" history_file = Path.home() / ".codex" / "history.jsonl" prompts = [] if history_file.exists(): with open(history_file, 'r') as f: for line in f: try: data = json.loads(line) if data.get('text'): prompts.append(data['text']) except: continue return prompts[-limit:] if prompts else [] def extract_gemini_prompts(limit=100): """提取 Gemini 用户提示词""" gemini_dir = Path.home() / ".gemini" / "tmp" prompts = [] if gemini_dir.exists(): for session_file in gemini_dir.rglob("session-.json"): try: with open(session_file, 'r') as f: data = json.load(f) messages = data.get('messages', []) for msg in messages: if msg.get('role') == 'user': content = msg.get('content', '') if content: prompts.append(content) except: continue return prompts[-limit:] if prompts else [] def extract_opencode_prompts(limit=100): """提取 OpenCode 用户提示词""" history_file = Path.home() / ".local" / "state" / "opencode" / "prompt-history.jsonl" prompts = [] if history_file.exists(): with open(history_file, 'r') as f: for line in f: try: data = json.loads(line) if data.get('input'): prompts.append(data['input']) except: continue return prompts[-limit:] if prompts else [] def extract_openclaw_prompts(limit=100): """提取 OpenClaw 用户提示词""" agents_dir = Path.home() / ".openclaw" / "agents" prompts = [] if agents_dir.exists(): for session_file in agents_dir.rglob(".jsonl"): try: with open(session_file, 'r') as f: for line in f: try: data = json.loads(line) if data.get('type') == 'message' and data.get('message', {}).get('role') == 'user': content = data['message'].get('content', []) for item in content: if item.get('type') == 'text': text = item.get('text', '') # 过滤系统消息 if not any(x in text for x in ['Sender (untrusted', 'Conversation info', 'Health check', 'Queued', 'Continue where', 'subagent task', 'Pre-compaction']): prompts.append(text) except: continue except: continue return prompts[-limit:] if prompts else [] def analyze_communication_style(prompts): """分析沟通风格 (E vs I) - 优化版""" if not prompts: return "I" avg_length = sum(len(p) for p in prompts) / len(prompts) short_prompts = sum(1 for p in prompts if len(p) < 15) # 降低阈值从20到15 short_ratio = short_prompts / len(prompts) # 计算详细度得分 detailed_prompts = sum(1 for p in prompts if len(p) > 100) detailed_ratio = detailed_prompts / len(prompts) # 检查是否有问号(提问倾向) question_count = sum(1 for p in prompts if '?' in p or '?' in p or 'how' in p.lower() or 'why' in p.lower() or '如何' in p or '为什么' in p) question_ratio = question_count / len(prompts) # 综合判断:提高 E 型出现概率 e_score = 0 if avg_length > 40: # 降低阈值从50到40 e_score += 1 if short_ratio < 0.4: # 提高阈值从0.3到0.4 e_score += 1 if detailed_ratio > 0.15: # 有15%以上的详细提示词 e_score += 1 if question_ratio > 0.2: # 有20%以上的提问 e_score += 1 return "E" if e_score >= 2 else "I" def analyze_information_processing(prompts): """分析信息处理 (S vs N) - 优化版,支持英文""" if not prompts: return "S" # 扩展关键词,增加英文支持和权重 abstract_keywords = { # 中文(权重2) '概念': 2, '系统': 2, '架构': 3, '方案': 2, '思路': 2, '抽象': 3, '模式': 2, '框架': 2, '理念': 2, '愿景': 2, '战略': 2, # 英文(权重2) 'concept': 2, 'system': 2, 'architecture': 3, 'solution': 2, 'approach': 2, 'pattern': 2, 'framework': 2, 'strategy': 2, 'vision': 2, 'abstract': 3 } concrete_keywords = { # 中文(权重1) '具体': 1, '实现': 1, '细节': 1, '步骤': 1, '操作': 1, '按钮': 1, '颜色': 1, '间距': 1, '像素': 1, '字体': 1, # 英文(权重1) 'specific': 1, 'implement': 1, 'detail': 1, 'step': 1, 'operation': 1, 'button': 1, 'color': 1, 'spacing': 1, 'pixel': 1, 'font': 1 } abstract_score = sum(weight for p in prompts for kw, weight in abstract_keywords.items() if kw in p.lower()) concrete_score = sum(weight for p in prompts for kw, weight in concrete_keywords.items() if kw in p.lower()) # 降低 N 型判定门槛 return "N" if abstract_score > concrete_score 0.8 else "S" def analyze_decision_making(prompts): """分析决策方式 (T vs F) - 优化版,支持英文""" if not prompts: return "T" # 扩展关键词,增加英文支持 logical_keywords = [ # 中文 '优化', '效率', '性能', '统计', '分析', '测试', '修复', '实现', '算法', '数据', '指标', '评估', '验证', '检查', '对比', # 英文 'optimize', 'efficiency', 'performance', 'statistics', 'analyze', 'test', 'fix', 'implement', 'algorithm', 'data', 'metric', 'evaluate', 'verify', 'check', 'compare' ] emotional_keywords = [ # 中文 '感觉', '喜欢', '希望', '想要', '谢谢', '辛苦', '帮忙', '麻烦', '期待', '担心', '开心', '满意', '友好', '舒服', '美观', # 英文 'feel', 'like', 'hope', 'want', 'thanks', 'thank', 'please', 'appreciate', 'expect', 'worry', 'happy', 'satisfied', 'friendly', 'comfortable', 'beautiful' ] logical_count = sum(1 for p in prompts for kw in logical_keywords if kw in p.lower()) emotional_count = sum(1 for p in prompts for kw in emotional_keywords if kw in p.lower()) # 降低 T 型判定门槛,让 F 型更容易出现 return "T" if logical_count > emotional_count 1.5 else "F" def analyze_lifestyle(prompts): """分析生活方式 (J vs P) - 优化版,支持英文""" if not prompts: return "P" # 扩展关键词,增加英文支持 planning_keywords = [ # 中文 '计划', '方案', '设计', 'PRD', '文档', '规划', '安排', '流程', '步骤', '阶段', '里程碑', '时间表', 'roadmap', # 英文 'plan', 'design', 'schedule', 'organize', 'structure', 'process', 'procedure', 'milestone', 'timeline', 'roadmap', 'workflow' ] flexible_keywords = [ # 中文 '试试', '测试', '优化', '调整', '改', '换', '尝试', '探索', '实验', '迭代', '看看', '试一下', '改进', # 英文 'try', 'test', 'experiment', 'adjust', 'change', 'modify', 'explore', 'iterate', 'adapt', 'improve', 'refine', 'tweak' ] planning_count = sum(1 for p in prompts for kw in planning_keywords if kw in p.lower()) flexible_count = sum(1 for p in prompts for kw in flexible_keywords if kw in p.lower()) # 保持原有逻辑 return "P" if flexible_count > planning_count else "J" def analyze_mbti(): """主函数:分析 MBTI""" print("🔍 正在提取用户提示词...") # 提取所有工具的提示词 claude_prompts = extract_claude_code_prompts() codex_prompts = extract_codex_prompts() gemini_prompts = extract_gemini_prompts() opencode_prompts = extract_opencode_prompts() openclaw_prompts = extract_openclaw_prompts() # 统计 print(f"\n📊 数据统计:") print(f" Claude Code: {len(claude_prompts)} 条") print(f" Codex: {len(codex_prompts)} 条") print(f" Gemini: {len(gemini_prompts)} 条") print(f" OpenCode: {len(opencode_prompts)} 条") print(f" OpenClaw: {len(openclaw_prompts)} 条") all_prompts = claude_prompts + codex_prompts + gemini_prompts + opencode_prompts + openclaw_prompts total = len(all_prompts) print(f" 总计: {total} 条\n") if total < 10: print("⚠️ 数据量太少,无法进行准确分析") return # 分析四个维度 print("🧠 正在分析 MBTI 维度...\n") e_or_i = analyze_communication_style(all_prompts) s_or_n = analyze_information_processing(all_prompts) t_or_f = analyze_decision_making(all_prompts) j_or_p = analyze_lifestyle(all_prompts) mbti_type = f"{e_or_i}{s_or_n}{t_or_f}{j_or_p}" # 输出结果 print("=" 50) print(f"🎯 你的 MBTI 类型:{mbti_type}") print("=" 50) mbti_names = { "INTJ": "建筑师", "INTP": "逻辑学家", "ENTJ": "指挥官", "ENTP": "辩论家", "INFJ": "提倡者", "INFP": "调停者", "ENFJ": "主人公", "ENFP": "竞选者", "ISTJ": "物流师", "ISFJ": "守卫者", "ESTJ": "总经理", "ESFJ": "执政官", "ISTP": "鉴赏家", "ISFP": "探险家", "ESTP": "企业家", "ESFP": "表演者" } print(f"\n类型名称:{mbti_names.get(mbti_type, '未知')}\n") print("📋 维度分析:") print(f" {e_or_i} - {'内向' if e_or_i == 'I' else '外向'}:简洁高效沟通" if e_or_i == 'I' else f" {e_or_i} - 外向:详细表达") print(f" {s_or_n} - {'直觉' if s_or_n == 'N' else '感觉'}:{'抽象思维,系统化方案' if s_or_n == 'N' else '关注具体细节'}") print(f" {t_or_f} - {'思考' if t_or_f == 'T' else '情感'}:{'纯理性,关注效率' if t_or_f == 'T' else '考虑情感因素'}") print(f" {j_or_p} - {'判断' if j_or_p == 'J' else '知觉'}:{'计划性强' if j_or_p == 'J' else '灵活探索,快速迭代'}") print("\n⚠️ 重要提醒:") print(" 1. 基于工作场景的行为推测,可能不反映真实性格") print(" 2. MBTI 本身科学性存疑,仅供参考") print(" 3. 这是基于行为模式的推测,非专业心理测评") if __name__ == "__main__": analyze_mbti() ` ## 示例输出 ` 🔍 正在提取用户提示词... 📊 数据统计: Claude Code: 100 条 Codex: 100 条 Gemini: 62 条 OpenCode: 2 条 OpenClaw: 100 条 总计: 364 条 🧠 正在分析 MBTI 维度... ================================================== 🎯 你的 MBTI 类型:INTP ================================================== 类型名称:逻辑学家 📋 维度分析: I - 内向:简洁高效沟通 N - 直觉:抽象思维,系统化方案 T - 思考:纯理性,关注效率 P - 知觉:灵活探索,快速迭代 ⚠️ 重要提醒: 1. 基于工作场景的行为推测,可能不反映真实性格 2. MBTI 本身科学性存疑,仅供参考 3. 这是基于行为模式的推测,非专业心理测评 `` ## 许可证 MIT

数据来源ClawHub ↗ · 中文优化:龙虾技能库