ワンクリックで
diagnose
Debug failed or low-quality extractions by analyzing logs, probing the source site, and identifying root causes
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Debug failed or low-quality extractions by analyzing logs, probing the source site, and identifying root causes
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Import and rebuild a website from a closed platform (Wix, Squarespace, Webflow, Shopify, GoDaddy, Hostinger, HubSpot, Weebly) into a Studio WordPress site. Extracts pages/posts/products + media, then reconstructs the design as editable blocks + WooCommerce OR as a high-fidelity replica theme. Invoke when the user wants to migrate, import, liberate, or rebuild a site from one of these platforms.
Choose recommended plugins and plugin-provided blocks for features core WordPress blocks do not cover - ecommerce (WooCommerce), forms and newsletters (Jetpack), online courses and quizzes (Sensei LMS), polls, surveys and ratings (Crowdsignal), spam protection (Akismet) - while keeping generated content editable and avoiding raw HTML fallbacks. Any request to sell products or build a shop, store, or storefront requires WooCommerce with products.
Gather the site name and layout preference before building a WordPress site. Run this before creating any new site.
Use the Studio CLI to manage local WordPress sites, authentication, and preview sites. Invoke this skill when you need to run Studio CLI commands, manage sites, or troubleshoot site issues.
Write editable WordPress block markup for local Studio sites, including core/html limits, block-theme layout rules, full-width sections, validation, and skeleton-first page/CSS recipes.
Answer WordPress.com plan, pricing, upgrade, and feature-tier questions (plan names, what each tier unlocks — plugins, themes, custom code, SSH, hosting — and current prices) from authoritative live data. Load before answering ANY plan, pricing, or feature-gating question; never answer these from memory.
| name | diagnose |
| description | Debug failed or low-quality extractions by analyzing logs, probing the source site, and identifying root causes |
| allowed-tools | ["Bash","Read","Write","Edit","Glob","Grep","AskUserQuestion","WebSearch"] |
Systematically investigate why an extraction failed or produced poor results. Identify root causes and fix them.
Ask for or detect:
| Parameter | How to find it |
|---|---|
| Output directory | Call liberate_paths({ url }) to resolve siteDir; default base is ~/Studio/_liberations/<host> |
| WXR file | output.wxr in the output directory |
| Extraction log | extraction-log.jsonl in the output directory |
| Source URL | From the WXR's <link> element or ask the user |
Start with liberate_verify — it gives you a structured overview in one call:
This replaces manual log grepping for the initial assessment. If you need more detail, then dig into the raw log:
# Count successes vs failures
grep -c '"type":"processed"' <outputDir>/extraction-log.jsonl
grep -c '"type":"failed"' <outputDir>/extraction-log.jsonl
grep -c '"type":"media_failed"' <outputDir>/extraction-log.jsonl
A. High failure rate (>30% failed) Something systematic is wrong — the site is blocking requests, the adapter can't parse the platform, or there's an auth issue.
B. Low failure rate (<30%) with specific pages failing Individual page issues — timeouts, unusual page structures, dynamic content.
C. No failures but low quality content The adapter extracted something but it's the wrong content — nav bars, footers, cookie banners instead of the actual page body.
D. Crash / incomplete extraction The process died mid-way. Check for the lock file, partial WXR, and the last log entry.
E. Missing or incorrect products
Products were expected but products.csv is missing, empty, or has wrong data.
Read the error messages from failed entries:
grep '"type":"failed"' extraction-log.jsonl | head -5
Common causes and fixes:
| Error pattern | Cause | Fix |
|---|---|---|
timeout / AbortError | Site is slow or blocking | Increase --delay, try with browser via --cdp-port |
403 Forbidden | Rate limiting or bot detection | Increase delay, use CDP with a real browser session |
404 Not Found | Stale sitemap, pages moved | Re-run discovery, check if site restructured |
TypeError: fetch failed | Network issue, wrong protocol | Check if site uses http vs https, check DNS |
Navigation failed | Playwright can't load the page | Check if site requires JavaScript, cookies, or auth |
Probe a failed URL manually:
curl -sI <failed-url> | head -20
Check: status code, redirects, Content-Type, security headers.
Deep browser probe (if the user has Chrome with CDP running):
Call liberate_probe with the CDP port and site URL. This connects to the browser and reports:
_BLOG_DATA, Shopify: Shopify.*, Squarespace: __NEXT_DATA__, Wix: __WIX_DATA__)This is especially useful for:
Check if the platform is detected correctly:
npx tsx src/cli.ts inspect <site-url>
If detection is wrong, the wrong adapter is running.
Group failures by error type:
grep '"type":"failed"' extraction-log.jsonl | jq -r .error | sort | uniq -c | sort -rn
Spot-check the worst offenders — fetch the URL manually and compare against what the adapter tried to do.
Check for pattern: Are all failures the same URL type (e.g. all blog posts fail but pages succeed)? This points to a type-specific extraction bug.
Run /qa to compare WXR content against the origin site. This gives per-page quality grades.
Read a few low-scoring pages from the WXR:
Check the adapter's content selector. Each adapter targets specific HTML containers:
?format=json API or admin API via CDP.w-richtext containersarticle or .rte containerswindow._BLOG_DATA and convert Draft.js post.fullContent to HTML; pages strip HEADER_SECTION / FOOTER_* / section-title / hero-image widgets from the DOMIf the site uses a non-standard template, the selector may miss the content.
Fetch the origin page and inspect its structure:
curl -s <page-url> | grep -o '<main\|<article\|class="content\|class="post-body\|class="entry-content' | head -10
.liberation-lock in the output directory means the process didn't clean up.</channel></rss>).--resume.Check if products.csv and products.jsonl exist:
ls -la <outputDir>/products.csv <outputDir>/products.jsonl
If both are missing — no products were detected during extraction. Investigate:
@type: Product? Fetch a product page and check:
curl -s <product-url> | grep -o 'application/ld+json' | head -3
curl -s <product-url> | grep -o '"@type":"Product"'
extractProduct function in its adapter.product type? Check classifyUrl in src/lib/extraction/sitemap.ts for the URL patterns it recognizes.If products.jsonl exists but products.csv is missing or empty — the JSONL→CSV conversion failed. Read products.jsonl to check data quality:
head -3 <outputDir>/products.jsonl | jq .
Check: do products have names? Prices? Are fields malformed?
If products.csv exists but data is wrong:
offers array may be structured differently than expected. Fetch a product page and inspect the JSON-LD.ld.image as strings, objects with .url, or in a different field./adapt).extractProduct is passed to runExtractionLoop alongside the generic fallback.Check product count vs expectations:
wc -l <outputDir>/products.jsonl
grep -c '"type":"product"' <outputDir>/extraction-log.jsonl || echo "no product type in log"
Based on the diagnosis:
If the content selector is wrong for this site's template:
extractPage function--resumeIf the issue is rate limiting, timeouts, or auth:
--delay value--cdp-port with an authenticated browser session--token if the platform supports API keysIf the WXR has issues but re-extraction isn't needed:
/qa to identify and patch specific content gapsAfter applying fixes:
--resume (only re-processes failed URLs)/qa to check content qualityIf you discovered a platform-specific issue or workaround:
DISCOVERIES.md entry# Overview of extraction results
wc -l <outputDir>/extraction-log.jsonl
grep -c '"processed"' <outputDir>/extraction-log.jsonl
grep -c '"failed"' <outputDir>/extraction-log.jsonl
# Most common errors
grep '"failed"' <outputDir>/extraction-log.jsonl | grep -o '"error":"[^"]*"' | sort | uniq -c | sort -rn
# Slowest pages
grep '"processed"' <outputDir>/extraction-log.jsonl | grep -o '"durationMs":[0-9]*' | sort -t: -k2 -rn | head -10
# Check WXR size and item count
wc -c <outputDir>/output.wxr
grep -c '<item>' <outputDir>/output.wxr
# Check media downloads
ls <outputDir>/media/ | wc -l
grep -c '"media_failed"' <outputDir>/extraction-log.jsonl
# Check if extraction is complete
test -f <outputDir>/.discovery-complete && echo "Complete" || echo "Incomplete"
# Product diagnostics
wc -l <outputDir>/products.jsonl 2>/dev/null || echo "No products.jsonl"
wc -l <outputDir>/products.csv 2>/dev/null || echo "No products.csv"
head -3 <outputDir>/products.jsonl 2>/dev/null | python3 -m json.tool 2>/dev/null || true