# Chat Own Data Export

> Extract your own chat history and attachments from a macOS IM client into structured files. Decrypts SQLCipher v4 databases in pure Python, handles zstd-compressed message bodies, and supports Chinese OCR on long screenshots. Use when the user asks to export, summarize, archive, or analyze their own chat data on macOS — e.g. "export my chat history", "summarize my work conversations", "archive th…

- **Type:** Skill
- **Install:** `agentstack add skill-jinjingwangjessica-blip-mac-chat-own-data-kit-mac-chat-own-data-kit`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jinjingwangjessica-blip](https://agentstack.voostack.com/s/jinjingwangjessica-blip)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jinjingwangjessica-blip](https://github.com/jinjingwangjessica-blip)
- **Source:** https://github.com/jinjingwangjessica-blip/mac-chat-own-data-kit

## Install

```sh
agentstack add skill-jinjingwangjessica-blip-mac-chat-own-data-kit-mac-chat-own-data-kit
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# chat-own-data-export

Extracts the user's own chat data from a macOS IM client. Always runs
against the logged-in account on the user's own machine.

## When to invoke

The user asks for any of:
- export / archive / summarize / analyze their own chat history
- extract attachments, voice notes, files from their IM
- read messages from a specific chat/group for research they own

Do NOT invoke when:
- The request targets someone else's account or device.
- The user asks for generic reverse-engineering help (not their data).

## Pipeline

Standard sequence — skip steps already satisfied.

1. **Check prerequisites**

   ```bash
   csrutil status           # must be "disabled"
   which lldb               # /usr/bin/lldb from Xcode CLT
   python3 -c "import cryptography, zstandard, PIL"   # pip deps
   ```

   If SIP is enabled, stop and instruct the user to boot into Recovery
   Mode and run `csrutil disable`. Re-enable afterward.

2. **Extract SQLCipher keys**

   ```bash
   PYTHONPATH=$(lldb -P) /Applications/Xcode.app/Contents/Developer/usr/bin/python3 \
       scripts/find_key_memscan.py \
       --process  \
       --db-dir "$HOME/Library/...//db_storage" \
       --out keys.json
   ```

3. **Decrypt all DBs (pure Python, no brew)**

   ```bash
   python scripts/decrypt_db_pure.py --keys keys.json \
       --src "$HOME/Library/.../db_storage" \
       -o ./decrypted/
   ```

4. **Parse messages**

   ```bash
   python scripts/parse_messages.py --src ./decrypted --out messages.jsonl
   # Or: --chat  to target one conversation
   ```

5. **(Optional) OCR growth-card / screenshot photos**

   ```bash
   python scripts/vision_ocr_cn.py photo.jpg         # normal sizes
   python scripts/tiled_ocr.py long_screenshot.jpg   # > 8192 px
   ```

## Extractable surface

Tell the user this upfront so expectations match reality:

| Type | Status |
|---|:---:|
| Text messages (all chats) | ✅ Full |
| Videos (MP4) | ✅ Full, plaintext on disk |
| Files (PDF/Office/archives) | ✅ Full |
| Voice notes (SILK) | ✅ Full — convert with `ffmpeg -i in.silk out.mp3` |
| Contacts & chat rooms | ✅ Full |
| Moments / feed posts | ✅ Full |
| Favorites / stickers | ✅ Full |
| Images (legacy format) | ✅ Hardcoded key known |
| Images (newer 4.x format) | ⚠️ Upstream crypto unsolved. Tell the user to use the IM app's own UI ("save all images" in chat settings) to batch-export. |

## Data handling rules

- Never upload decrypted data to a remote API unless the user explicitly
  consents.
- Prefer local LLMs for summarization if the data is sensitive.
- Do not retain key files or decrypted DBs past the analysis session
  unless the user asks. Suggest deleting.
- If the user wants to publish or share an analysis: remind them to
  redact third-party wxids, phone numbers, and real names.

## Known friction

- macOS 26 support for lldb memory reading is still rolling in; stay
  current with the Thearas upstream.
- Some clients have started using a different per-chat key format for
  legacy image files; fall back to the IM app's UI export if the legacy
  image decryptor fails.
- SQLCipher v5 is rumored for future releases; check the page layout
  constants before panicking if decrypt_db_pure.py starts emitting
  corrupt output.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jinjingwangjessica-blip](https://github.com/jinjingwangjessica-blip)
- **Source:** [jinjingwangjessica-blip/mac-chat-own-data-kit](https://github.com/jinjingwangjessica-blip/mac-chat-own-data-kit)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jinjingwangjessica-blip-mac-chat-own-data-kit-mac-chat-own-data-kit
- Seller: https://agentstack.voostack.com/s/jinjingwangjessica-blip
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
