Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from bundle
Connect to Miro boards, inspect items, download images, and create boards or diagrams programmatically.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: miro-board-connector3description: Connect to Miro boards, browse content, download images, create boards, draw shapes, connectors, and full diagrams. Use when the user wants to connect Miro, access a Miro board, download mockups from Miro, draw diagrams on Miro, or create architecture/flow diagrams programmatically.4compatibility: "Runtimes: codex, claude-code, openclaw · OS: linux, darwin"5allowed-tools: Bash, Read, Write, WebFetch6---78# Miro Board Connector910Connect to a Miro board via OAuth, inspect board items, and download full-size images by spatial region.1112## Bundle Layout1314- `SKILL.md`: primary workflow15- `scripts/miro_api.py`: OAuth + board inspection + image download helper16- `CODEX_BOOTSTRAP.md`: Codex-specific activation notes17- `CLAUDE_BOOTSTRAP.md`: Claude Code-specific activation notes18- `OPENCLAW_BOOTSTRAP.md`: OpenClaw-specific activation notes1920Run commands from the installed skill directory so relative paths like `scripts/miro_api.py` resolve correctly.2122## Setup Flow2324### Step 1: Check for existing token2526```bash27test -f ~/.miro-token && echo "Miro token file found" || echo "No Miro token file yet"28```2930If a token exists, test it:3132```bash33python3 scripts/miro_api.py test-token34```3536If valid, skip to **Step 3**. If expired or missing, continue.3738### Step 2: OAuth Setup3940The user needs a Miro app with `boards:read` and `boards:write` scopes. Guide them:41421. Go to https://miro.com/app/settings/user-profile/apps432. Click **Create new app** (or use an existing one)443. Set **Redirect URI** to `http://localhost:9876/callback` and click **Add**454. Check **boards:read** and **boards:write** permissions465. Save the app476. Share the **Client ID** and **Client Secret**4849Once you have credentials, run the OAuth flow:5051```bash52python3 scripts/miro_api.py oauth \53--client-id CLIENT_ID \54--client-secret CLIENT_SECRET55```5657This will:58- Start a local server on port 987659- Print an authorization URL for the user to open in their browser60- Wait for the OAuth callback61- Exchange the code for an access token62- Save token metadata to `~/.miro-token`6364Tell the user to open the printed URL in their browser and authorize the app.6566### Step 3: Browse a board6768Get board info:6970```bash71python3 scripts/miro_api.py board-info --board-url "BOARD_URL"72```7374List all items with spatial positions and text content:7576```bash77python3 scripts/miro_api.py list-items --board-url "BOARD_URL"78```7980This outputs item type, position, size, and text content for every item on the board.81Use the text content to identify sections, then use positions to find images in those regions.8283### Step 4: Download images8485Download images from a spatial region:8687```bash88python3 scripts/miro_api.py download-images \89--board-url "BOARD_URL" \90--region "x_min,y_min,x_max,y_max" \91--output-dir /tmp/miro-images \92--format original93```9495Download ALL images on the board:9697```bash98python3 scripts/miro_api.py download-images \99--board-url "BOARD_URL" \100--output-dir /tmp/miro-images \101--format original102```103104## Typical Workflow1051061. User says "connect Miro" or "grab images from Miro board"1072. Check for existing token → if missing, run OAuth setup1083. User provides board URL1094. Run `list-items` to see board layout — identify sections by text labels1105. Identify regions of interest from text item positions1116. Run `download-images` with `--region` for each area of interest1127. View downloaded images with the Read tool to understand their content1138. Use the images as needed (insert into GitHub issues, docs, etc.)114115## Writing: Create boards and draw diagrams116117### Create a board118119```bash120python3 scripts/miro_api.py create-board --name "My Board" --description "Optional"121```122123### Draw a diagram from JSON124125Create a JSON file defining shapes and connectors, then draw it on a board:126127```bash128python3 scripts/miro_api.py draw-diagram \129--board-url "BOARD_URL" \130--json-file diagram.json \131--offset-x 0 --offset-y 0132```133134**JSON format:**135136```json137{138"title": {"text": "<strong>Diagram Title</strong>", "x": 0, "y": -400, "size": 36, "color": "#fbbf24"},139"shapes": [140{"id": "api", "content": "<strong>API</strong><br>FastAPI", "x": 0, "y": 0, "w": 180, "h": 70, "fill": "#1e3a5f", "border": "#3b82f6"},141{"id": "db", "content": "<strong>Database</strong>", "x": 0, "y": 200, "w": 160, "h": 70, "fill": "#3b1a1a", "border": "#ef4444"}142],143"connectors": [144{"from": "api", "to": "db", "start_snap": "bottom", "end_snap": "top", "color": "#fbbf24"}145]146}147```148149**Shape properties:** `id` (for connectors), `content` (HTML), `x`, `y`, `w`, `h`, `fill`, `border`, `text_color`, `font_size`, `shape` (round_rectangle, rectangle, circle, etc.)150151**Connector snap positions:** `top`, `bottom`, `left`, `right`152153### Create individual items154155```bash156# Shape157python3 scripts/miro_api.py create-shape --board-url URL \158--content "<strong>Title</strong>" --x 0 --y 0 --width 200 --height 80 \159--fill "#1e3a5f" --border "#3b82f6"160161# Text162python3 scripts/miro_api.py create-text --board-url URL \163--content "Header" --x 0 --y -100 --font-size 36 --color "#fbbf24"164165# Connector (use shape IDs from create-shape output)166python3 scripts/miro_api.py create-connector --board-url URL \167--start-id SHAPE_ID --end-id SHAPE_ID --start-snap bottom --end-snap top168```169170## Notes171172- Requires `python3` and outbound network access to Miro173- Board URL format: `https://miro.com/app/board/BOARD_ID=/`174- The `--format original` flag downloads full-size images (not thumbnails)175- Token metadata is saved to `~/.miro-token` with `0600` permissions176- When Miro returns a refresh token, the helper auto-refreshes expiring access tokens177- Images keep their original PNG/JPEG/WebP/SVG file extension when downloaded178- For write operations, the token must have `boards:write` scope179