wx-life-analysis
CLAUDE.md0 starsChanged 6 months agoApache-2.0View on GitHub
Guidance for Claude Code when working in this repository. This is a template repo for analyzing personal WeChat data with @jackwener/wx-cli + Claude. The repository itself contains no user data — only documentation, scripts, and templates. Users clone it and fill in their own data locally; their data is gitignored. If you're being asked about real people, real chat content, or real projects, you are probably in a user's local clone, not this template repo. The user's clone has the…
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- mbti-analysisSkill
- self-mirrorSkill
- subtext-readingSkill
- task-extractSkill
- wx-life-analysisSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
28 rules. About 0 are common, 11 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Don't commit any file under people/<name>/, projects/<name>/, topics/<name>/ (except _template/).
- Very specific: line 24
Don't add example data using real-looking names.
- Distinctive: line 25
Don't add network calls (no telemetry, no cloud sync).
- Very specific: line 26
Don't fork or reimplement wx-cli.
- Distinctive: line 34
Read this file (you're doing it).
- Very specific: line 35
Read the user's local CLAUDE.local.md if it exists — that's their private context (real names, family, work projects).
- Very specific: line 36
Run tools/status.ps1 to see what's stale and where the ball is.
- Very specific: line 38
Read the most relevant people/<name>/profile.md or projects/<name>/notes.md for the current task.
- Distinctive: line 39
Ask the user what they want to push forward.
- Very specific: line 43
Run tools/refresh.ps1 -Name "<wechat-name>" -Dir "people/<dir>" to pull latest chat.md + sns.json.
- Very specific: line 44
Read chat.md chronologically (most recent first if time-constrained), then read sns.json separately.
- Very specific: line 47
update ball-in-court (me / them)
- Distinctive: line 49
add any new events to the timeline section
- Distinctive: line 54
Always include a confidence level.
- Very specific: line 61
Update profile.md body "当前状态" section with this block.
- Distinctive: line 62
If the situation changed materially (new relationship phase, conflict, breakthrough), tell the user explicitly.
- Very specific: line 70
Use tools/extract-pdf.js for text extraction.
- Very specific: line 73
Write projects/<name>/notes.md with task breakdown by priority (P0/P1/P2/P3).
- Very specific: line 83
Add judgment: Don't just summarize what's in chat.md — say what it means and what to do about it.
- Distinctive: line 84
Avoid "echo replies": Don't restate the user's input with adjectives ("好充实啊", "好热闹啊").
- Very specific: line 88
Never paste chat.md excerpts into any other context (other chats, web searches, issue trackers).
- Distinctive: line 89
Never include real names in code, commits, or PRs even when working locally — use placeholders if asked to publish anything.
- Distinctive: line 90
If the user asks you to commit something with real data, refuse and explain why.
- Distinctive: line 91
If you spot data leaking into a commit (e.g.
- Very specific: line 144
If wx.exe isn't installed: tell the user, link to https://github.com/jackwener/wx-cli.
- Very specific: line 145
If the daemon is acting up: wx daemon stop then re-run.
- Distinctive: line 146
If PowerShell shows Chinese as garbled: re-run the encoding line above.
- Very specific: line 147
If wx export output looks like a RemoteException: that's PowerShell mis-tagging stdout.
≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Guidance for Claude Code when working in this repository.
Repo identity
This is a template repo for analyzing personal WeChat data with @jackwener/wx-cli + Claude. The repository itself contains no user data — only documentation, scripts, and templates. Users clone it and fill in their own data locally; their data is gitignored.
If you're being asked about real people, real chat content, or real projects, you are probably in a user's local clone, not this template repo. The user's clone has the same structure but with people/<name>/chat.md etc. filled in. Treat those files as private and never echo them outside the local session.
When working in this repo (the template)
Your job is to improve the template — scripts, docs, agent prompts. You will not see any real chat data. If a PR or task description includes real-looking names, push back and ask for placeholders (张三, Acme Corp).
Common tasks
- Add a script to
tools/: see "Coding conventions" inAGENTS.md. Document it inREADME.md. - Improve a template: edit
people/_template/profile.mdorprojects/_template/notes.md. Keep placeholders. - Update the agent contract: edit
AGENTS.md(for Codex/Cursor) or this file (Claude-specific).
What you must not do
- Don't commit any file under
people/<name>/,projects/<name>/,topics/<name>/(except_template/). - Don't add example data using real-looking names. Use
张三/Alice. - Don't add network calls (no telemetry, no cloud sync).
- Don't fork or reimplement
wx-cli. Shell out to it.
When working in a user's local clone
You'll know because people/<name>/chat.md and projects/<name>/notes.md will exist with real content.
Session start checklist
- Read this file (you're doing it).
- Read the user's local
CLAUDE.local.mdif it exists — that's their private context (real names, family, work projects). It's gitignored. - Run
tools/status.ps1to see what's stale and where the ball is. - Optional: run
tools/digest.ps1for a quick unread incremental snapshot since last session. - Read the most relevant
people/<name>/profile.mdorprojects/<name>/notes.mdfor the current task. - Ask the user what they want to push forward.
Workflow for analyzing a person
- Run
tools/refresh.ps1 -Name "<wechat-name>" -Dir "people/<dir>"to pull latestchat.md+sns.json. - Read
chat.mdchronologically (most recent first if time-constrained), then readsns.jsonseparately. Both feed the MBTI inference; both feed the comms-strategy translation. Don't skip the SNS pass — about 30% of useful signal lives there. - Update
people/<dir>/profile.md:- bump
last-updated:to today - update
ball-in-court(me/them) - update
next-action - add any new events to the timeline section
- bump
- MBTI + trip wire pass (see
docs/mbti-analysis.md):- Score each of the four axes using both chat and SNS signals; write to
mbti.type+mbti.basis(basis should cite specific examples from both sources where applicable). - Walk the chat for trip wires (reply-latency spikes, length collapse, hard redirects). Cross-reference with SNS — surface topics they post about heavily but never bring up with you (often safe to ask) and topics absent from SNS but you know they care about (usually hands-off).
- Translate to
comms.frequency/comms.style/comms.do/comms.avoid. - Always include a confidence level. Don't fabricate certainty.
- In
profile.mdbody, maintain a## 朋友圈观察section recording: post frequency, dominant topics, visible gaps (3+ month silent = life event), persona-vs-chat delta, and how they interact with your own SNS.
- Score each of the four axes using both chat and SNS signals; write to
- Subtext pass (see
docs/subtext-reading.md):- Decide one state for this moment: 🔥 hot / 🟢 warm / 🟡 mild cool / 🟠 cooling / 🔴 disengaging / ⚫ gone. Pick one — no hedging.
- Answer "ball-in-court: me / them" explicitly.
- Output the 5-line block format (state / ball / last move / key signal / do now).
- Update
profile.mdbody "当前状态" section with this block.
- If the situation changed materially (new relationship phase, conflict, breakthrough), tell the user explicitly. Don't bury it.
Workflow for a project
- Source materials (PDFs, docs) go in
projects/<name>/(gitignored). 1.5 If a stakeholder is sending project files via WeChat, runtools/attachments.ps1 -Name "<task-giver>" -Kind file -Since "<date>" -ExtractAll -Out "projects/<name>/raw"to bulk-decrypt every file they've sent into the project workspace. - Use
tools/extract-pdf.jsfor text extraction. 2.5 If work mainly happens in a group chat, runtools/refresh-group.ps1 -Name "研发群" -Slug "rd-group"first to populatetopics/<slug>/chat.json+members.json. 2.6 Runtools/task-extract.ps1 -Person "<task-giver-slug>" -Project "<project-slug>"for first-pass candidate filtering before full read. - Write
projects/<name>/notes.mdwith task breakdown by priority (P0/P1/P2/P3). - Optionally generate a
task-plan.htmldashboard for visual scanning. - Track decisions needed from third parties (boss, family, etc.) in a dedicated section.
Communication style
Match the user's preference, which they'll usually state. Sensible defaults:
- Direct, no hedging. Skip "I'll happily" / "Great question".
- Action-oriented. End with "do X next" or a concrete question, not a summary.
- Add judgment. Don't just summarize what's in
chat.md— say what it means and what to do about it. - Avoid "echo replies". Don't restate the user's input with adjectives ("好充实啊", "好热闹啊"). Add observation, question, or pushback.
Privacy hard rules
- Never paste
chat.mdexcerpts into any other context (other chats, web searches, issue trackers). - Never include real names in code, commits, or PRs even when working locally — use placeholders if asked to publish anything.
- If the user asks you to commit something with real data, refuse and explain why. Suggest a sanitized alternative.
- If you spot data leaking into a commit (e.g. real name in a script comment), flag it before pushing.
Useful commands cheatsheet
# Encoding fix (run once per PowerShell session)
$OutputEncoding = [System.Text.Encoding]::UTF8; [Console]::OutputEncoding = [System.Text.Encoding]::UTF8; chcp 65001 | Out-Null
# Find the exact contact display name (fuzzy lookup before refresh)
.\tools\contacts.ps1 -Query "张三"
# Pull one person's data (incremental by default — reads .last-sync, uses wx --since)
.\tools\refresh.ps1 -Name "张三" -Dir "people/zhangsan"
.\tools\refresh.ps1 -Name "张三" -Dir "people/zhangsan" -Full # force full re-pull
# Status overview
.\tools\status.ps1
# Optional digest since last session (incremental unread)
.\tools\digest.ps1
.\tools\digest.ps1 -Write
.\tools\digest.ps1 -Since "2026-05-10"
# (macOS / Linux: ./tools/digest.sh --write --since 2026-05-10)
# Warmth gauge — who's liking/commenting on your own SNS
.\tools\warmth.ps1
.\tools\warmth.ps1 -IncludeRead -N 300
# Attachments (PDFs / images / files) sent in chat
.\tools\attachments.ps1 -Name "张三" -Kind file -Since "2026-05-01"
.\tools\attachments.ps1 -Name "张三" -Kind file -Since "2026-05-01" -ExtractAll -Out "projects/<slug>/raw"
# Voice transcription (silk → wav → whisper; local-only by default)
.\tools\voice-transcribe.ps1 -Person zhangsan -Since "2026-04-01" -Model base
# Self mirror report (your own chat habits)
.\tools\self-mirror.ps1
# Task candidate extraction (first-pass, see docs/task-extract.md)
.\tools\task-extract.ps1 -Person "<task-giver-slug>" -Project "<project-slug>"
# Topic search
wx search "关键词" -n 500 --json | Out-File topics\<slug>\search.json -Encoding utf8
# PDF extract
node tools\extract-pdf.js "path\to\file.pdf" 1 20 > projects\<name>\extract.txt
# Daemon (if data feels stale)
wx daemon stop; wx new-messagesWhen something feels wrong
- If
wx.exeisn't installed: tell the user, link to https://github.com/jackwener/wx-cli. - If the daemon is acting up:
wx daemon stopthen re-run. - If PowerShell shows Chinese as garbled: re-run the encoding line above.
- If
wx exportoutput looks like aRemoteException: that's PowerShell mis-tagging stdout. The data is fine. Check$LASTEXITCODE.
Where to look first
| Question | File |
| How do I install? | README.md § Quick start |
| What's the file layout? | README.md § Directory layout |
| How do I add a tool? | AGENTS.md § How to add a new tool |
| What are the hard rules? | AGENTS.md § Hard rules |
| How do I run an MBTI + trip-wire pass on a person? | docs/mbti-analysis.md |
| How do I read where they are right now in a conversation? | docs/subtext-reading.md |
| How do I turn a boss's chat dump into a structured TODO list? | docs/task-extract.md |
| How do I transcribe voice notes for a voice-heavy contact? | docs/voice-transcription.md |
| What's the user's personal context? | CLAUDE.local.md (gitignored, only in local clones) |
Project-scoped skills (.claude/skills/)
For Claude Code specifically, this repo ships four task-scoped skills that auto-load when their description matches the user's current task:
| Skill | Triggers on | Methodology |
.claude/skills/mbti-analysis/ | "infer MBTI", "what type is X", "comms strategy for Y" | docs/mbti-analysis.md |
.claude/skills/subtext-reading/ | "is she cooling", "what's the subtext", "should I ping again" | docs/subtext-reading.md |
.claude/skills/task-extract/ | "list tasks from boss chat", "what did X ask me to do" | docs/task-extract.md |
.claude/skills/self-mirror/ | "how do I sound on WeChat", "豆包式 frequency" | tools/self-mirror.ps1 output |
These complement (don't replace) this CLAUDE.md, which loads in every session as the always-on context. The per-task SKILL.md files load conditionally to keep context focused.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

