/miro-pack:miro-migration-deep-divefrom miro-pack
Migrates Miro boards between teams/orgs, exports board content to external systems, imports data into Miro, and re-platforms from competing whiteboard tools using REST API v2.
Ships in miro-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Comprehensive guide for migrating Miro boards between teams and organizations, updating from REST API v1 to v2, and re-platforming from competing whiteboard tools (Lucidchart, FigJam). Covers board content export with cursor pagination, bulk import with rate-limit aware queuing, widget API changes between v1 and v2, and the new app framework patterns. Typical migration scope: dozens to thousands of boards with connectors, tags, and members.
// Scan current integration for deprecated v1 patterns and board inventory
async function assessMigration(teamId: string) {
const boards = await miroFetch(`/v2/boards?team_id=${teamId}&limit=50`);
let totalItems = 0;
for (const board of boards.data) {
const items = await miroFetch(`/v2/boards/${board.id}/items?limit=1`);
totalItems += items.total ?? 0;
}
console.log(`Team ${teamId}: ${boards.data.length} boards, ~${totalItems} items`);
console.log('API version: v2 (v1 deprecated 2024-01)');
console.log('Widget types to migrate: sticky_note, shape, card, text, frame, image, connector');
return { boardCount: boards.data.length, totalItems };
}
Export every item on a board to a structured JSON file with cursor-paginated reads:
interface BoardExport {
exportedAt: string;
board: { id: string; name: string; description: string; owner: { id: string; name: string } };
items: any[]; connectors: any[]; tags: any[]; members: any[];
}
async function exportBoard(boardId: string): Promise<BoardExport> {
const board = await miroFetch(`/v2/boards/${boardId}`);
const items = await paginateAll(`/v2/boards/${boardId}/items`);
const connectors = await paginateAll(`/v2/boards/${boardId}/connectors`);
const tags = await miroFetch(`/v2/boards/${boardId}/tags`);
const members = await miroFetch(`/v2/boards/${boardId}/members?limit=100`);
return {
exportedAt: new Date().toISOString(),
board: { id: board.id, name: board.name, description: board.description ?? '',
owner: { id: board.owner?.id, name: board.owner?.name } },
items: items.map(i => ({ id: i.id, type: i.type, data: i.data, style: i.style,
position: i.position, geometry: i.geometry, parentId: i.parent?.id })),
connectors, tags: tags.data ?? [], members: members.data ?? [],
};
}
async function paginateAll(baseUrl: string): Promise<any[]> {
const all: any[] = [];
let cursor: string | undefined;
do {
const params = new URLSearchParams({ limit: '50' });
if (cursor) params.set('cursor', cursor);
const page = await miroFetch(`${baseUrl}?${params}`);
all.push(...page.data);
cursor = page.cursor;
} while (cursor);
return all;
}
Recreate exported items on a new board with rate-limit aware queuing (frames first, then other items, then connectors, then tags):
import PQueue from 'p-queue';
async function importToBoard(targetBoardId: string, exportData: BoardExport): Promise<{
created: number; failed: number; idMap: Map<string, string>;
}> {
const queue = new PQueue({ concurrency: 3, interval: 1000, intervalCap: 8 });
const idMap = new Map<string, string>();
let created = 0, failed = 0;
const endpointMap: Record<string, string> = {
sticky_note: 'sticky_notes', shape: 'shapes', card: 'cards', text: 'texts',
frame: 'frames', image: 'images', document: 'documents', app_card: 'app_cards',
};
// Frames first (containers), then everything else
const sorted = [...exportData.items].sort((a, b) =>
(a.type === 'frame' ? 0 : 1) - (b.type === 'frame' ? 0 : 1));
for (const item of sorted) {
await queue.add(async () => {
try {
const ep = endpointMap[item.type];
if (!ep) throw new Error(`Unsupported: ${item.type}`);
const newItem = await miroFetch(`/v2/boards/${targetBoardId}/${ep}`, 'POST', {
data: item.data, style: item.style, position: item.position, geometry: item.geometry,
});
idMap.set(item.id, newItem.id);
created++;
} catch { failed++; }
});
}
await queue.onIdle();
// Reconnect connectors using new IDs
for (const conn of exportData.connectors) {
const startId = idMap.get(conn.startItem?.id), endId = idMap.get(conn.endItem?.id);
if (!startId || !endId) continue;
await queue.add(async () => {
await miroFetch(`/v2/boards/${targetBoardId}/connectors`, 'POST', {
startItem: { id: startId }, endItem: { id: endId },
style: conn.style, shape: conn.shape,
}).catch(() => { failed++; });
created++;
});
}
await queue.onIdle();
return { created, failed, idMap };
}
async function validateMigration(sourceBoardId: string, targetBoardId: string) {
const srcItems = await paginateAll(`/v2/boards/${sourceBoardId}/items`);
const tgtItems = await paginateAll(`/v2/boards/${targetBoardId}/items`);
const srcConn = await paginateAll(`/v2/boards/${sourceBoardId}/connectors`);
const tgtConn = await paginateAll(`/v2/boards/${targetBoardId}/connectors`);
const checks = [
{ name: 'Item count', pass: tgtItems.length >= srcItems.length * 0.95,
detail: `${tgtItems.length}/${srcItems.length}` },
{ name: 'Connectors', pass: tgtConn.length >= srcConn.length * 0.9,
detail: `${tgtConn.length}/${srcConn.length}` },
];
console.log(checks.map(c => `${c.pass ? 'PASS' : 'FAIL'} ${c.name}: ${c.detail}`).join('\n'));
return checks.every(c => c.pass);
}
# Delete the target board entirely (preserves source untouched)
curl -X DELETE "https://api.miro.com/v2/boards/${TARGET_BOARD_ID}" \
-H "Authorization: Bearer $MIRO_TOKEN"
# Or delete only imported items by ID list (saved during import)
cat imported-ids.txt | while read id; do
curl -X DELETE "https://api.miro.com/v2/boards/${TARGET_BOARD_ID}/items/${id}" \
-H "Authorization: Bearer $MIRO_TOKEN"
done
echo "Rollback complete — source board unchanged"
| Issue | Cause | Fix |
|---|---|---|
429 Too Many Requests | Rate limit exceeded | Reduce PQueue concurrency to 2 |
| Connector creation fails | Referenced item missing | Verify idMap has both start/end IDs |
| Image items 404 | External URL expired | Re-upload image or use placeholder |
| Position overlap on target | No offset applied | Pass offsetX/offsetY to import |
| Tag 409 Conflict | Duplicate tag title | Catch 409, query existing tag by title |
For starting a new Miro integration from scratch, see miro-install-auth. For
board sharing and collaboration workflows, see miro-core-workflow-b.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/miro-ci-integrationConfigure CI/CD pipelines for Miro REST API v2 integrations with GitHub Actions,
test board isolation, and automated validation.
Trigger with phrases like "miro CI", "miro GitHub Actions",
"miro automated tests", "CI miro", "miro pipeline".
/miro-common-errorsDiagnose and fix Miro REST API v2 errors by HTTP status code.
Use when encountering Miro API errors, debugging failed requests,
or troubleshooting authentication and permission issues.
Trigger with phrases like "miro error", "fix miro",
"miro not working", "debug miro", "miro 401", "miro 403", "miro 429".
/miro-core-workflow-aManage Miro boards and items — create, read, update, delete boards,
sticky notes, shapes, cards, frames, and tags via REST API v2.
Trigger with phrases like "miro board management", "create miro board",
"miro items CRUD", "miro sticky notes", "organize miro board".
/miro-core-workflow-bManage Miro connectors, images, embeds, app cards, and document items via REST API v2.
Use for visual workflows, embedding content, and building rich board layouts.
Trigger with phrases like "miro connectors", "miro embed",
"miro app card", "miro image upload", "connect miro items".
/miro-cost-tuningOptimize Miro API costs through credit monitoring, request reduction,
and plan selection based on the credit-based rate limiting model.
Trigger with phrases like "miro cost", "miro billing",
"reduce miro costs", "miro pricing", "miro credits usage".
/miro-data-handlingImplement Miro REST API v2 data handling with PII detection in board content,
data export via API, retention policies, and GDPR/CCPA compliance patterns.
Trigger with phrases like "miro data", "miro PII",
"miro GDPR", "miro data export", "miro privacy", "miro compliance".
npx claudepluginhub flight505/skill-forge --plugin miro-packOther plugins' skills for the same job