Yichen Wecom Local Vault
mcncarl/yichen-skills
Read, decrypt, query, search, and export local WeCom/企业微信 5.x desktop databases on macOS into a private read-only vault.
Counts messages per member in a WeChat group on macOS, tags how active each person is, and shows the results in a web dashboard with a JSON API.
$ npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install punk2898/wechat-group-stats wechat-group-stats --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
Claude Code skills documentation · loads skills from .claude/skills/
Install the "wechat-group-stats" agent skill from https://github.com/punk2898/wechat-group-stats/tree/main into .claude/skills/wechat-group-stats/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-group-stats", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install punk2898/wechat-group-stats wechat-group-stats --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "wechat-group-stats" agent skill from https://github.com/punk2898/wechat-group-stats/tree/main into .agents/skills/wechat-group-stats/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-group-stats", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install punk2898/wechat-group-stats wechat-group-stats --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "wechat-group-stats" agent skill from https://github.com/punk2898/wechat-group-stats/tree/main into .cursor/skills/wechat-group-stats/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-group-stats", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install punk2898/wechat-group-stats wechat-group-stats --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "wechat-group-stats" agent skill from https://github.com/punk2898/wechat-group-stats/tree/main into .gemini/skills/wechat-group-stats/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-group-stats", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install punk2898/wechat-group-stats wechat-group-statsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "wechat-group-stats" agent skill from https://github.com/punk2898/wechat-group-stats/tree/main into .github/skills/wechat-group-stats/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-group-stats", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install punk2898/wechat-group-stats wechat-group-stats --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "wechat-group-stats" agent skill from https://github.com/punk2898/wechat-group-stats/tree/main into .opencode/skills/wechat-group-stats/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "wechat-group-stats", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
wechat-group-statsCounts messages per member in a WeChat group on macOS, tags how active each person is, and shows the results in a web dashboard with a JSON API.
The skill guides you through a three-part pipeline: decrypt WeChat's local encrypted SQLite database on macOS, analyze group chat activity, and serve a dark-themed web dashboard. It reports per-member message counts for all time and for the last one, three and six months, assigns activity tags from very active down to inactive, and exposes a JSON API for automation. One use is spotting inactive members to remove.
Prerequisites are macOS, WeChat 4.x and an admin password. The project folder holds wechat-stats.py, dashboard.html and wechat-server.py, while the decryption engine, ylytdeng/wechat-decrypt, is installed separately. Setup checks that WeChat is present, re-signs the WeChat app once so its Hardened Runtime no longer blocks memory access, and runs a key-extraction step with sudo that writes all_keys.json. Both steps need admin rights, and re-signing removes a macOS protection from the WeChat app.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 1987714. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python, JavaScript and Shell, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
python3gitpipFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
WeChat Group Activity Stats loads about 2.8k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 1,139 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
sudo codesign --force --sign - /Applications/WeChat.appsudo ./find_all_keys_macoss "Full Disk Access" for Terminal.** If `sudo codesign` fails with `Operation not permitted / In subcomponent: ...WeChateChat.app ~/Desktop/WeChat_signed.app && sudo codesign --force --sign - ~/Desktop/WeChat_signed.app`, then run the signe- [ ] `sudo ./find_all_keys_macos` produced `all_keys.json` (no `task_for_pid` error)Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from punk2898/wechat-group-stats at commit 1987714, republished under its MIT licence (© punk2898). 1,139 words, ~2,781 tokens.
.claude/skills/wechat-group-stats/SKILL.md (or your agent's skills folder). This skill also uses 163 other files; get the full folder from GitHub.Extracts group chat activity from WeChat's local encrypted SQLite database on macOS. Gives you: per-member message counts (total / 1mo / 3mo / 6mo), activity tags (🔥超活跃 → 💀死号), an interactive dark-themed web dashboard, and a JSON API for automation.
The full pipeline: decrypt → analyze → dashboard. Agent guides the user through each step, handling platform quirks and permissions.
Prerequisites: macOS, WeChat 4.x installed, admin password (sudo).
Tool directory: ~/wechat-group-stats/ (this project — contains wechat-stats.py, dashboard.html, wechat-server.py). The upstream decryption engine (ylytdeng/wechat-decrypt) should be installed separately at ~/wechat-decrypt/.
When the user asks to analyze a WeChat group, guide them through this sequence:
# Verify WeChat is installed
ls /Applications/WeChat.app
# Check if wechat-decrypt is already set up (external dependency)
ls ~/wechat-decrypt/find_all_keys_macos ~/wechat-decrypt/decrypt_db.py
# Check if this project is cloned
ls ~/wechat-group-stats/wechat-stats.pyIf wechat-decrypt isn't set up, clone and install:
git clone https://github.com/ylytdeng/wechat-decrypt.git ~/wechat-decrypt
cd ~/wechat-decrypt
python3 -m venv .venv && source .venv/bin/activate
pip install pycryptodome zstandard pilk tqdm
cc -O2 -o find_all_keys_macos find_all_keys_macos.c -framework FoundationIf wechat-group-stats isn't cloned:
git clone <repo-url> ~/wechat-group-statsWeChat's Hardened Runtime prevents memory access. Re-signing removes it.
Ask the user to quit WeChat first, then run:
killall WeChat
sudo codesign --force --sign - /Applications/WeChat.appIf codesign fails with "Operation not permitted":
cp -R /Applications/WeChat.app ~/Desktop/ && sign the copyVerify: codesign -dv /Applications/WeChat.app 2>&1 | grep flags should show flags=0x2(adhoc).
Then ask user to re-open WeChat and log in.
cd ~/wechat-decrypt
sudo ./find_all_keys_macosOutputs all_keys.json. If it fails with task_for_pid: 5, the re-sign in step 2 didn't work — go back.
Auto-detects the db_storage path and creates config.json:
cd ~/wechat-decrypt && source .venv/bin/activate
python3 decrypt_db.pyDecrypted DBs land in ~/wechat-decrypt/decrypted/.
python3 wechat-stats.py --set-name "群ID" "自定义群名"
# Example:
python3 wechat-stats.py --set-name "45379818937@chatroom" "链上前进四🚀"python3 wechat-stats.py --group "链上前进四" --decrypted-dir ./decryptedOutputs wechat-stats.json. If the group name isn't found, run without --group to list all groups, then pick the right one.
python3 wechat-server.py
# Opens at http://localhost:8080/dashboard.htmlDashboard features: member ranking, sortable columns, activity distribution bars, 🔄 one-click refresh button, search filter, tab to toggle active/inactive members.
Full details in
references/wechat-db-schema.md— includes the criticalreal_sender_id→ wxid mapping chain discovered 2025-06-03, and why ext_buffer should NOT be used for group names.
Useful for custom queries beyond the built-in analysis:
| Table | Location | Key fields |
|---|---|---|
Msg_<md5> | message/message_0.db | real_sender_id, create_time, source, message_content |
SessionTable | session/session.db | username (groups end with @chatroom), summary |
chat_room | contact/contact.db | username, ext_buffer (protobuf: member list — NOT group name) |
chatroom_member | contact/contact.db | room_id, member_id → maps to contact.id |
contact | contact/contact.db | id, username, nick_name, remark, alias |
Mapping chain: Msg_<md5>.real_sender_id → extract wxid from message_content → contact.username → contact.nick_name/remark
Msg table hash: md5(group_username.encode()).hexdigest()
Data path (WeChat 4.x):
~/Library/Containers/com.tencent.xinWeChat/Data/Documents/
xwechat_files/<wxid>/db_storage/{message,contact,session}/*.db| Parameter | Value |
|---|---|
| SQLCipher version | 4 |
| Page size | 4096 |
| Reserve size | 80 (IV 16 + HMAC-SHA512 64) |
| KDF iterations | 256,000 |
| KDF algorithm | PBKDF2-HMAC-SHA512 |
| HMAC | SHA-512 (64 bytes) |
real_sender_id ≠ contact.id. The message table uses an internal sender ID space that does NOT match contact.id or chatroom_member.member_id. Must extract wxid from message_content (e.g. "wxid_xxx:\n内容") and match against contact.username. See references/wechat-db-schema.md for the full mapping chain and extraction code.
Display name priority: remark(备注) > nick_name(昵称) > alias(别名) > username. Using alias > nick will show machine names like "XYiDao" instead of human names like "毅". For example: contact with alias="XYiDao", nick="毅" should display as "毅", not "XYiDao".
WeChat wasn't quit before re-signing. Running binary/dylib files are locked — codesign fails. Always killall WeChat first. Common error: internal error in Code Signing subsystem / In subcomponent: ...libEGL.dylib.
Re-signing needs "Full Disk Access" for Terminal. If sudo codesign fails with Operation not permitted / In subcomponent: ...WeChatAppEx.app, Terminal.app lacks FDA. Go to 系统设置 → 隐私与安全性 → 完全磁盘访问, add Terminal.app, then re-open Terminal and retry.
--deep flag causes nested bundle failures. WeChat.app contains WeChatAppEx.app inside — --deep tries to recursively sign it and fails with Operation not permitted. Use codesign --force --sign - without --deep. Only the main bundle needs signing to unlock task_for_pid. If signing in /Applications still fails even with FDA (some macOS versions block writes there regardless), copy WeChat to Desktop first: cp -R /Applications/WeChat.app ~/Desktop/WeChat_signed.app && sudo codesign --force --sign - ~/Desktop/WeChat_signed.app, then run the signed copy.
Key extraction needs WeChat running and ad-hoc signed. The C scanner (find_all_keys_macos) reads WeChat's process memory via mach_vm — this is blocked by Hardened Runtime (flags=0x10000). Error: task_for_pid failed: 5.
WeChat updates will overwrite the ad-hoc signature. After a WeChat auto-update, you need to re-sign again and re-extract keys. The database encryption key may also change.
Group names not stored locally in WeChat 4.x. The ext_buffer protobuf in chat_room contains member info but the group display name is fetched from the server and may not be in the local DB. Do NOT attempt to extract group names from ext_buffer — the protobuf's first Chinese string is typically a member's nickname (e.g. "秋刀鱼配柠檬"), not the group name. Use --set-name to assign custom names stored in group-names.json. Without a custom name, display as "群聊 (X人)" where X is the member count. The extract_group_name() function in wechat-stats.py is intentionally disabled and returns None.
Analysis script reads already-decrypted DBs. After initial setup, daily refreshes only need step 6 (no sudo, no WeChat restart). Only re-run steps 3-4 if WeChat updated or you suspect key changes.
Dashboard needs HTTP server. Opening dashboard.html directly from filesystem will fail to load wechat-stats.json due to CORS. Always use python3 wechat-server.py or python3 -m http.server 8080. The dedicated server also provides the /api/run endpoint for the one-click refresh button.
WCDB compression in message_content. The WeChat message DB uses WCDB compression. About 30% of rows have WCDB_CT_message_content set to a non-zero value (typically 4), meaning message_content contains compressed binary — not readable text. When extracting wxid from message_content, always filter: AND (WCDB_CT_message_content IS NULL OR WCDB_CT_message_content = 0). Without this filter, LIMIT 1 has a ~30% chance of returning binary garbage, causing the wxid mapping to fail silently and the member's message count to stay at 0 (tagged as 💀死号). This can affect 60+ members in a large group. SQLite's LIKE operator triggers automatic decompression, so WHERE message_content LIKE '%wxid_%' would work too, but WCDB_CT_message_content = 0 is more explicit and avoids false matches.
If publishing a fork with these tools, ensure no private data leaks:
.gitignore must cover: wechat-stats.json (member names + stats), group-names.json (group ID mapping), all_keys.json (encryption keys), config.json (local paths), .venv/, decrypted/, wechat_files/.wechat-server.py uses WECHAT_GROUP_ID env var and --group= CLI arg. dashboard.html derives the group from loaded JSON data. No group IDs in committed source.group-names.example.json with placeholder values like "YOUR_GROUP_ID@chatroom": "你的群名".你的群ID@chatroom in documentation examples.codesign -dv /Applications/WeChat.app shows flags=0x2(adhoc)sudo ./find_all_keys_macos produced all_keys.json (no task_for_pid error)python3 decrypt_db.py succeeded: 17/17 or similar, no failurespython3 wechat-stats.py --group "group_keyword" produced valid JSONhttp://localhost:8080/dashboard.html loads and shows member tableOnce everything is configured, the daily workflow is:
cd ~/wechat-group-stats
python3 wechat-server.py
# → open http://localhost:8080/dashboard.html
# → click 🔄 刷新分析 anytimeNo sudo, no WeChat restart, no key extraction — just one command + one click.
© punk2898, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 163 other files in the repository root of punk2898/wechat-group-stats.
Open the folder on GitHubat commit 1987714
WeChat Group Activity Stats next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| WeChat Group Activity Stats this skillpunk2898/wechat-group-stats | 121 | — | ~2.8k | Automated safety check: Notes | MIT | |
| Yichen Wecom Local Vaultmcncarl/yichen-skills | 4.4k | — | ~1.3k | Automated safety check: Pass | Custom licence | |
| Python Executorcortega26/chile-hub | 113 | 2 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Environment SetupNorman-bury/research-writing-skill | 3.4k | — | ~840 | Automated safety check: Pass | MIT | |
| Raccoon DataanalysisSenseTime-Copilot/raccoon-dataanalysis-skill | 137 | — | ~1.9k | Automated safety check: Pass | None | |
| CSV Data Analysis5zjk5/prompt-engineering | 127 | — | ~2.6k | Automated safety check: Pass | None |
mcncarl/yichen-skills
Read, decrypt, query, search, and export local WeCom/企业微信 5.x desktop databases on macOS into a private read-only vault.
cortega26/chile-hub
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh).
Norman-bury/research-writing-skill
A skill your agent uses when Python environment setup is needed for data visualization or conda installation is required
SenseTime-Copilot/raccoon-dataanalysis-skill
Raccoon (小浣熊) Data Analysis - Remote code interpreter and data visualization service powered by SenseTime.
5zjk5/prompt-engineering
This skill should be used when users need to analyze CSV or Excel files, understand data patterns, generate statistical summaries, or create data visualizations.
napjon/krisk
Convert a completed data-analysis conversation into evidence-backed, reproducible living research through the Krisk MCP server.
Categories
Counts messages per member in a WeChat group on macOS, tags how active each person is, and shows the results in a web dashboard with a JSON API. The skill guides you through a three-part pipeline: decrypt WeChat's local encrypted SQLite database on macOS, analyze group chat activity, and serve a dark-themed web dashboard. It reports per-member message counts for all time and for the last one, three and six months, assigns activity tags from very active down to inactive, and exposes a JSON API for automation.
WeChat Group Activity Stats fits situations like: finding out which members of a WeChat group are active; listing inactive members before cleaning up a group; setting up a recurring activity dashboard for a group; setting up WeChat database decryption for analytics.
Run `npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a claude-code`. Or copy the skill folder (the punk2898/wechat-group-stats repository) into .claude/skills/wechat-group-stats in your project. Claude Code loads it when a task matches its description.
Run `npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a codex`. Or copy the skill folder (the punk2898/wechat-group-stats repository) into .agents/skills/wechat-group-stats in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add punk2898/wechat-group-stats --skill wechat-group-stats -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wechat-group-stats, .gemini/skills/wechat-group-stats, .github/skills/wechat-group-stats and .opencode/skills/wechat-group-stats in your project.
Going by SKILL.md and its folder, WeChat Group Activity Stats needs Python, JavaScript and a shell for the scripts in its folder and the command-line tools its instructions call (python3, git and pip). Our summary lists: macOS with WeChat 4.x installed; Admin (sudo) access; The wechat-decrypt engine, installed separately; Python 3.
SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
WeChat Group Activity Stats is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with WeChat Group Activity Stats: Yichen Wecom Local Vault (mcncarl/yichen-skills, 4.4k stars), Python Executor (cortega26/chile-hub, 113 stars), Environment Setup (Norman-bury/research-writing-skill, 3.4k stars) and Raccoon Dataanalysis (SenseTime-Copilot/raccoon-dataanalysis-skill, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
punk2898 (a GitHub user) maintains it in punk2898/wechat-group-stats, which has 121 GitHub stars. The repository was last updated on June 9, 2026.
Source: punk2898/wechat-group-stats on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.