skills/miro-code-spec/SKILL.md
Use when the user wants to extract a Miro board's specs (documents, diagrams, prototypes, tables, frames, images) to local `.miro/specs/` files for AI-assisted planning and implementation — accepts a board URL or single-item URL.
npx skillsauth add miroapp/miro-ai miro-code-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
Security scan pending...
This skill is queued for security scanning. Results will appear when the scan completes.
Extract specification content from a Miro board or item and save to .miro/specs/ so it can be referenced during planning and implementation without repeated API calls.
The user provides one URL: a board URL (extract all spec items) or an item URL with a moveToWidget / focusWidget parameter (extract that single item). Miro MCP must be available.
Decide whether the user gave a board URL (extract every spec item on the
board) or a single-item URL — i.e. a board URL with a moveToWidget or
focusWidget query parameter naming one item. Pass the URL through to Miro
MCP as-is — MCP handles the URL.
.miro/specs/ exists and has content..miro/specs/ directory already contains files. What should I do?".miro/specs/
├── documents/ # Markdown documents
├── diagrams/ # Diagram descriptions
├── prototypes/ # Containers (Markdown) and screens (HTML)
├── tables/ # Table JSON data
├── frames/ # Frame summaries
├── other/ # Unknown types (slides, etc.)
└── images/ # Extracted images
For Board URLs:
moveToWidget parameter), and title.For Item URLs:
🚨 THIS STEP IS MANDATORY — DO NOT SKIP
Create an internal checklist item for EVERY item discovered so nothing is missed.
Task structure:
Example with title:
Subject: "Extract document: Product Requirements"
Description: "Extract document item 3458764612345 from board. Save to .miro/specs/documents/3458764612345.md"
activeForm: "Extracting document: Product Requirements"
Example without title:
Subject: "Extract diagram: 3458764612347"
Description: "Extract diagram item 3458764612347 from board. Save to .miro/specs/diagrams/3458764612347.md"
activeForm: "Extracting diagram: 3458764612347"
⚠️ IMPORTANT: Task Count by Type
Create tasks according to this exact breakdown:
Critical: Prototype screens are NOT 1 task, they are 3 tasks. If you create only 1 task per screen, images will be missed.
Naming Convention:
This task creation step ensures: ✓ All items are tracked ✓ Nothing gets skipped ✓ Progress is visible ✓ Extraction workflow is structured
Create .miro/specs/index.json with initial structure:
{
"board_url": "original board URL",
"extracted_at": "ISO timestamp",
"items": [],
"images": [],
"summary": {
"total_items": 0,
"by_type": {},
"total_images": 0
}
}
This file will be updated progressively as each item is extracted.
CRITICAL: You MUST write all content received from MCP tools to the file system immediately. Do not skip the file-writing step.
Workflow for each item (with task tracking and progressive index updates):
For most items (documents, diagrams, containers, frames, tables, other):
in_progressindex.json, add this item to the items array, then write the updated index.jsoncompletedFor prototype screens (MANDATORY subagent workflow):
Document items:
.miro/specs/documents/<board item ID>.mdindex.json with this itemDiagram items:
.miro/specs/diagrams/<board item ID>.mdindex.json with this itemPrototype container items:
.miro/specs/prototypes/<board item ID>-container.mdindex.json with this itemPrototype screen items (MANDATORY 3-task workflow via subagent):
⚠️ EACH PROTOTYPE SCREEN REQUIRES A SUBAGENT WITH 3 SEPARATE TASKS
Why subagent: the Miro MCP context tool returns large HTML for prototype screens, which bloats the main agent's context. A subagent keeps this contained — the large HTML never enters the main conversation.
For each prototype screen, launch a single subagent (with subagent_type: "general-purpose") that performs all 3 steps sequentially. Pass the subagent all necessary context:
Subagent prompt template:
Extract prototype screen and its images from Miro board.
Context:
- Miro board URL targeting the prototype screen: [url]
Execute these 3 tasks in order:
Task 1: Get and save HTML
- Call the appropriate Miro MCP item-retrieval tool with the item URL
- Save the returned raw HTML to .miro/specs/prototypes/<board item ID>-screen.html
- Read index.json, add this item to items array, Write updated index.json
Task 2: Extract images
- Read the saved HTML file
- Parse HTML for ALL image URLs in `src` attributes
- For EACH image URL found:
1. Extract resource ID from URL path
2. Call the appropriate Miro MCP image tool to obtain a download URL for the image
3. Take the download URL from response
4. Download: `curl -sL -o .miro/specs/images/<image resource ID>.png "[download_url]"`
5. Read index.json, add image entry to images array, Write updated index.json:
{"id": "<image resource ID>", "path": "images/<image resource ID>.png", "referenced_by": ["prototypes/<board item ID>-screen.html"]}
- If any download fails: log warning, continue with others
Task 3: Update image URLs in HTML
- Read the HTML file from .miro/specs/prototypes/<board item ID>-screen.html
- Replace ALL original image URLs with relative paths: src="../images/<image resource ID>.png"
- Save the updated HTML
- Verify all image src attributes now point to ../images/
Report back: number of images found, downloaded, and any failures.
Main agent workflow for each screen:
in_progresscompleted⚠️ CRITICAL REQUIREMENTS FOR PROTOTYPE SCREENS:
Frame items:
.miro/specs/frames/<board item ID>.mdindex.json with this itemTable items:
.miro/specs/tables/<board item ID>.jsonindex.json with this itemUnknown/Other item types (e.g., slides, or any new types):
.miro/specs/other/<board item ID>.mdindex.json with this itemRead the current index.json and calculate the summary section:
total_items from items arrayby_type (group items by type field)total_images from images arrayUpdate index.json with the calculated summary:
{
"summary": {
"total_items": 8,
"by_type": {
"document": 2,
"diagram": 2,
"prototype": 2,
"table": 1,
"frame": 1
},
"total_images": 3
}
}
MUST write the updated index.json.
Verification Checklist (MUST DO):
.miro/specs/ directories.miro/specs/images/ matches index.json total_imagesDisplay to user:
If verification fails, DO NOT report success:
🚨 These are the most common reasons extraction fails or is incomplete:
NOT CREATING TASKS
TREATING PROTOTYPE SCREENS AS 1 TASK
CALLING THE MCP CONTEXT TOOL FOR SCREENS FROM MAIN AGENT
NOT PARSING HTML FOR IMAGES
src attributes in HTMLNOT UPDATING IMAGE URLS IN HTML
../images/[id].pngNOT TRACKING IMAGE METADATA
index.jsonindex.json images arrayNOT VERIFYING COMPLETION
File Writing:
Directory Operations:
Output:
Prototype Screens:
Priority:
The miro-spec plugin extracts specification content from Miro boards and saves it to local files. This enables AI to reference specs during planning and implementation without requiring repeated API calls.
Use it when you need to:
| Type | Saves As | Contains |
|------|----------|----------|
| Documents | .md | Markdown content with formatting; preserved headings and structure |
| Diagrams | .md | AI-generated description; flow analysis and component relationships |
| Prototype containers | .md (suffix -container) | Markdown with navigation map |
| Prototype screens | .html (suffix -screen) | HTML markup with UI layout |
| Tables | .json | Structured data with column definitions and all row data |
| Frames | .md | AI-generated summary of frame contents |
| Images | .png | Automatically extracted from prototypes; named by Miro item ID |
Board URLs — extract complete specifications. Best for comprehensive spec extraction across all related documents and diagrams. Lists all items on the board, filters for spec-related types, extracts each individually.
Item URLs — extract a single document, diagram, or prototype screen. Best for targeted extraction or updating one item. Faster for single items; uses moveToWidget parameter.
src attributesOriginal HTML:
<img src="https://miro.com/api/v2/boards/uXjVK123abc=/images/3458764612345"/>
After extraction:
<img src="../images/3458764612345.png"/>
Benefits: images work offline, no API calls needed to view documents, faster local loading, and the extracted folder can be committed to version control.
Once specs are extracted, the user can ask their AI assistant to plan or implement against them. Example prompts:
.miro/specs/documents/ and create a technical implementation plan".miro/specs/diagrams/3458764612345.md and implement the database schema".miro/specs/prototypes/3458764612346-screen.html"The AI assistant reads the relevant files automatically during planning. Always check .miro/specs/index.json first to see what was extracted.
Extraction strategy:
Directory management:
.miro/specs/ in .gitignore if specs are temporaryWorking with specs:
index.json first to understand what's availablePerformance tips:
No items extracted from board:
Images not downloading:
Files not found after extraction:
.miro/specs/index.json for actual pathsLarge boards taking too long:
development
Use when the user wants to create a visual code review on a Miro board from a pull/merge request (GitHub, GitLab, or any forge), local uncommitted changes, or a branch comparison — produces a file-changes table, summary/architecture/security docs, and architecture diagrams, then links them back from the PR/MR.
development
Use when the user wants to create a visual code review on a Miro board from a pull/merge request (GitHub, GitLab, or any forge), local uncommitted changes, or a branch comparison — produces a file-changes table, summary/architecture/security docs, and architecture diagrams, then links them back from the PR/MR.
development
Use when the user wants to create a visual code review on a Miro board from a pull/merge request (GitHub, GitLab, or any forge), local uncommitted changes, or a branch comparison — produces a file-changes table, summary/architecture/security docs, and architecture diagrams, then links them back from the PR/MR.
development
Use when the user wants to create a visual code review on a Miro board from a pull/merge request (GitHub, GitLab, or any forge), local uncommitted changes, or a branch comparison — produces a file-changes table, summary/architecture/security docs, and architecture diagrams, then links them back from the PR/MR.