ワンクリックで
migrate-site
Orchestrate bulk classic-to-modern SharePoint page migration for an entire site. Supports plan, migrate, and refine modes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Orchestrate bulk classic-to-modern SharePoint page migration for an entire site. Supports plan, migrate, and refine modes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Extract classic SharePoint pages and build a CIM (Canonical Intermediate Model) for migration.
Compare migrated modern page against the classic original using structural extraction, score quality, and refine until coverage is acceptable.
Transform classic page content into modern web parts, assemble canvas layout, and create/update the modern page.
Supplementary reference for PnP selector functions, Community Script Editor, Quick Links layouts, and JavaScript alternatives. Read on-demand for deeper migration details.
| name | migrate-site |
| description | Orchestrate bulk classic-to-modern SharePoint page migration for an entire site. Supports plan, migrate, and refine modes. |
| model | sonnet |
Orchestrate end-to-end migration of all classic pages in a SharePoint site to modern pages. This skill discovers pages, extracts CIMs, migrates each page in parallel (up to 5 at a time), scores quality, and produces a final summary with refinement recommendations.
Be fully autonomous. Do not ask the user questions during migration unless there is an actual blocker (e.g., destination site URL is unknown for a publishing site that does not have the Site Pages feature activated). Make reasonable decisions and keep moving.
**Every extract-and-understand and transform-and-create invocation run inside a dispatched subagent (Agent tool), one subagent per page.
Subagents do NOT inherit the orchestrator's model selection, so specify the model explicitly when spawning each per-page task:
model set to the fast/economic model, gpt-luna or mini, reasoning_effort: "medium").Discover pages — Call list_site_pages with the source site URL
library: "both" to find pages in both SitePages and Pages librariesincludeModernPages: false to skip pages that are already modernDetermine destination site — Modern pages live in a Site Pages library, which only exists when the Site Pages (site collection) feature is activated.
list_site_pages with library: "both" (a non-empty/queryable SitePages entry) or resolve_list_info(siteUrl, "Site Pages"). If it resolves, the feature is activated and the destination is the same site.Extract each page — For each classic page found:
extract-and-understand skill for that pagetransform-and-createextract-and-understand skill saves a CIM JSON file at pageunderstanding/<sitename>/<pagename>.jsonMark CIMs as planned — After each successful extraction, update the CIM JSON file:
"migrationStatus": "planned" at the top level"plannedAt": "<ISO timestamp>" at the top level"migrationStatus": "error", "error": "<message>", "lastAttemptAt": "<ISO timestamp>" and continue with the next pageReport plan summary — Display:
Process all planned pages by spawning parallel tasks (up to 5 concurrent). Each task handles one page end-to-end: transform → create → compare → score.
Each spawned task does the following for a single page:
Invoke transform-and-create — Reads the CIM file and creates the modern page
Update CIM on success — After the modern page is created:
"migrationStatus": "migrated""migratedAt": "<ISO timestamp>""modernPageId": "<page ID from Graph API>""modernPageUrl": "<page web URL>""destinationSiteUrl": "<destination site URL>"Invoke compare-and-refine — Compare only, do NOT refine
compare_migration_quality)"comparisonScore": <0-100 number>"comparisonSummary": "<brief text: what's missing>""comparedAt": "<ISO timestamp>"On failure — If any step fails:
"migrationStatus": "error""error": "<error message>""lastAttemptAt": "<ISO timestamp>"sonnet for Claude Code; the fast model with medium reasoning effort for GitHub Copilot CLIAfter all pages have been processed, call get_comparison_summary with the page-understanding site directory path to retrieve all comparison scores and summaries in a single lightweight call. Then produce the report:
| Page | Type | Status | Score | Issues |
|---|---|---|---|---|
| page1.aspx | wiki | migrated | 92% | — |
| page2.aspx | publishing | migrated | 65% | Missing 3 links, 1 image |
| page3.aspx | webpart | error | — | Auth timeout |
For each migrated page with a comparison score below 95%, or with notable missing content:
These fields are added to the top level of each CIM JSON file to track migration progress:
| Field | Type | Description |
|---|---|---|
migrationStatus | "planned" | "migrated" | "error" | Current status of the page migration |
plannedAt | ISO 8601 string | When the CIM was created/planned |
migratedAt | ISO 8601 string | When the modern page was created |
modernPageId | string | Graph API page ID of the modern page |
modernPageUrl | string | Web URL of the modern page |
destinationSiteUrl | string | Site URL where the modern page was created |
comparisonScore | number (0–100) | Content coverage score from structural comparison |
comparisonSummary | string | Brief summary of comparison findings |
comparedAt | ISO 8601 string | When the comparison was performed |
error | string | Error message from the last failed attempt |
lastAttemptAt | ISO 8601 string | When the last failed attempt occurred |
During the entire migration, do NOT ask the user about:
modernMapping or best-match layout-migrated suffix for same-siteOnly ask when truly blocked:
User: "Migrate https://contoso.sharepoint.com/sites/pub1 to https://contoso.sharepoint.com/sites/pub1-modern"
Phase 1 — Plan:
list_site_pages → found 8 classic pages
extract-and-understand × 8 → 8 CIMs saved as "planned"
Phase 2 — Migrate & Score (5 parallel):
[task 1] pubSample1 → transform → create → compare → score: 91%
[task 2] pubSample2 → transform → create → compare → score: 78%
[task 3] pubSample3 → transform → create → compare → score: 85%
[task 4] pubSample4 → transform → create → error: "timeout"
[task 5] pubSample5 → transform → create → compare → score: 44%
... (tasks 6-8 start as slots free up)
Phase 3 — Summary:
7/8 migrated, 1 error
Average score: 76%
Recommendations:
- pubSample2 (78%): Run compare-and-refine — missing 2 navigation links
- pubSample4: Retry migration — failed due to timeout
- pubSample5 (44%): Run compare-and-refine — missing hero banner and 5 links
| Tool | Purpose |
|---|---|
list_site_pages(siteUrl, library?, includeModernPages?) | Discover all pages in a site |
extract_classic_page(siteUrl, pageName) | Extract a single classic page (used via extract-and-understand skill) |
find_modern_page(siteUrl, pageName) | Check if a modern page already exists |
get_comparison_summary(directory) | Load all comparison scores/summaries from a page-understanding directory |
Each sub-agent should load only its own skill — skills are self-contained and do not need to reference each other.
| Skill | Phase | Where it runs | Notes |
|---|---|---|---|
extract-and-understand | Phase 1 | Inside a per-page subagent | Extract + CIM only, no handoff to transform |
transform-and-create | Phase 2 | Inside a per-page subagent | Reads CIM, creates modern page |
compare-and-refine | Phase 2 | Inside the SAME per-page subagent (after transform) | Compare only (no refinement), produces score |