$npx -y skills add himself65/finance-skills --skill discord-readerRead Discord for financial research using opencli (read-only). Use this skill whenever the user wants to read Discord channels, search for messages in trading servers, view guild/channel info, monitor crypto or market discussion groups, or gather financial sentiment from Discord.
| 1 | # Discord Skill (Read-Only) |
| 2 | |
| 3 | Reads Discord for financial research using [opencli](https://github.com/jackwener/opencli), a universal CLI tool that bridges desktop apps and web services to the terminal via Chrome DevTools Protocol (CDP). |
| 4 | |
| 5 | **This skill is read-only.** It is designed for financial research: searching trading server discussions, monitoring crypto/market groups, tracking sentiment in financial communities, and reading messages. It does NOT support sending messages, reacting, editing, deleting, or any write operations. |
| 6 | |
| 7 | **Important**: opencli connects to the Discord desktop app via CDP — no bot account or token extraction needed. Just have Discord Desktop running. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Step 1: Ensure opencli Is Installed and Discord Is Ready |
| 12 | |
| 13 | **Current environment status:** |
| 14 | |
| 15 | ``` |
| 16 | !`(command -v opencli && opencli discord-app status 2>&1 | head -5 && echo "READY" || echo "SETUP_NEEDED") 2>/dev/null || echo "NOT_INSTALLED"` |
| 17 | ``` |
| 18 | |
| 19 | If the status above shows `READY`, skip to Step 2. If `NOT_INSTALLED`, install first: |
| 20 | |
| 21 | ```bash |
| 22 | # Install opencli globally |
| 23 | npm install -g @jackwener/opencli |
| 24 | ``` |
| 25 | |
| 26 | If `SETUP_NEEDED`, guide the user through setup: |
| 27 | |
| 28 | ### Setup |
| 29 | |
| 30 | opencli requires Node.js >= 21. It connects to Discord Desktop via CDP (Chrome DevTools Protocol) — no Browser Bridge extension is needed for the Discord adapter. Two things are required: |
| 31 | |
| 32 | 1. **Start Discord with remote debugging enabled:** |
| 33 | |
| 34 | ```bash |
| 35 | # macOS |
| 36 | /Applications/Discord.app/Contents/MacOS/Discord --remote-debugging-port=9232 & |
| 37 | |
| 38 | # Linux |
| 39 | discord --remote-debugging-port=9232 & |
| 40 | ``` |
| 41 | |
| 42 | 2. **Set the CDP endpoint environment variable:** |
| 43 | |
| 44 | ```bash |
| 45 | export OPENCLI_CDP_ENDPOINT="http://127.0.0.1:9232" |
| 46 | ``` |
| 47 | |
| 48 | Add this to your shell profile (`.zshrc` / `.bashrc`) so it persists across sessions. |
| 49 | |
| 50 | 3. **Verify connectivity:** |
| 51 | |
| 52 | ```bash |
| 53 | opencli discord-app status |
| 54 | ``` |
| 55 | |
| 56 | ### Common setup issues |
| 57 | |
| 58 | | Symptom | Fix | |
| 59 | |---------|-----| |
| 60 | | `CDP connection refused` | Ensure Discord is running with `--remote-debugging-port=9232` | |
| 61 | | `OPENCLI_CDP_ENDPOINT not set` | Run `export OPENCLI_CDP_ENDPOINT="http://127.0.0.1:9232"` | |
| 62 | | `status` shows disconnected | Restart Discord with the CDP flag and retry | |
| 63 | | Discord not on expected port | Check that no other app is using port 9232, or use a different port | |
| 64 | |
| 65 | ### Tip: create a shell alias |
| 66 | |
| 67 | ```bash |
| 68 | alias discord-cdp='/Applications/Discord.app/Contents/MacOS/Discord --remote-debugging-port=9232 &' |
| 69 | ``` |
| 70 | |
| 71 | --- |
| 72 | |
| 73 | ## Step 2: Identify What the User Needs |
| 74 | |
| 75 | Match the user's request to one of the read commands below, then use the corresponding command from `references/commands.md`. |
| 76 | |
| 77 | | User Request | Command | Key Flags | |
| 78 | |---|---|---| |
| 79 | | Connection check | `opencli discord-app status` | — | |
| 80 | | List servers | `opencli discord-app servers` | `-f json` | |
| 81 | | List channels | `opencli discord-app channels` | `-f json` | |
| 82 | | List online members | `opencli discord-app members` | `-f json` | |
| 83 | | Read recent messages | `opencli discord-app read` | `N` (count), `-f json` | |
| 84 | | Search messages | `opencli discord-app search "QUERY"` | `-f json` | |
| 85 | |
| 86 | **Note:** opencli operates on the **currently active** server and channel in Discord. To read from a different channel, the user must navigate to it in the Discord app first, or use the `channels` command to identify what's available. |
| 87 | |
| 88 | --- |
| 89 | |
| 90 | ## Step 3: Execute the Command |
| 91 | |
| 92 | ### General pattern |
| 93 | |
| 94 | ```bash |
| 95 | # Use -f json or -f yaml for structured output |
| 96 | opencli discord-app servers -f json |
| 97 | opencli discord-app channels -f json |
| 98 | |
| 99 | # Read recent messages from the active channel |
| 100 | opencli discord-app read 50 -f json |
| 101 | |
| 102 | # Search for financial topics in the active channel |
| 103 | opencli discord-app search "AAPL earnings" -f json |
| 104 | opencli discord-app search "BTC pump" -f json |
| 105 | ``` |
| 106 | |
| 107 | ### Key rules |
| 108 | |
| 109 | 1. **Check connection first** — run `opencli discord-app status` before any other command |
| 110 | 2. **Use `-f json` or `-f yaml`** for structured output when processing data programmatically |
| 111 | 3. **Navigate in Discord first** — opencli reads from the currently active server/channel in the Discord app |
| 112 | 4. **Start with small reads** — use `opencli discord-app read 20` unless the user asks for more |
| 113 | 5. **Use search for keywords** — `opencli discord-app search` uses Discord's built |