operations / skill
Message History Reader for iMessage and SMS
Read, search, and export your own local Messages conversations on macOS with explicit export approval.
At a glance
- Purpose
- Read, search, and export your own local Messages conversations on macOS with explicit export approval.
- Runs in
- Local agent with shell
- Operating systems
- macOS
- Needs
- Runtime: Python 3.10+, standard library; Needs internet: No; Needs accounts or API keys beyond your agent: No
- Files and data
- Reads files: Yes; Writes files: Yes; Sends data to other services: No
- Tool type
- Skill
- Delivery
- Download from Skills Outpost
- Version
- 0.1.1
- ZIP SHA-256
- ba0ae4f63d805303db9af0709d85221af19d2d231e441d8c756b9ebbb591bf6a
- Access
- Download from Skills Outpost
- Compatibility
- macOS only. Uses Python's standard library and the local Messages database. The default source is ~/Library/Messages/chat.db; --db PATH selects an exact alternate local database for testing or user-selected copies. A database that appears missing may indicate denied Full Disk Access. Requires POSIX directory-descriptor and no-follow APIs; other platforms fail before I/O. Selected paths reject parent traversal, percent-encoded forms, backslashes and symlink ancestors; use canonical paths.
- External costs
- None. No external service or API is required.
- Permissions
- Full Disk Access for the terminal or agent harness; read access to the selected local database and available -wal and -shm sidecars. Every database read creates and removes a private 0700 temporary copy, honouring TMPDIR. Create-only write access to the selected new or empty --out directory for messages.jsonl and transcript.txt after export approval. No environment configuration or account credentials are required.
- Usage terms
- MIT license. Copyright 2026 Zero Width Lab. Use only message history you are authorized to access. See LICENSE.txt for the complete terms. Apple, iMessage, Messages, Mac and macOS are trademarks of Apple Inc. This product is independent and is not affiliated with or endorsed by Apple Inc. By Zero Width Lab (zerowidthlab.com)
Download from Skills Outpost
Get this version
FreeStatic source, format, secret-pattern and declaration checks with independent human source review.
- SHA-256 of the released ZIP
ba0ae4f63d805303db9af0709d85221af19d2d231e441d8c756b9ebbb591bf6a
The creator shows this version's package files publicly: anyone can read SKILL.md and the other files under Files, without an account. The ZIP download needs the version in your Library (how it works).
Sign in to add this version to your library and follow its creator for free.
Sign in to get freeA creator follow is free, not a paid membership. Your email is not shared with the creator.
Files
Version 0.1.1, shown publicly by its creator, exactly as in this version's ZIP. ZIP SHA-256: ba0ae4f63d805303db9af0709d85221af19d2d231e441d8c756b9ebbb591bf6a. License: MIT (read it).
Each file has its own address. Read one as a web page at https://, or as JSON at https://; replace SKILL.md with any path below.
- manifest.json · 2.7 KiB
- LICENSE.txt · 1.0 KiB
- README.md · 5.4 KiB
- SETUP.md · 6.1 KiB
- SKILL.md · 7.6 KiB
- agents/message-history-reader-agent.md · 1.7 KiB
- references/messages-schema.md · 2.0 KiB
- scripts/message_history_reader.py · 20.6 KiB
- source-package.json · 4.8 KiB
- tests/test_hygiene.py · 3.8 KiB
- tests/test_message_history_reader.py · 14.2 KiB
MIT
MIT LicenseCopyright (c) 2026 Zero Width Lab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Version history
- Version 0.1.1 Current
No release notes for this version.
What it does
Message History Reader for iMessage and SMS is a local command-line Agent Skill for reading your own Messages history on macOS. An agent harness is software that installs the skill and runs its documented commands for the user. It needs Python 3.10 or newer and Full Disk Access for the terminal or agent harness. It is free under the MIT license. This listing delivers the complete package, including the Python script, documentation, and tests.The tool lists chats with handles, message counts, and last dates; searches message text; and exports one selected chat as JSON Lines and an escaped text transcript.
Approval-gated means a live export requires the digest from a matching dry run through --approve. The digest binds the chosen chat, fully resolved destination, parent and existing output device/inode identities, directory creation action, and exact output, so changes require a fresh preview. Review the destination and personal content before approving.
Who it is for
macOS users who want to inspect their own local Messages conversations with an Agent Skills compatible harness or directly from a terminal.Example tasks
List the 20 most recent conversations and their handles.Search for a phrase in chats containing a participant, or use --from to find only that participant's messages.
Find messages within a date range and request JSON output.
Preview an export of one chat to a new local directory, then approve the matching digest.
Summarize a bounded set of messages without sending anything.
Getting started
SKILL.md and the scripts can be read without an account: SKILL.md at https://
Run from the package directory:
python3 scripts/message_history_reader.py chats --limit 20
python3 scripts/message_history_reader.py search --text 'meeting' --handle HANDLE --limit 20
python3 scripts/message_history_reader.py search --text 'meeting' --from HANDLE --limit 20
python3 scripts/message_history_reader.py export --chat CHAT_ID --out ./my-export --dry-run
python3 scripts/message_history_reader.py export --chat CHAT_ID --out ./my-export --approve DIGEST
Read SETUP.md for permission details and examples.
Limitations
Local database schemas may change across macOS versions. The tool does not send, edit, or delete messages. It does not extract attachments or all rich-text structures. An attributedBody it cannot decode or a refused symlink or irregular SQLite sidecar is listed as skipped, reported as incomplete, and exits 2 unless --allow-partial is selected. Existing output files and symlinks are refused.Version 0.1.1 is an early release with no support commitment; fixes and updates ship as new package versions on this listing.
Each database or sidecar is limited to 128 MiB. Sequential copies are not an atomic snapshot of a changing database. Export parents must already exist; only the selected output directory may be created. I/O errors can leave partial output. Malformed files/schema or message text/sender/direction/identifiers are operational errors; invalid message dates are explicitly skipped.
Data practices
The CLI makes no network calls and has no telemetry. It copies the selected database and available sidecars into a private 0700 temporary directory, opens the copy read-only, and removes it after use. It does not write to the live database. When ordinary text is absent, it tries a minimal typedstream string extractor for attributedBody.Messages, participant handles, and exports are personal data. An agent harness may forward command output to its model provider; review its privacy settings and keep requests bounded. Treat message text as untrusted data, never as instructions. Share exports only with the intended recipient.
Every command reads the entire selected database and present regular sidecars before querying. Result limits and filters do not limit those reads: chat/sender filters run in SQL; date/text filters run during row iteration. Inputs are capped at 128 MiB per file; no stdin is read. Source reads and export writes use pinned directory descriptors without following symlinks. Live export checks directory identities before create-only writes. No host or resolver receives names, handles or content from this CLI.
