agentleFS
Ethan9123Ethan9123/wx-life-analysis/CLAUDE.md

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…

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
  1. Very specific:

    Don't commit any file under people/<name>/, projects/<name>/, topics/<name>/ (except _template/).

    line 23
  2. Very specific:

    Don't add example data using real-looking names.

    line 24
  3. Distinctive:

    Don't add network calls (no telemetry, no cloud sync).

    line 25
  4. Very specific:

    Don't fork or reimplement wx-cli.

    line 26
  5. Distinctive:

    Read this file (you're doing it).

    line 34
  6. Very specific:

    Read the user's local CLAUDE.local.md if it exists — that's their private context (real names, family, work projects).

    line 35
  7. Very specific:

    Run tools/status.ps1 to see what's stale and where the ball is.

    line 36
  8. Very specific:

    Read the most relevant people/<name>/profile.md or projects/<name>/notes.md for the current task.

    line 38
  9. Distinctive:

    Ask the user what they want to push forward.

    line 39
  10. Very specific:

    Run tools/refresh.ps1 -Name "<wechat-name>" -Dir "people/<dir>" to pull latest chat.md + sns.json.

    line 43
  11. Very specific:

    Read chat.md chronologically (most recent first if time-constrained), then read sns.json separately.

    line 44
  12. Very specific:

    update ball-in-court (me / them)

    line 47
  13. Distinctive:

    add any new events to the timeline section

    line 49
  14. Distinctive:

    Always include a confidence level.

    line 54
  15. Very specific:

    Update profile.md body "当前状态" section with this block.

    line 61
  16. Distinctive:

    If the situation changed materially (new relationship phase, conflict, breakthrough), tell the user explicitly.

    line 62
  17. Very specific:

    Use tools/extract-pdf.js for text extraction.

    line 70
  18. Very specific:

    Write projects/<name>/notes.md with task breakdown by priority (P0/P1/P2/P3).

    line 73
  19. Very specific:

    Add judgment: Don't just summarize what's in chat.md — say what it means and what to do about it.

    line 83
  20. Distinctive:

    Avoid "echo replies": Don't restate the user's input with adjectives ("好充实啊", "好热闹啊").

    line 84
  21. Very specific:

    Never paste chat.md excerpts into any other context (other chats, web searches, issue trackers).

    line 88
  22. Distinctive:

    Never include real names in code, commits, or PRs even when working locally — use placeholders if asked to publish anything.

    line 89
  23. Distinctive:

    If the user asks you to commit something with real data, refuse and explain why.

    line 90
  24. Distinctive:

    If you spot data leaking into a commit (e.g.

    line 91
  25. Very specific:

    If wx.exe isn't installed: tell the user, link to https://github.com/jackwener/wx-cli.

    line 144
  26. Very specific:

    If the daemon is acting up: wx daemon stop then re-run.

    line 145
  27. Distinctive:

    If PowerShell shows Chinese as garbled: re-run the encoding line above.

    line 146
  28. Very specific:

    If wx export output looks like a RemoteException: that's PowerShell mis-tagging stdout.

    line 147

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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" in AGENTS.md. Document it in README.md.
  • Improve a template: edit people/_template/profile.md or projects/_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

  1. Read this file (you're doing it).
  2. Read the user's local CLAUDE.local.md if it exists — that's their private context (real names, family, work projects). It's gitignored.
  3. Run tools/status.ps1 to see what's stale and where the ball is.
  4. Optional: run tools/digest.ps1 for a quick unread incremental snapshot since last session.
  5. Read the most relevant people/<name>/profile.md or projects/<name>/notes.md for the current task.
  6. Ask the user what they want to push forward.

Workflow for analyzing a person

  1. Run tools/refresh.ps1 -Name "<wechat-name>" -Dir "people/<dir>" to pull latest chat.md + sns.json.
  2. Read chat.md chronologically (most recent first if time-constrained), then read sns.json separately. Both feed the MBTI inference; both feed the comms-strategy translation. Don't skip the SNS pass — about 30% of useful signal lives there.
  3. 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
  4. 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.md body, 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.
  5. 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.md body "当前状态" section with this block.
  6. If the situation changed materially (new relationship phase, conflict, breakthrough), tell the user explicitly. Don't bury it.

Workflow for a project

  1. Source materials (PDFs, docs) go in projects/<name>/ (gitignored). 1.5 If a stakeholder is sending project files via WeChat, run tools/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.
  2. Use tools/extract-pdf.js for text extraction. 2.5 If work mainly happens in a group chat, run tools/refresh-group.ps1 -Name "研发群" -Slug "rd-group" first to populate topics/<slug>/chat.json + members.json. 2.6 Run tools/task-extract.ps1 -Person "<task-giver-slug>" -Project "<project-slug>" for first-pass candidate filtering before full read.
  3. Write projects/<name>/notes.md with task breakdown by priority (P0/P1/P2/P3).
  4. Optionally generate a task-plan.html dashboard for visual scanning.
  5. 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

  1. Never paste chat.md excerpts into any other context (other chats, web searches, issue trackers).
  2. Never include real names in code, commits, or PRs even when working locally — use placeholders if asked to publish anything.
  3. If the user asks you to commit something with real data, refuse and explain why. Suggest a sanitized alternative.
  4. 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-messages

When something feels wrong

  • If wx.exe isn't installed: tell the user, link to https://github.com/jackwener/wx-cli.
  • If the daemon is acting up: wx daemon stop then re-run.
  • If PowerShell shows Chinese as garbled: re-run the encoding line above.
  • If wx export output looks like a RemoteException: that's PowerShell mis-tagging stdout. The data is fine. Check $LASTEXITCODE.

Where to look first

QuestionFile
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:

SkillTriggers onMethodology
.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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.