| name | mbti-expert |
| description | Detect a person's MBTI type from chat logs, behavioral descriptions, and communication patterns using cognitive function analysis. |
| user-invocable | true |
| argument-hint | [chat logs, behavioral description, or 'self' for interactive typing] |
MBTI Detect
Purpose
Use this skill to analyze a person's communication patterns and determine their likely MBTI type. The target is not a superficial label assignment. The target is a function-backed typing that traces observed behavior to cognitive function preferences.
This skill is built from:
- MBTI quadrants as macro temperament filter
- eight cognitive functions as the behavior detection engine
- function axes as paired evidence channels
- typing rules that map observed behavior to the correct letter and stack
When to Use
Use this skill when the user wants to:
- determine someone's MBTI type from chat logs or message history
- analyze a person's communication style and reasoning pattern
- compare behavioral evidence against MBTI function stacks
- get a confidence-scored typing result with supporting evidence
- type themselves through interactive questions
- generate a standalone persona skill that simulates the detected person's thinking and communication patterns
Do not use this skill as a clinical or scientific assessment tool. Do not claim certainty when the evidence is thin. If the input is too short or too generic, say so and ask for more material.
Input Types
The skill accepts:
- Chat logs: pasted conversation transcripts (any format — WeChat, iMessage, plain text)
- Behavioral descriptions: the user's observation of how the person thinks, decides, and communicates
- Mixed input: any combination of the above
- Interactive mode: the user answers questions to type themselves or someone they know well
When chat logs are provided, prefer direct behavioral evidence from the logs over the user's subjective interpretation.
Routing
The detection pipeline runs in stages. Each stage has a dedicated prompt file that defines its behavior in detail.
Stage 1: Intake
Read: ${SKILL_DIR}/prompts/intake.md
- Classify the input mode (chat-only / description-only / mixed / interactive)
- Identify the target person
- Run the sufficiency gate: is there enough material to attempt typing?
- If insufficient: explain what is missing and offer alternatives (more input, interactive mode)
- Detect the user's language
Stage 2: Load Foundations
Read all foundation files before analysis:
${SKILL_DIR}/references/foundations/quadrants.md
${SKILL_DIR}/references/foundations/cognitive-functions.md
${SKILL_DIR}/references/foundations/function-axes.md
${SKILL_DIR}/references/foundations/typing-rules.md
${SKILL_DIR}/references/foundations/detection-indicators.md
These define the theoretical framework for all subsequent analysis.
Stage 3: Evidence Extraction
Read: ${SKILL_DIR}/prompts/evidence_extractor.md
- Scan the input material for behavioral signals across all extraction dimensions
- Build an evidence ledger — each observation tagged with dimension, function, polarity, and strength
- Do NOT jump to a type. The evidence ledger is the sole basis for typing.
- Summarize: total entries, strong/moderate/weak signal counts, conflicts, uncovered dimensions
Stage 4: Type Scoring
Read: ${SKILL_DIR}/prompts/type_scorer.md
- Score each dimension (E/I, S/N, T/F, J/P) independently from the evidence ledger
- Assign confidence levels (High / Medium / Low / Undetermined)
- Derive the cognitive function stack from the dimension results
- Validate the stack against the evidence
- Rank the top 3-4 plausible types with evidence fit scores
- Handle contradictions honestly
Stage 5: Adaptive Probing (automatic when uncertain)
Read: ${SKILL_DIR}/prompts/probe_selector.md
This stage is automatically triggered when any dimension scores below 60% (Low or Undetermined). It is not optional — the skill must attempt to resolve uncertainty before producing the final report.
- Identify all dimensions with Low (50%–59%) or Undetermined (50%) confidence
- Select 1–2 behavioral probes per ambiguous dimension from
${SKILL_DIR}/references/data/behavioral_probes.json (15 scenario-based questions covering all 4 dimensions)
- Present probes conversationally — never as a formal test
- Add user responses as new evidence entries, re-run type scoring
- If still ambiguous, round 2: different probes or question bank items from
${SKILL_DIR}/references/data/pdf_40_bilingual.json or ${SKILL_DIR}/references/data/oejts32.json
- Round 3 (maximum): direct questions, then report remaining ambiguity as Undetermined
- Stop early if all dimensions reach 60%+ or user wants to stop
Maximum 3 rounds. The skill should feel like a natural conversation, not a questionnaire.
For interactive mode (typing self or someone well-known): probing IS the primary workflow — start with probes, score after each round, focus on weak dimensions.
Stage 6: Report
Read: ${SKILL_DIR}/prompts/report_builder.md
Assemble the final detection report with all 6 required sections:
- Detected Type — best-fit MBTI type (with tentative flag if uncertain)
- Dimension Percentages — percentage score for each dimension (e.g., 65% E, 80% S, 70% T, 90% J)
- Evidence Summary — specific behavioral observations supporting each dimension
- Function Stack Analysis — dominant, auxiliary, tertiary, inferior with evidence
- Alternative Types — plausible alternatives and why they were ruled out
- Uncertainty Note — what additional information would strengthen the typing
Stage 7: Persona Generation (optional)
Read: ${SKILL_DIR}/prompts/persona_generator.md
This stage is optional and only runs when the user explicitly requests it after Stage 6. It converts the detection results + behavioral evidence into a standalone persona skill that simulates the detected person.
Trigger phrases:
- Chinese: "创建虚拟人", "生成人物", "做成 skill", "生成 persona", "创建角色"
- English: "create persona", "generate persona", "make a skill", "turn this into a persona"
Prerequisites (must be met before generating):
- At least 3 dimensions with 60%+ confidence
- At least 5 evidence entries in the ledger
- Enough language samples for dialogue examples
Generation flow:
- Check prerequisites — if not met, explain what additional input is needed
- Collect: persona name + desired install path (~/.claude/skills/, ~/.codex/skills/, custom)
- Generate a standalone persona SKILL.md using a 5-layer structure:
- Layer 0: Core rules (strongest evidence → concrete behavioral rules, never violate)
- Layer 1: Identity (name, MBTI, function stack, dimension percentages)
- Layer 2: Expression style (writing rhythm, catchphrases, emoji, dialogue examples from real evidence)
- Layer 3: Emotional logic (cognitive priorities, conflict handling, stress patterns)
- Layer 4: State layer (baseline → strain → grip → recovery, complex-scenario priorities)
- Layer 5: Boundaries & triggers
- Write the skill to the user-chosen path
- Confirm installation and provide usage instructions
Every layer must cite evidence. Weak evidence is annotated honestly. No fabricated quotes or biography.
Source Material Import
When the user has files to provide (not just pasted text), present the following options:
原材料怎么提供?
[A] 聊天记录 / Chat Logs
微信导出(txt/html)、iMessage、短信、纯文本
[B] 社交媒体 / Social Media
微博/小红书/Instagram 导出的 JSON 或文本
[C] 照片 / Photos
指定文件夹,自动提取 EXIF 时间线
[D] 上传文件 / Upload Files
PDF、图片截图、任意文本文件
[E] 直接粘贴 / Paste Text
把文字直接复制进来
[F] 互动模式 / Interactive
回答问题来测定 MBTI
可以混用,也可以跳过(仅凭描述和互动模式分析)。
方式 A:聊天记录 / Chat Logs
All formats auto-detected, no --format flag needed.
WeChat exports:
python3 ${SKILL_DIR}/tools/chat_parser.py --file {path} --target "{name}" --output /tmp/parsed_chat.txt
Then Read /tmp/parsed_chat.txt
Supports: WechatExporter txt/html, CSV, other WeChat backup tools.
iMessage:
python3 ${SKILL_DIR}/tools/chat_parser.py --file {path} --target "{name}" --output /tmp/parsed_chat.txt
python3 ${SKILL_DIR}/tools/chat_parser.py --direct --target "{name}" --output /tmp/parsed_chat.txt
SMS:
python3 ${SKILL_DIR}/tools/chat_parser.py --file {path} --target "{name}" --output /tmp/parsed_chat.txt
Plain text:
python3 ${SKILL_DIR}/tools/chat_parser.py --file {path} --target "{name}" --output /tmp/parsed_chat.txt
The parser preserves: full message sequence, both parties, response gaps, burst patterns, topic shifts, and raw content for quoting.
方式 B:社交媒体 / Social Media
Platform auto-detected from file content. Override with --platform if needed.
python3 ${SKILL_DIR}/tools/social_media_parser.py \
--file {path} \
--platform {auto|weibo|xiaohongshu|instagram|text} \
--target "{name}" \
--output /tmp/social_out.txt
Then Read /tmp/social_out.txt
Output includes: raw posts, char counts, emoji counts, topic keywords, engagement metrics, and a style summary (avg length, posting frequency, emoji usage rate, topic distribution).
方式 C:照片 / Photos
python3 ${SKILL_DIR}/tools/photo_analyzer.py --dir {photo_directory} --output /tmp/photo_timeline.txt
Then Read /tmp/photo_timeline.txt
Extracts EXIF metadata timeline. Specific photo content viewed via Read tool directly (Claude supports images natively).
Photos provide supplementary evidence: travel choices (Se/Si), aesthetic patterns (Fi/Ne), routine indicators (Si).
方式 D:上传文件 / Upload Files
- PDF / Images:
Read tool directly (native support)
- Markdown / TXT:
Read tool directly
方式 E:直接粘贴 / Paste Text
User-pasted content is used directly as text material. No tools needed.
方式 F:互动模式 / Interactive
Skip file import entirely. The skill asks targeted questions from the question banks and behavioral probes. See Stage 5 (Adaptive Probing) in the routing section.
If the user says "没有文件" / "跳过" / "no files", proceed with description-only or switch to interactive mode.
Multi-Source Evidence Merging
When the user provides materials through multiple channels, merge them into a single evidence pool:
- Parse each source independently using the appropriate tool above
- Feed all parsed output into a single evidence ledger — do not analyze each source separately
- Weight by evidence reliability:
- Direct chat messages (highest) — observable behavior in real-time interaction
- Social media posts (high) — self-expression in natural context
- User descriptions (medium) — filtered through the observer's interpretation
- Photo metadata (supplementary only) — indirect, never sufficient on its own
- When sources conflict: prefer direct behavioral evidence (chat/social) over user interpretation. Note discrepancies in the evidence ledger.
Language Policy
Follow the user's input language.
- Chinese input: answer in Chinese
- English input: answer in English
- Mixed input: mirror the dominant language unless the user requests otherwise
Platform Compatibility
This skill follows the AgentSkills standard. It uses ${SKILL_DIR} as the skill root variable, which each platform maps to its own skill installation path:
| Platform | ${SKILL_DIR} maps to |
|---|
| Claude Code | ~/.claude/skills/mbti-expert |
| Codex | ~/.codex/skills/mbti-expert |
| OpenClaw | ~/.openclaw/workspace/skills/mbti-expert |
What works everywhere
- All chat parsers (WeChat, iMessage file export, SMS, plain text)
- Social media parser (Weibo, Xiaohongshu, Instagram, text)
- Photo analyzer (JPEG EXIF extraction + mtime fallback; scans all common image formats)
- Full detection pipeline (7 stages)
- Persona generation
- Guided description and interactive mode
Host OS limitations
These depend on the machine running the tools, not on the AI agent platform:
- iMessage
--direct mode (reading chat.db directly): macOS only, requires Full Disk Access permission. On Linux/Windows, or on macOS without Full Disk Access, export iMessage to CSV/TXT and use --file mode instead.
- Photo EXIF extraction: JPEG APP1 segment parsing only. Other formats (HEIC, PNG, WebP) are scanned for file metadata and fall back to file modification time.
Disclaimer
This skill is a persona analysis tool for personal insight and conversation experiments. MBTI typing from communication patterns is inherently approximate. It is not a psychological assessment, not clinically validated, and should not be used for hiring decisions, medical diagnosis, or any high-stakes evaluation.