[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79RFR2P2VK3XW83ATCMKNWK":3,"skill-same:01M79RFR2P2VK3XW83ATCMKNWK":162},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79RFR2P2VK3XW83ATCMKNWK","mailgrep",null,"Use when the user asks you to find, read, search, quote, or extract attachments from email in the local Apple Mail app on macOS - searches Mail's on-disk store read-only, with no ability to send or modify mail","hexrw\u002Fmailgrep","hexrw","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72889112?v=4","01M79RFP29MSSP3AHPCACYCW0S","Petr Kolonicz","01M79RFP2YQ3B4YY661G698Z8T",1,"MIT","https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: mailgrep\ndescription: Use when the user asks you to find, read, search, quote, or extract attachments from email in the local Apple Mail app on macOS - searches Mail's on-disk store read-only, with no ability to send or modify mail\n---\n\n# Reading Apple Mail with mailgrep\n\n`mailgrep` reads Apple Mail's local store on macOS: the `Envelope Index` SQLite database for\nmetadata, `.emlx` files for bodies. Read-only by construction — it cannot send, delete, move, or\nflag anything.\n\nIf `mailgrep` is not on `PATH`, use the copy bundled with this skill at `bin\u002Fmailgrep`, relative to\nthe directory this file lives in. It needs no install and no dependencies.\n\n## Always run doctor first in a session\n\n```sh\nmailgrep doctor\n```\n\nIt resolves access, schema, coverage and freshness in one shot. Do not debug empty search results\nwithout running it — the answer is almost always in its output.\n\nExit codes: `0` ok, `2` Full Disk Access missing, `3` schema unrecognised, `4` coverage incomplete.\n\n## Searching\n\n```sh\nmailgrep search --from alec@example.com --since 2026-06-01\nmailgrep search --subject contract --body \"signed copy\"\nmailgrep search --to someone@example.com --mailbox INBOX --unread\nmailgrep search --from vendor --json\n```\n\n`--from` matches address or display name. `--subject`, `--mailbox`, `--to` are substring matches.\n`--body` decodes each candidate message, so it is slower than metadata filters — narrow with\n`--from`\u002F`--since` first when a mailbox is large.\n\nAdd `--json` whenever you need to parse the result rather than show it.\n\nSearch returns message ids. Use them with `read` and `attachments`:\n\n```sh\nmailgrep read 12345\nmailgrep read 12345 --headers-only\nmailgrep attachments 12345\nmailgrep attachments 12345 --extract .\u002Fout\n```\n\n## Read the output footers — they carry the caveats\n\nEvery search prints a summary line and, when relevant, warnings. Report these to the user rather\nthan presenting results as complete when they aren't:\n\n- `N of those are not in Apple Mail's index and were read directly from disk` — normal, usually\n  drafts and outbox. Those rows are labelled `(unindexed)`.\n- `WARNING: N messages could not be read` — those were **not** searched. Run `doctor`.\n- `WARNING: stopped at --limit N` — more matches may exist. Do not describe the result as complete.\n- `--unread\u002F--flagged cannot be evaluated: their .emlx files carry no flags trailer` — a few\n  unindexed messages were excluded from that specific filter.\n\nIf the user asks \"find every email about X\", do not pass `--limit`, and do not pass\n`--indexed-only`.\n\n## Attachments have four states\n\n`inline` and `external` are savable. `not_downloaded` means Mail never fetched the bytes from the\nserver (the account's Download Attachments setting is Recent or None) — no local tool can retrieve\nthem, and the user must open the message in Mail once. `not_extractable` means declared but absent.\n\n`mailgrep` refuses to write a 0-byte file rather than reporting a false success. If extraction exits\n`5`, tell the user which state applies instead of retrying.\n\n## Large attachments and images\n\nExtract to a scratch directory, not into the user's project. For image or PDF attachments, delegate\nthe visual inspection to a subagent and keep only its text summary — raw image bytes consume a large\namount of context for something that is only needed once.\n\n## Full Disk Access\n\nIf `doctor` exits `2`, the fix belongs to the user and cannot be scripted. `~\u002FLibrary\u002FMail` is\nTCC-protected, and the grant must go to the **application that launched the shell** (terminal,\neditor, IDE), not to `mailgrep` itself — macOS attributes file access to the launching application.\n`doctor` names the exact application. The user must then quit and reopen it, because TCC only applies\ngrants to newly launched processes.\n\n## Freshness\n\nApple Mail does not fetch mail while it is closed. `doctor` reports whether Mail.app is running and\nhow long ago it last wrote to the store. macOS exposes no last-sync timestamp, so that write time is a\n**lower bound** on freshness — never tell the user their mail is up to date on the strength of it.\n\nIf the user is looking for a message that just arrived and it isn't there, check `doctor` for\n`Mail.app running: NO`. That is the likely answer. `mailgrep` cannot trigger a sync; the user must\nopen Mail.\n\nMessage ids are `ROWID`s and Apple Mail reassigns them when it rebuilds its index. Use them within a\ntask; never store them or quote them back to the user in a later session as stable references.\n\n## Exchange accounts return nothing, not stale data\n\nEWS\u002FExchange accounts do not store messages locally at all. If a user insists mail exists that\n`mailgrep` cannot find, check the account type before assuming a bug — for Exchange there is nothing\non disk to read.\n\n## Privacy\n\nThis reads the user's real mail. Quote only what the task needs, do not bulk-dump mailboxes into your\ncontext, and do not copy message contents into files or commits unless the user asked for it.\n","# Reading Apple Mail with mailgrep\n\n`mailgrep` reads Apple Mail's local store on macOS: the `Envelope Index` SQLite database for\nmetadata, `.emlx` files for bodies. Read-only by construction — it cannot send, delete, move, or\nflag anything.\n\nIf `mailgrep` is not on `PATH`, use the copy bundled with this skill at `bin\u002Fmailgrep`, relative to\nthe directory this file lives in. It needs no install and no dependencies.\n\n## Always run doctor first in a session\n\n```sh\nmailgrep doctor\n```\n\nIt resolves access, schema, coverage and freshness in one shot. Do not debug empty search results\nwithout running it — the answer is almost always in its output.\n\nExit codes: `0` ok, `2` Full Disk Access missing, `3` schema unrecognised, `4` coverage incomplete.\n\n## Searching\n\n```sh\nmailgrep search --from alec@example.com --since 2026-06-01\nmailgrep search --subject contract --body \"signed copy\"\nmailgrep search --to someone@example.com --mailbox INBOX --unread\nmailgrep search --from vendor --json\n```\n\n`--from` matches address or display name. `--subject`, `--mailbox`, `--to` are substring matches.\n`--body` decodes each candidate message, so it is slower than metadata filters — narrow with\n`--from`\u002F`--since` first when a mailbox is large.\n\nAdd `--json` whenever you need to parse the result rather than show it.\n\nSearch returns message ids. Use them with `read` and `attachments`:\n\n```sh\nmailgrep read 12345\nmailgrep read 12345 --headers-only\nmailgrep attachments 12345\nmailgrep attachments 12345 --extract .\u002Fout\n```\n\n## Read the output footers — they carry the caveats\n\nEvery search prints a summary line and, when relevant, warnings. Report these to the user rather\nthan presenting results as complete when they aren't:\n\n- `N of those are not in Apple Mail's index and were read directly from disk` — normal, usually\n  drafts and outbox. Those rows are labelled `(unindexed)`.\n- `WARNING: N messages could not be read` — those were **not** searched. Run `doctor`.\n- `WARNING: stopped at --limit N` — more matches may exist. Do not describe the result as complete.\n- `--unread\u002F--flagged cannot be evaluated: their .emlx files carry no flags trailer` — a few\n  unindexed messages were excluded from that specific filter.\n\nIf the user asks \"find every email about X\", do not pass `--limit`, and do not pass\n`--indexed-only`.\n\n## Attachments have four states\n\n`inline` and `external` are savable. `not_downloaded` means Mail never fetched the bytes from the\nserver (the account's Download Attachments setting is Recent or None) — no local tool can retrieve\nthem, and the user must open the message in Mail once. `not_extractable` means declared but absent.\n\n`mailgrep` refuses to write a 0-byte file rather than reporting a false success. If extraction exits\n`5`, tell the user which state applies instead of retrying.\n\n## Large attachments and images\n\nExtract to a scratch directory, not into the user's project. For image or PDF attachments, delegate\nthe visual inspection to a subagent and keep only its text summary — raw image bytes consume a large\namount of context for something that is only needed once.\n\n## Full Disk Access\n\nIf `doctor` exits `2`, the fix belongs to the user and cannot be scripted. `~\u002FLibrary\u002FMail` is\nTCC-protected, and the grant must go to the **application that launched the shell** (terminal,\neditor, IDE), not to `mailgrep` itself — macOS attributes file access to the launching application.\n`doctor` names the exact application. The user must then quit and reopen it, because TCC only applies\ngrants to newly launched processes.\n\n## Freshness\n\nApple Mail does not fetch mail while it is closed. `doctor` reports whether Mail.app is running and\nhow long ago it last wrote to the store. macOS exposes no last-sync timestamp, so that write time is a\n**lower bound** on freshness — never tell the user their mail is up to date on the strength of it.\n\nIf the user is looking for a message that just arrived and it isn't there, check `doctor` for\n`Mail.app running: NO`. That is the likely answer. `mailgrep` cannot trigger a sync; the user must\nopen Mail.\n\nMessage ids are `ROWID`s and Apple Mail reassigns them when it rebuilds its index. Use them within a\ntask; never store them or quote them back to the user in a later session as stable references.\n\n## Exchange accounts return nothing, not stale data\n\nEWS\u002FExchange accounts do not store messages locally at all. If a user insists mail exists that\n`mailgrep` cannot find, check the account type before assuming a bug — for Exchange there is nothing\non disk to read.\n\n## Privacy\n\nThis reads the user's real mail. Quote only what the task needs, do not bulk-dump mailboxes into your\ncontext, and do not copy message contents into files or commits unless the user asked for it.\n",{"name":5,"description":7},"main","27ff727d6d8f0a30723054b80240853fc4411efe","",0,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep","https:\u002F\u002Fgithub.com\u002Fhexrw","https:\u002F\u002Fwebspen.com\u002F","Software engineer, entrepreneur, web developer","2026-08-20 01:11:58",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add hexrw\u002Fmailgrep --skill mailgrep",{"tool":40,"command":41},"bunx","bunx skills add hexrw\u002Fmailgrep --skill mailgrep",{"tool":43,"command":44},"pnpm","pnpm dlx skills add hexrw\u002Fmailgrep --skill mailgrep","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002FSKILL.md",true,[48,54,58,62,68,72,76,80,84,90,94,98,102,106,110,114,118,122,126,130,134,138,142,146,150,154,158],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},".claude-plugin\u002Fmarketplace.json","REFERENCE","参考文档",693,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002F.claude-plugin\u002Fmarketplace.json",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},".claude-plugin\u002Fplugin.json",413,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002F.claude-plugin\u002Fplugin.json",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},".github\u002Fworkflows\u002Fci.yml",1046,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002F.github\u002Fworkflows\u002Fci.yml",{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},".gitignore","OTHER","其他",65,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002F.gitignore",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"bin\u002Fmailgrep",373,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fbin\u002Fmailgrep",{"path":73,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":74,"sourceHtmlUrl":75},"docs\u002Fstore-format.md",8888,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fdocs\u002Fstore-format.md",{"path":77,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":78,"sourceHtmlUrl":79},"justfile",295,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fjustfile",{"path":81,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":16},"LICENSE","许可证",1062,{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"mailgrep\u002F__init__.py","SCRIPT","脚本",359,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002F__init__.py",{"path":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"mailgrep\u002F__main__.py",79,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002F__main__.py",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"mailgrep\u002Faccounts.py",2351,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Faccounts.py",{"path":99,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":100,"sourceHtmlUrl":101},"mailgrep\u002Fattachments.py",7339,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Fattachments.py",{"path":103,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":104,"sourceHtmlUrl":105},"mailgrep\u002Fcli.py",15090,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Fcli.py",{"path":107,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":108,"sourceHtmlUrl":109},"mailgrep\u002Fdoctor.py",8119,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Fdoctor.py",{"path":111,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":112,"sourceHtmlUrl":113},"mailgrep\u002Femlx.py",6913,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Femlx.py",{"path":115,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":116,"sourceHtmlUrl":117},"mailgrep\u002Fenvelope.py",17476,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Fenvelope.py",{"path":119,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":120,"sourceHtmlUrl":121},"mailgrep\u002Flocator.py",5448,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Flocator.py",{"path":123,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":124,"sourceHtmlUrl":125},"mailgrep\u002Fstore.py",7930,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Fstore.py",{"path":127,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":128,"sourceHtmlUrl":129},"mailgrep\u002Funindexed.py",5916,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fmailgrep\u002Funindexed.py",{"path":131,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":132,"sourceHtmlUrl":133},"pyproject.toml",939,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fpyproject.toml",{"path":135,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":136,"sourceHtmlUrl":137},"README.md",4440,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002FREADME.md",{"path":139,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":140,"sourceHtmlUrl":141},"tests\u002Ffixtures.py",11388,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures.py",{"path":143,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":144,"sourceHtmlUrl":145},"tests\u002Ftest_attachments.py",5852,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Ftests\u002Ftest_attachments.py",{"path":147,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":148,"sourceHtmlUrl":149},"tests\u002Ftest_cli.py",15379,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Ftests\u002Ftest_cli.py",{"path":151,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":152,"sourceHtmlUrl":153},"tests\u002Ftest_emlx.py",7633,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Ftests\u002Ftest_emlx.py",{"path":155,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":156,"sourceHtmlUrl":157},"tests\u002Ftest_envelope.py",8786,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Ftests\u002Ftest_envelope.py",{"path":159,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":160,"sourceHtmlUrl":161},"tests\u002Ftest_store.py",8666,"https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Ftests\u002Ftest_store.py",[163],{"skillNo":164,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":20},"01M79RFVE9ESKDBMBRWYCX0ZXZ","https:\u002F\u002Fgithub.com\u002Fhexrw\u002Fmailgrep\u002Fblob\u002Fmain\u002Fskills\u002Fmailgrep\u002FSKILL.md",[],[]]