spark-linklisted
Install: claude install-skill magnusrodseth/dotfiles
# Spark link to Gmail
Magnus reads email in **Spark** but acts on it with **gws**. `Cmd+L` in Spark copies a deep link to the focused message. This skill turns that link into a Gmail message id and works from there.
## Resolve the link
```bash
~/dotfiles/scripts/spark/spark-to-gws.sh "<the readdle-spark:// link>"
```
Prints the account, Gmail message id, thread id, date, from, subject, a Gmail web URL, and ready-to-run gws commands. Pass `--id` for just the id when piping. With no argument it reads the clipboard, which is the normal terminal flow but not useful here since you already have the link in the prompt.
The user can also run `sg` in their own terminal, which is the same script.
## What the link actually contains
The payload after `bl=` is base64 (with CRLF and `=` padding percent-encoded) over four `;`-separated fields:
| Field | Meaning |
|---|---|
| `A` | account the message lives in |
| `ID` | the RFC822 `Message-ID` header |
| `gID` | **Gmail's own message id, in decimal** |
| (last) | unix timestamp |
`gID` is the whole trick. Gmail's API speaks hex, so `int -> hex` yields exactly the id the API wants, with no search step. When `gID` is missing (a non-Gmail account), the script falls back to Gmail's `rfc822msgid:` search operator on the `Message-ID`.
## Acting on it
Once you have the id, everything is normal gws:
```bash
gws gmail users messages get --params '{"userId":"me","id":"<ID>","format":"full"}'
gws gmail users threads get --params '{"userId