--- name: feedback_dm_wrapping_commands_to_mike description: DM long/wrapping output (commands, consent links, URLs) to Mike in Discord via the discord-dm skill so it copies cleanly — terminal wrapping mangles long single lines on paste. metadata: type: feedback --- Mike (2026-06-13): "For any command that wraps (like this one) DM me in discord, the line breaks suck." Reaffirmed 2026-06-15: any wrapped/long single-line output meant for him to copy — long one-liners, M365 admin-consent links, URLs with query strings, installer/ enrollment URLs — goes to Mike as a Discord DM, not left only in the terminal. Terminal wrapping inserts breaks/spaces that corrupt the line on paste. **How to apply:** Use the **`discord-dm` skill** (the productized mechanism — supersedes the old ad-hoc `.claude/tmp/discord-dm.py`): `bash .claude/scripts/discord-dm.sh mike ""` (or `echo "$X" | bash .claude/scripts/discord-dm.sh mike`). It's prepopulated with org user IDs (mike/howard/rob/winter) + channel IDs (#bot-alerts/#dev-alerts). Still show the item inline too, but the DM is the canonical copy-paste source. Short non-wrapping commands stay inline. **Mechanics / gotchas (the skill handles these, but know them):** - Bot token: vault `projects/discord-bot/bot-token.sops.yaml` field `credentials.bot_token`. - Mike's Discord uid `264814939619721216` (Howard `624667664501178379`). - **MUST set a `User-Agent` header** (e.g. `ClaudeToolsBot (claudetools, 1.0)`) — Discord's API is behind Cloudflare, which 403s (errcode 1010) the default urllib/curl UA. - DM flow: `POST /users/@me/channels {"recipient_id":}` → channel id, then `POST /channels//messages`. - Build JSON with `jq -nc --arg` and feed curl via `printf | --data-binary @-`; a direct `-d "$(...)"` mangles multiline content → Discord `50109 invalid JSON body`. Related: [[feedback_ascii_only_api_payloads]] (ASCII-only in Discord/coord payload text), [[reference_resource_map]] (Discord bot), the `discord-bot` project.