# RmSend — agent install

You are an agent installing the **RmSend** skill for the user. RmSend sends
Markdown and PDFs from an agent to the user's reMarkable tablet, through a
hosted service. The user approves access in their browser; you never see their
reMarkable password.

This file installs **SKILL.md version 2**. Re-running it upgrades an existing
install.

## Steps

1. **Tell the user what you are about to add, then wait for their OK.**
   Say that you will add one skill file so their agent can send documents to
   their reMarkable, and that they will approve access in their browser.

2. **Install the CLI** (it carries the login flow):

   ```sh
   dotnet tool install --global rm-send
   # or run from a checkout: dotnet run --project src/RmSend.Cli -- ...
   ```

3. **Download the skill** into your skills directory:

   | Agent | Location |
   |---|---|
   | Claude Code | `~/.claude/skills/rm-send/SKILL.md` |
   | Codex | `~/.agents/skills/rm-send/SKILL.md` |
   | opencode | `~/.config/opencode/skills/rm-send/SKILL.md` |
   | Gemini CLI | `~/.gemini/skills/rm-send/SKILL.md` |
   | Qwen Code | `~/.qwen/skills/rm-send/SKILL.md` |
   | Cursor | `~/.cursor/skills/rm-send/SKILL.md` |
   | Cline | `~/.cline/skills/rm-send/SKILL.md` |
   | Others with skills support | Their skills dir, same layout |
   | No skills support | Save anywhere, add a pointer in `AGENTS.md` |

   ```sh
   mkdir -p ~/.claude/skills/rm-send
   curl -sf https://rm-send.app/skill/SKILL.md -o ~/.claude/skills/rm-send/SKILL.md
   ```

4. **Log in** (once the tablet is paired at `https://rm-send.app/app/pair`):

   ```sh
   rmsend login
   ```

   `login` prints a Cognito URL and waits on a loopback listener. Run it in the
   background or with a long timeout; show the URL to the user and ask them to
   open it. The browser redirects to `localhost`, so the CLI — not you — receives
   the auth code and tokens. On success it stores a 5-day license in
   `~/.rm-send.json` and exits `0`.

   On a machine with no browser (a cloud agent), use the fallback instead:

   ```sh
   rmsend login --manual   # prints a website link; the user pastes the license back
   ```

5. **Verify, then suggest a first send.**

   ```sh
   rmsend targets --remote
   rmsend send README.md --remote
   ```

## Rules

- Secrets never pass through you: the login URL carries only a PKCE challenge
  and `state`; the auth code and tokens go straight from the browser to the
  local listener. Never print the stored license.
- Never ask the user for their reMarkable password.
- The license reaches only the user's one tablet, expires in 5 days, and is
  revocable from `/app/settings`.
