#614 by GitHub stars

boyang-hu/website-rebuild-skill

复刻网站的 Agent Skill:抓只读镜像、从压缩代码逐行还原、自动比对验收。An agent skill that mirrors a website, rebuilds it from the minified code, and verifies the result with automated diffs.

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

skills/website-rebuild/SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Network or broad shell → After Network or broad shell

ac60c9d8a2ab → ac60c9d8a2ab

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Network or broad shell

First observation → ac60c9d8a2ab

No earlier version was observed for comparison.

Compare on GitHub

skills/website-rebuild/references/case-studies/SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Network or broad shell → After Network or broad shell

ac60c9d8a2ab → ac60c9d8a2ab

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Network or broad shell

First observation → ac60c9d8a2ab

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit ac60c9d8a2ab40045a89b5403c3457f1404e92b3

1.6kGitHub stars
42stars in 7 days
2skills in this repository
3commits in 30 days

Heat

6.7
  • Star growth, last 7 daysAhead of 93% of tracked repositories
  • Star growth, last 24 hoursAhead of 85% of tracked repositories
  • Rank movement, last 7 daysAhead of 43% of tracked repositories
  • Commits, last 30 daysAhead of 64% of tracked repositories
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekAhead of 0% of tracked repositories

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Aug 9, 2026Nov 6, 20261,636

Individual skills in this repository

How it works

website-rebuild

When your agent uses it

1:1 rebuild of award-winning creative websites (WebGL / scroll-animation / portfolio sites). Evidence-driven pipeline - mirror-first forensics, line-number-traceable reverse engineering of minified bundles, verbatim porting, quantitative verification gates. Use when user asks to "复刻网站", "重建网站", "1:1 rebuild", "clone this site", or provides a URL of a creative/award site to reproduce.

What it loads into context

Frontmatter

234 tokens

Always available to the agent

SKILL.md

12,818 tokens

When the skill is activated

Reference documents

215,806 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. 使用前提与授权 ⛔ 必读
  2. 适用范围 ⛔ 必读
  3. User Input Tools
  4. 宪法(六条纪律,全程有效)
  5. Workflow
  6. Script Directory
  7. 复刻工程目录结构
  8. References
  9. Notes

Scripts executed separately

  • scripts/beautify-bundle.mjs
  • scripts/build-site.mjs
  • scripts/census-bundles.mjs
  • scripts/closure.mjs
  • scripts/cold-audit-decls.mjs
  • scripts/cold-audit-modules.mjs
  • scripts/crossside.config.example.mjs
  • scripts/dump-timelines.mjs
  • scripts/emit-webpack-chunk.mjs
  • scripts/extract-source.mjs
  • scripts/fingerprint.mjs
  • scripts/flight-decode.mjs
  • scripts/frame-census.mjs
  • scripts/gapfill-video.mjs
  • scripts/harvest-cases.mjs
  • scripts/harvest.config.example.mjs
  • scripts/lib/cdp.mjs
  • scripts/lib/chrome.mjs
  • scripts/lib/cli.mjs
  • scripts/lib/extract-refs.mjs
  • scripts/lib/flight.mjs
  • scripts/lib/hash.mjs
  • scripts/lib/ledger.mjs
  • scripts/lib/negotiate.mjs
  • scripts/lib/npx.mjs
  • scripts/lib/png.mjs
  • scripts/lib/ports.mjs
  • scripts/lib/shell-build.mjs
  • scripts/lib/tokens.mjs
  • scripts/lib/urlpath.mjs
  • scripts/lib/version.mjs
  • scripts/mirror-site.mjs
  • scripts/module-map.mjs
  • scripts/netcapture.mjs
  • scripts/pixel-walk.mjs
  • scripts/pixelcompare.mjs
  • scripts/probe-shim.js
  • scripts/probe.mjs
  • scripts/reconcile-gaps.mjs
  • scripts/serve.mjs
  • scripts/shell-config.example.mjs
  • scripts/side-by-side.mjs
  • scripts/slice-esm.mjs
  • scripts/slice-modules.mjs
  • scripts/slices.config.example.mjs
  • scripts/sweep-routes.mjs
  • scripts/verify-crossside.mjs
  • scripts/verify-flight.mjs
  • scripts/verify-fresh.mjs
  • scripts/verify-harvest.mjs
  • scripts/verify-lenprefix.mjs
  • scripts/verify-mirror.mjs
  • scripts/verify-module-map.mjs
  • scripts/verify-nextdata.mjs
  • scripts/verify-offline.mjs
  • scripts/verify-payload.mjs
  • scripts/verify-reassembly.mjs
  • scripts/verify-refs-served.mjs
  • scripts/verify-routes.mjs
  • scripts/verify-shell.mjs
  • scripts/verify-ssr.mjs
  • scripts/verify-standalone.mjs
  • scripts/verify-symbols.mjs
  • scripts/verify-tokens.mjs
  • scripts/verify-tween.mjs
  • scripts/verify-zerodep.mjs
  • scripts/wayback-mirror.mjs
  • tools/accept-names.mjs
  • tools/assemble-static.mjs
  • tools/flight-to-mdx.mjs
  • tools/group-parts.mjs
  • tools/harvest-optimized-images.mjs
  • tools/make-standalone.mjs
  • tools/modules-to-src.mjs
  • tools/name-modules.mjs
  • tools/package.json
  • tools/sourcify-chunk.mjs
  • tools/verify-fresh-next.mjs

Files

  • SKILL.mdcore41,740 bytes
  • SKILL.mdcore41,740 bytes
  • assets/templates/engine-notes.mddoc6,394 bytes
  • assets/templates/rebuild-plan.mddoc6,418 bytes
  • references/animation-recovery.mddoc13,069 bytes
  • references/archival-rescue.mddoc10,331 bytes
  • references/asset-management.mddoc10,842 bytes
  • references/beyond-the-rebuild.mddoc4,337 bytes
  • references/binary-formats.mddoc9,457 bytes
  • references/determinism.mddoc52,645 bytes
  • references/dom-shell-strategies.mddoc32,121 bytes
  • references/environment-traps.mddoc24,435 bytes
  • references/gate-case-design.mddoc13,957 bytes
  • references/gate-failure-modes.mddoc38,218 bytes
  • references/legal-and-deploy.mddoc50,345 bytes
  • references/mirroring.mddoc51,103 bytes
  • references/payload-gates.mddoc7,868 bytes
  • references/porting-discipline.mddoc48,803 bytes
  • references/readable-source.mddoc53,147 bytes
  • references/recon-and-rating.mddoc13,135 bytes
  • references/reverse-engineering.mddoc37,820 bytes
  • references/rsc-reconstruction.mddoc12,566 bytes
  • references/sanity-platform.mddoc14,509 bytes
  • references/scope-and-fingerprint.mddoc25,199 bytes
  • references/shopify-platform.mddoc36,716 bytes
  • references/verification-gates.mddoc67,341 bytes
  • references/webgl-scenes.mddoc12,588 bytes
  • scripts/README.mddoc30,438 bytes
  • scripts/beautify-bundle.mjsruns12,071 bytes
  • scripts/build-site.mjsruns7,086 bytes
  • scripts/census-bundles.mjsruns6,048 bytes
  • scripts/closure.mjsruns5,168 bytes
  • scripts/cold-audit-decls.mjsruns16,599 bytes
  • scripts/cold-audit-modules.mjsruns16,401 bytes
  • scripts/crossside.config.example.mjsruns3,229 bytes
  • scripts/dump-timelines.mjsruns4,340 bytes
  • scripts/emit-webpack-chunk.mjsruns7,313 bytes
  • scripts/extract-source.mjsruns16,009 bytes
  • scripts/fingerprint.mjsruns20,950 bytes
  • scripts/flight-decode.mjsruns12,834 bytes
  • scripts/frame-census.mjsruns2,602 bytes
  • scripts/gapfill-video.mjsruns14,661 bytes
  • scripts/harvest-cases.mjsruns7,142 bytes
  • scripts/harvest.config.example.mjsruns6,306 bytes
  • scripts/lib/cdp.mjsruns5,717 bytes
  • scripts/lib/chrome.mjsruns26,004 bytes
  • scripts/lib/cli.mjsruns5,799 bytes
  • scripts/lib/extract-refs.mjsruns35,565 bytes
  • scripts/lib/flight.mjsruns6,071 bytes
  • scripts/lib/hash.mjsruns1,420 bytes
  • scripts/lib/ledger.mjsruns7,735 bytes
  • scripts/lib/negotiate.mjsruns8,095 bytes
  • scripts/lib/npx.mjsruns1,311 bytes
  • scripts/lib/png.mjsruns8,135 bytes
  • scripts/lib/ports.mjsruns20,828 bytes
  • scripts/lib/shell-build.mjsruns12,918 bytes
  • scripts/lib/tokens.mjsruns2,022 bytes
  • scripts/lib/urlpath.mjsruns18,088 bytes
  • scripts/lib/version.mjsruns367 bytes
  • scripts/mirror-site.mjsruns30,529 bytes
  • scripts/module-map.mjsruns37,240 bytes
  • scripts/netcapture.mjsruns25,695 bytes
  • scripts/pixel-walk.mjsruns17,659 bytes
  • scripts/pixelcompare.mjsruns42,619 bytes
  • scripts/probe-shim.jsruns12,578 bytes
  • scripts/probe.mjsruns21,092 bytes
  • scripts/reconcile-gaps.mjsruns6,802 bytes
  • scripts/serve.mjsruns49,008 bytes
  • scripts/shell-config.example.mjsruns4,811 bytes
  • scripts/side-by-side.mjsruns6,414 bytes
  • scripts/slice-esm.mjsruns11,578 bytes
  • scripts/slice-modules.mjsruns16,009 bytes
  • scripts/slices.config.example.mjsruns5,943 bytes
  • scripts/sweep-routes.mjsruns14,808 bytes
  • scripts/verify-crossside.mjsruns10,676 bytes
  • scripts/verify-flight.mjsruns23,883 bytes
  • scripts/verify-fresh.mjsruns6,792 bytes
  • scripts/verify-harvest.mjsruns6,143 bytes
  • scripts/verify-lenprefix.mjsruns8,370 bytes
  • scripts/verify-mirror.mjsruns54,488 bytes
  • scripts/verify-module-map.mjsruns10,632 bytes
  • scripts/verify-nextdata.mjsruns6,515 bytes
  • scripts/verify-offline.mjsruns6,805 bytes
  • scripts/verify-payload.mjsruns15,783 bytes
  • scripts/verify-reassembly.mjsruns4,526 bytes
  • scripts/verify-refs-served.mjsruns5,264 bytes
  • scripts/verify-routes.mjsruns9,737 bytes
  • scripts/verify-shell.mjsruns8,810 bytes
  • scripts/verify-ssr.mjsruns6,308 bytes
  • scripts/verify-standalone.mjsruns10,267 bytes
  • scripts/verify-symbols.mjsruns9,147 bytes
  • scripts/verify-tokens.mjsruns2,676 bytes
  • scripts/verify-tween.mjsruns10,304 bytes
  • scripts/verify-zerodep.mjsruns4,157 bytes
  • scripts/wayback-mirror.mjsruns25,659 bytes
  • tools/README.mddoc6,339 bytes
  • tools/accept-names.mjsruns1,686 bytes
  • tools/assemble-static.mjsruns2,862 bytes
  • tools/flight-to-mdx.mjsruns28,665 bytes
  • tools/group-parts.mjsruns5,739 bytes
  • tools/harvest-optimized-images.mjsruns3,577 bytes
  • tools/make-standalone.mjsruns27,014 bytes
  • tools/modules-to-src.mjsruns16,723 bytes
  • tools/name-modules.mjsruns24,434 bytes
  • tools/package.jsonruns613 bytes
  • tools/sourcify-chunk.mjsruns3,551 bytes
  • tools/verify-fresh-next.mjsruns3,708 bytes
Read SKILL.md

# Website Rebuild(获奖创意站 1:1 复刻)

把一个获奖创意网站(WebGL / 滚动叙事 / 作品集站)以**取证式方法**复刻为可独立运行、可验证还原度的工程。不是"看着像"的仿制——是以源站 bundle 为唯一规格书、以量化验收门收口的逐行为移植。

本方法论提炼自六个连续实践项目(工期从 6.5 周收敛到 1 天),后经 **22 个完整复刻 + 5 个死站存档抢救**持续回填、43 站边界探测实测校准适用范围(清单见仓库 README「已验证过的网站」)。

## 使用前提与授权 ⛔ 必读

本 skill 面向**学习与研究目的**的保真复刻,用于研究获奖创意站的实现手法。适用对象是你**自有的、已获授权的,或公开可访问且允许学习临摹**的网站。它不是用于未授权地采集受保护内容、规避访问控制、或商业性盗用他人作品的工具。

执行时遵守下列边界:
- **尊重目标站规则**:遵守其 `robots.txt`、服务条款与版权;抓取保持低频、单会话,不对目标站施加异常负载。⛔ **`robots.txt` 是逐路径的许可声明,不是全站开关**——逐 URL 判定(选组 → 最长匹配 → 无匹配即允许),**不得因为存在任何 `Disallow` 行就判"整站禁止"**(几乎每个商业站都有 `/cart`、`/checkout`、`/admin` 的 `Disallow`);禁令要按行为类别归类,**只有针对"抓取"的禁令才影响镜像范围**,针对交易的禁令只意味着"别去点结账"。⭐ **"读不懂 / 拿不准"不等于"禁止"**:走呈交,不走停工,更不自行缩小抓取范围。读法见 [references/legal-and-deploy.md](references/legal-and-deploy.md) §0.3。
- **不触碰受保护边界**:不采集需要登录态、付费墙或授权才能访问的内容;本 skill 只处理匿名可公开访问的资源。若目标站明确禁止此类复制,停止并告知用户——**何为"明确禁止"见 `legal-and-deploy.md` §0.3.6 写死的四条门槛,其余一切不确定性走呈交不走停工**。
- **产出默认私有**:默认 noindex、不公开部署。任何公开前必须完成逐资产版权取证,并显著标注"非官方复刻"与原作者归属(见 [references/legal-and-deploy.md](references/legal-and-deploy.md))。
View the complete source on GitHub

Skills included

  • website-rebuild

Repository facts

License
MIT
Created
Aug 11, 2026
Last pushed
Oct 12, 2026
Forks
288
Open issues
0
Project activity
Active

Rank over the last 12 weeks

Now #614 · best #533 · down 54 in 30 days

  1. #607 on Oct 31
  2. #610 on Nov 1
  3. #613 on Nov 2
  4. #614 on Nov 3
  5. #613 on Nov 4
  6. #614 since Nov 5
69 earlier periods
  1. #894 on Aug 9
  2. #915 on Aug 10
  3. #921 on Aug 11
  4. #918 on Aug 12
  5. #927 on Aug 13
  6. #900 on Aug 14
  7. #870 on Aug 15
  8. #892 on Aug 16
  9. #915 on Aug 23
  10. #926 on Aug 24
  11. #919 on Aug 26
  12. #869 on Aug 30
  13. #835 on Aug 31
  14. #769 on Sep 1
  15. #684 on Sep 2
  16. #670 on Sep 3
  17. #635 on Sep 4
  18. #629 on Sep 5
  19. #635 on Sep 6
  20. #636 on Sep 7
  21. #645 on Sep 8
  22. #623 on Sep 9
  23. #622 on Sep 10
  24. #577 on Sep 11
  25. #573 on Sep 12
  26. #562 on Sep 13
  27. #583 on Sep 14
  28. #567 on Sep 15
  29. #577 on Sep 16
  30. #571 on Sep 17
  31. #567 on Sep 18
  32. #545 on Sep 19
  33. #551 on Sep 20
  34. #556 on Sep 21
  35. #564 on Sep 22
  36. #556 on Sep 23
  37. #541 on Sep 24
  38. #535 on Sep 25
  39. #538 on Sep 26
  40. #552 on Sep 27
  41. #550 on Sep 28
  42. #569 on Sep 29
  43. #556 on Sep 30
  44. #545 on Oct 1
  45. #551 on Oct 2
  46. #533 on Oct 3
  47. #536 on Oct 4
  48. #545 on Oct 5
  49. #557 on Oct 6
  50. #560 on Oct 7
  51. #581 on Oct 8
  52. #575 on Oct 9
  53. #556 from Oct 10 to Oct 11
  54. #566 on Oct 12
  55. #565 on Oct 13
  56. #570 on Oct 14
  57. #564 on Oct 15
  58. #556 on Oct 16
  59. #546 on Oct 17
  60. #543 on Oct 18
  61. #561 on Oct 19
  62. #565 on Oct 20
  63. #571 on Oct 21
  64. #559 on Oct 22
  65. #552 on Oct 23
  66. #542 on Oct 24
  67. #603 on Oct 25
  68. #609 on Oct 28
  69. #606 from Oct 29 to Oct 30

Before you install

Network or broad shell

Automated signals, not a guarantee

Checked Nov 3, 2026

Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.

Show 1 note
  • skills/website-rebuild/SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
Show all 503 signals by file

skills/website-rebuild/references/archival-rescue.md

  • Network accessline 15
    1. ⭐ **只取原始字节**:一切抓取走 `id_`(identity)回放旗——    `https://web.archive.org/web/<ts>id_/<原URL>` 返回捕获的原始字节,无改写、无工具条。
  • Network accessline 16
    `https://web.archive.org/web/<ts>id_/<原URL>` 返回捕获的原始字节,无改写、无工具条。

skills/website-rebuild/references/case-studies/gate-failure-modes.md

  • Network accessline 159
    删掉那条 `<link rel=preload href="…googletagmanager…">` 之后,`verify-offline` 的 class 1 变绿了。 **而真正的外联还在**:载荷里有个 `next/script` 描述符,水合时会注入 `<script src="https://www.googletagmanager.com/gtag/js?id=…">`,再由它拉起
  • Network accessline 160
    **而真正的外联还在**:载荷里有个 `next/script` 描述符,水合时会注入 `<script src="https://www.googletagmanager.com/gtag/js?id=…">`,再由它拉起 `analytics.google.com` 与 `stats.g.doubleclick.net`。探针的 `external requests` 一直在报这三条。
  • Network accessline 161
    `<script src="https://www.googletagmanager.com/gtag/js?id=…">`,再由它拉起

skills/website-rebuild/references/case-studies/mirroring.md

  • Network accessline 153
    - **种子**:全部已知页面路由 + 已知关键资产路径(rogier 60 个初始路径;lando 从 `/` 爬 7 页并用 `/404-page-not-found` 探测出 404 模板)。 - **提取正则集**:对每个文本响应(HTML/JS/CSS/SVG/JSON)提取 `href/src/poster/content` 属性、CSS `url()`、动态 `import()`、`new Worker("...")`、`fetch("...")`、资产目录前缀
  • Network accessline 154
    - **提取正则集**:对每个文本响应(HTML/JS/CSS/SVG/JSON)提取 `href/src/poster/content` 属性、CSS `url()`、动态 `import()`、`new Worker("...")`、`fetch("...")`、资产目录前缀字面量(`/assets|_astro|audio|content|fonts|images|models|workers/` 类)、按扩展名白名单匹配的绝对 URL【rogier】【noomo】。
  • Network accessline 168
    - deck 深处资源(`about-us/process/step1..4.png` 等 6 个)靠解析 bundle 模板字面量补齐【kimi】。 - 基址变量拼接:lando 的 GL 资产基址 `vQ="https://lando.itsoffbrand.io/gl"`(4 GLB + 3 HDRI + 解码器 + MSDF 字体)与 Rive 基址 `mj=".../rive/"`(8 个 .riv)都是变量拼接,静态正则不可见——从 bundle 读出基址后枚举补
  • Network accessline 169
    - 基址变量拼接:lando 的 GL 资产基址 `vQ="https://lando.itsoffbrand.io/gl"`(4 GLB + 3 HDRI + 解码器 + MSDF 字体)与 Rive 基址 `mj=".../rive/"`(8 个 .riv)都是变量拼接,静态正则不可见——从 bundle 读出基址后枚举补抓【lando】。
  • Network accessline 240
    - [ ] **查询参数化的资产变换接口**:图片 CDN 把尺寸/裁剪/格式写在 query 里(`x.jpg?width=320|600|1200`、`?crop=center`、`&format=webp`),**同 pathname 不同字节**。按 pathname 落盘会让整组变体坍缩成一个文件,而下游零 404 门照样绿(§5.1)。做法:映射与落盘**查询感知**,并把"同 pathname 多变体"单独清点(objectandarchive:142 条 CD
  • Network accessline 242
    - [ ] **不带尾斜杠的裸主机基址常量**:代码常写 `const B="https://cdn.example.com"`、`window.shopUrl='https://site.com'` 再拼路径;只匹配"带尾斜杠"形式的提取/改写规则对它天然失明——objectandarchive 实测因此漏了 4 个遥测外联 + **2 个到线上源站的主题资产请求(那份资产一直在盘上)**。同类还有 JSON 转义的协议相对写法 `\/\/host\/`。做法:提取与改写规

skills/website-rebuild/references/case-studies/payload-gates.md

  • Network accessline 38
    <a href="https://host/">https://host/</a>

skills/website-rebuild/references/case-studies/sanity-platform.md

  • Network accessline 9
    - 图片:`https://cdn.sanity.io/images/<projectId>/<dataset>/<sha1-40>-<W>x<H>.<ext>[?w=&h=&fit=&auto=format…]`

skills/website-rebuild/references/case-studies/scope-and-fingerprint.md

  • Network accessline 11
    - **必须 GET,禁止用 HEAD(`curl -sIL`)作唯一判据**:API Gateway/CloudFront 前端对 HEAD 返回假 404(kprverse:HEAD 404 / GET 200)【probe】。
  • Network accessline 13
    - **最终 URL 同一性校验**:`final` 落点域 ≠ 目标域即 X 信号(darknetflix 301→netflix.com、umami-land 整域 301→google.com)【probe】。`curl -sIL` 表面 200 会掩盖 301 退役信号。
  • Network accessline 52
    **【lamalama】D 信号第 1 条按字面命中、理由不成立(2026-09-06)**:目标 `https://lamalama.com/` 本身就是 WordPress 页——generator meta `WPML ver:4.9.6` + `WP Rocket 3.23.1.1`,`wp-content` 出现 1,306 次,robots 是 Yoast 模板。但步骤 2 双抓 **byte-identical**(431,958 B,WP Rocket 页面缓

skills/website-rebuild/references/case-studies/scripts.md

  • Network accessline 43
    实测:它抓到两侧本地化实现不一致(一侧留 `href="http://host"`、另一侧写出 `href=""`),而外壳字节门全绿

skills/website-rebuild/references/case-studies/shopify-platform.md

  • Network accessline 65
    1. **D1a 同源绝对/协议相对 → 根相对**:`https://<host>/`、`http://<host>/`、`//<host>/` → `/`。**必须同时处理 JSON 转义形式** `https:\/\/<host>\/` → `\/`(内联 JSON-LD / 配置块里全是这种写法,漏了就留下真实外域引用)。**四种形态一个都不能少**:绝对 / 协议相对 / **转义绝对** `https:\/\/host\/` / **转义协议相对** `\/\/h
  • Network accessline 66
    2. **D1b 外部 Shopify CDN / 其它外部主机 → 本地目录**:`https://cdn.shopify.com/` 与 `//cdn.shopify.com/` → `/cdn-shopify/`(含转义形式),对应镜像的 `assets/cdn.shopify.com/` 树。**转义形式对外部主机同样成立,别只给源站主机开**:objectandarchive 的 D1a 一开始只处理了源站主机的转义写法,外部主机漏掉,5 页共 25 处 `"inp
  • Network accessline 67
    3. **D1c 裸主机基址常量 → 本地基址**【objectarchive】:遥测与主题代码常把基址写成**不带尾斜杠**的常量再拼路径(`"https://otlp-http-production.shopifysvc.com"`、`window.shopUrl='https://<host>'`)。只改写"带尾斜杠"形式时,objectandarchive 实测漏了 4 个遥测外联 + 2 个到线上源站的主题资产请求(那份资产一直在盘上)。**改写规则按主机匹配,不要

skills/website-rebuild/references/mirroring.md

  • Network accessline 87
    .../media/1f9dadf367424346-s.p.04       尾巴被切掉 https://host/static/media/9010da…       "/_next" 在上一个 push 里
  • Network accessline 88
    https://host/static/media/9010da…       "/_next" 在上一个 push 里
  • Network accessline 89
    https://host/9dc1a6fb114b646f-s.p…      整个路径前缀都在上一个 push 里
  • Network accessline 123
    `https://cdn.jsdelivr.net/npm/${pkg}@${ver}/dist/dotlottie-player.wasm`
  • Network accessline 126
    ⛔ 静态扫描读到的是 `https://cdn.jsdelivr.net/npm/$` —— 到第一个 `${` 为止的前缀。
  • Network accessline 232
    - **种子**:全部已知页面路由 + 已知关键资产路径。 - **提取正则集**:对每个文本响应(HTML/JS/CSS/SVG/JSON)提取 `href/src/poster/content` 属性、CSS `url()`、动态 `import()`、`new Worker("...")`、`fetch("...")`、资产目录前缀字面量(`/assets|_astro|audio|content|fonts|images|models|workers/` 类)、按扩展
  • Network accessline 233
    - **提取正则集**:对每个文本响应(HTML/JS/CSS/SVG/JSON)提取 `href/src/poster/content` 属性、CSS `url()`、动态 `import()`、`new Worker("...")`、`fetch("...")`、资产目录前缀字面量(`/assets|_astro|audio|content|fonts|images|models|workers/` 类)、按扩展名白名单匹配的绝对 URL【rogier】【noomo】。
  • Network accessline 413
    - [ ] **查询参数化的资产变换接口**:图片 CDN 把尺寸/裁剪/格式写在 query 里(`x.jpg?width=320|600|1200`、`?crop=center`、`&format=webp`),**同 pathname 不同字节**。按 pathname 落盘会让整组变体坍缩成一个文件,而下游零 404 门照样绿(§5.1)。做法:映射与落盘**查询感知**,并把"同 pathname 多变体"单独清点【objectarchive】 - [ ] **`s
  • Network accessline 415
    - [ ] **不带尾斜杠的裸主机基址常量**:代码常写 `const B="https://cdn.example.com"`、`window.shopUrl='https://site.com'` 再拼路径;只匹配"带尾斜杠"形式的提取/改写规则对它天然失明。同类还有 JSON 转义的协议相对写法 `\/\/host\/`。做法:提取与改写规则覆盖**裸主机 / 带尾斜杠 / 协议相对 / JSON 转义**四种形态,且**探针要报完整 URL 而不只是 host 直方图
  • Network accessline 425
    - ⭐ **同一个 403 有两种相反的药**:一族 CDN 缺 same-origin Referer 就 403(landonorris——于是爬虫带上了 Referer),另一族**带浏览器式请求头才 403、裸 curl 反而 200**(video.twimg.com,rauchg 实测)。单一请求头配置对其中一族永远是错的——`mirror-site.mjs` 的 get() 现在带**请求头梯子**:标准 profile 撞 401/403 时用最小 profi

skills/website-rebuild/references/payload-gates.md

  • Network accessline 17
    ⭐ **长度前缀行没有终止符。** 下一行的行首紧贴在声明的末尾——**长度本身就是分隔符**, 这正是它被写下来的全部理由。于是把 `https://media.host/x` 缩短成 `/ext/media.host/x`,
  • Network accessline 18
    这正是它被写下来的全部理由。于是把 `https://media.host/x` 缩短成 `/ext/media.host/x`,
  • Network accessline 70
    <link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=…">

skills/website-rebuild/references/porting-discipline.md

  • Network accessline 200
    6. ⭐ **Worker 对象上空字段的 error 事件,第一嫌疑是脚本 URL 本身**:worker    脚本加载失败产生的 error 事件没有 message/filename/lineno,长得和"跨域    脱敏"一模一样——先 curl 一下 worker 脚本 URL 再谈别的(basement 实测:
  • Network accessline 201
    脚本加载失败产生的 error 事件没有 message/filename/lineno,长得和"跨域    脱敏"一模一样——先 curl 一下 worker 脚本 URL 再谈别的(basement 实测:    构建重建吞掉软链 → 间歇 404 → 被误判为 draco 跨域错误登记了一轮)。
  • Network accessline 202
    脱敏"一模一样——先 curl 一下 worker 脚本 URL 再谈别的(basement 实测:

skills/website-rebuild/references/sanity-platform.md

  • Network accessline 19
    - 图片:`https://cdn.sanity.io/images/<projectId>/<dataset>/<sha1-40>-<W>x<H>.<ext>[?w=&h=&fit=&auto=format…]`
  • Network accessline 20
    (dataset 常为 `production`) - 文件/视频:`https://cdn.sanity.io/files/<projectId>/<dataset>/<sha1-40>.<ext>` - 内容 API:`https://<projectId>.api.sanity.io/v<日期>/data/query/<dataset>?query=<GROQ>`;
  • Network accessline 21
    - 文件/视频:`https://cdn.sanity.io/files/<projectId>/<dataset>/<sha1-40>.<ext>`

skills/website-rebuild/references/scope-and-fingerprint.md

  • Network accessline 25
    UA='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' TARGET='https://example.com/awarded-path'   # 必须是获奖/目标路径本身,不是只探根域
  • Network accessline 26
    TARGET='https://example.com/awarded-path'   # 必须是获奖/目标路径本身,不是只探根域
  • Network accessline 35
    curl -sL -A "$UA" -o probe/a.html \
  • Network accessline 39
    - **必须 GET,禁止用 HEAD(`curl -sIL`)作唯一判据**:API Gateway/CloudFront 前端对 HEAD 返回假 404【probe】。
  • Network accessline 41
    - **最终 URL 同一性校验**:`final` 落点域 ≠ 目标域即 X 信号【probe】。`curl -sIL` 表面 200 会掩盖 301 退役信号。
  • Network accessline 48
    sleep 5 curl -sL -A "$UA" -o probe/b.html "$TARGET"
  • Network accessline 49
    curl -sL -A "$UA" -o probe/b.html "$TARGET"
  • Network accessline 99
    BUNDLE='https://example.com/assets/main.xxxx.js' curl -s -A "$UA" -o probe/bundle.js -w 'size=%{size_download}\n' "$BUNDLE"
  • Network accessline 100
    curl -s -A "$UA" -o probe/bundle.js -w 'size=%{size_download}\n' "$BUNDLE"
  • Network accessline 101
    # 响应 <1KB → 极可能是缺 Referer 的拒绝页(landonorris 返回 32 字节拒绝页造成假阴性),补齐 Referer 重试 [ "$(wc -c < probe/bundle.js)" -lt 1024 ] && curl -s -A "$UA" -e "${TARGET%/*}/" -o probe/bundle.js "$BUNDLE" # minification 形态预检(未混淆产物可跳过 beautify,省一道工)
  • Network accessline 102
    [ "$(wc -c < probe/bundle.js)" -lt 1024 ] && curl -s -A "$UA" -e "${TARGET%/*}/" -o probe/bundle.js "$BUNDLE"
  • Network accessline 237
    1. 存活性判定到**路径粒度**,且用 GET 不用 HEAD(API 网关对 HEAD 假 404)。 2. `curl -sIL` 表面 200 会掩盖 301 退役信号——必须校验**最终 URL 与目标主体同一性**。
  • Network accessline 238
    2. `curl -sIL` 表面 200 会掩盖 301 退役信号——必须校验**最终 URL 与目标主体同一性**。

skills/website-rebuild/references/shopify-platform.md

  • Network accessline 124
    1. **D1a 同源绝对/协议相对 → 根相对**:`https://<host>/`、`http://<host>/`、`//<host>/` → `/`。**必须同时处理 JSON 转义形式** `https:\/\/<host>\/` → `\/`(内联 JSON-LD / 配置块里全是这种写法,漏了就留下真实外域引用)。**四种形态一个都不能少**:绝对 / 协议相对 / **转义绝对** `https:\/\/host\/` / **转义协议相对** `\/\/h
  • Network accessline 125
    2. **D1b 外部 Shopify CDN / 其它外部主机 → 本地目录**:`https://cdn.shopify.com/` 与 `//cdn.shopify.com/` → `/cdn-shopify/`(含转义形式),对应镜像的 `assets/cdn.shopify.com/` 树。**转义形式对外部主机同样成立,别只给源站主机开**【objectarchive】(实证:`case-studies/shopify-platform.md` §2;为什么每一道
  • Network accessline 126
    3. **D1c 裸主机基址常量 → 本地基址**【objectarchive】:遥测与主题代码常把基址写成**不带尾斜杠**的常量再拼路径(`"https://otlp-http-production.shopifysvc.com"`、`window.shopUrl='https://<host>'`)。**改写规则按主机匹配,不要求尾斜杠**(只匹配尾斜杠形式的漏网实证:`case-studies/shopify-platform.md` §2);验收侧的配套要求见 `m
  • Network accessline 127
    > **D1c 与"转义写法"是同族不同格,两格都要单独想过**:D1c 是**没有尾斜杠**(`"https://host"` + 代码自己拼路径),D1a/D1b 的转义形式是**斜杠被转义**(`https:\/\/host\/`)。两者都会让"只匹配 `https://host/`"的提取 / 改写 / 断言规则天然失明,且失明时的表现都是绿灯。断言面见 `verification-gates.md` §1.6(第 4 类给了可执行查法)。
  • Network accessline 147
    <link rel="preconnect" href="https://shop.app" crossorigin="anonymous">
  • Network accessline 148
    <link href="https://monorail-edge.shopifysvc.com" rel="dns-prefetch">
  • Network accessline 155
    - **弃单 beacon**:`pagehide` 监听器 → `navigator.sendBeacon("https://monorail-edge.shopifysvc.com/v1/produce", {schema_id:"online_store_buyer_site_abandonment/1.1", …})`。它自带 guard「performance 条目里没有 monorail 记录才发」——**离线复刻恰好满足该条件,所以是必发不是可能发**。load
  • Network accessline 158
    **③ 出站 `<a href>` 锚点** —— 如页脚的 `https://www.shopify.com/legal/privacy`。这是**源站内容**,按宪法第 3 条(源站有的都要有)**保留,不算外联**。断言脚本必须按元素类型判定,不能"字符串里含外部域即红",否则会逼出删内容的错误修法。
  • Network accessline 197
    2. **列主题资产**:`/cdn/shop/t/<N>/assets/` 下所有 js/css 全量下载;同时看是"单 bundle"还是"section 粒度多脚本"——这决定 M1 的坐标系粒度。**第三种可能:主题资产里根本没有承载签名行为的东西**(只有 vendor 与上游存量),行为全在页面内联块里 → 走 `reverse-engineering.md` §0.1 的**无 bundle 平行分支**建坐标系【objectarchive】。 3. **栈判定
  • Network accessline 199
    4. **抄近路检查**:有 sourcemap 就先 curl `.map` 验证可取(simply-chocolate 的 432KB map 带完整 `sourcesContent`);是 Dawn 或其 fork 就直接读 `github.com/Shopify/dawn`——这两种情况下 M1 的 beautify 环节近乎免费。**对 fork 站,读上游源码不只是抄近路,它同时是 §0.2 判据 1 的对照基准**(拿哪个版本对照由第 1 步的血统年代决定)【o
  • Network accessline 209
    const ports = [5173, 5174, 5175];            // 另一块是 [5176, 5177]   (async () => {     for (const port of ports) { try { await import(`http://localhost:${port}/src/main.ts`); return; } catch {} }
  • Network accessline 210
    (async () => {     for (const port of ports) { try { await import(`http://localhost:${port}/src/main.ts`); return; } catch {} }     console.warn('[Carousel3D] Vite dev server not found, falling back to asset');
  • Network accessline 211
    for (const port of ports) { try { await import(`http://localhost:${port}/src/main.ts`); return; } catch {} }

skills/website-rebuild/references/verification-gates.md

  • Network accessline 191
    | **2 内联自包含遥测** | 遥测实现整段内联在 HTML 里,不依赖被 stub 的外部脚本;`sendBeacon`/`fetch` 直打绝对外部域 | grep 构建产物里的外部绝对 URL 字符串,逐条判定是否可触发 | | **3 兜底路径外联** | 只在某脚本加载失败时才触发,正常跑不出现 | 读代码判定触发条件,不能只靠跑一遍 | | **4 转义的绝对写法**:`https:\/\/host\/…`、`\/\/host\/…`(JSON 字符串里的斜杠
  • Network accessline 193
    | **4 转义的绝对写法**:`https:\/\/host\/…`、`\/\/host\/…`(JSON 字符串里的斜杠转义)【objectarchive】 | **双重隐身**:① 探针看不见——这类字节多半躺在 JSON 载荷 / 结构化数据里,宿主 DOM 不渲染就永远不发请求(甚至根本不是请求);② **静态面也看不见**——`grep 'https://host'` 一条都不命中,于是"外部绝对 URL 清单"看起来是空的 | 按下面的三步查:**先按四种拼写 
  • Network accessline 197
    **它与 `shopify-platform.md` §2 D1c 是同族不同格**:D1c 讲的是基址常量**没有尾斜杠**(`"https://host"` 再由代码拼路径),本格讲的是**斜杠被转义**(`https:\/\/host\/`)。两格的共同点是让"只匹配 `https://host/`"的提取 / 改写 / 断言规则天然失明,**且失明时的表现都是绿灯**。

skills/website-rebuild/scripts/README.md

  • Network accessline 154
    - **dump-scene-graph.mjs(运行时场景图 dump 成数值账本)**——评估后不纳入:shopifydesign 那份是源站 bundle 里某个内部函数的逐字转写,换个站点连挂载点都不存在。范式(先 dump 源站数值再移植再数值验收)已由 `dump-timelines.mjs` 代表;需要时按目标站的引擎重写一份。 - **rogier 的 capture.mjs / analyze-home-bands.mjs**(行亮度剖面分析)——依赖 sh
  • Network accessline 155
    - **rogier 的 capture.mjs / analyze-home-bands.mjs**(行亮度剖面分析)——依赖 sharp,违反零依赖哲学,未纳入;等价能力可用 `lib/png.mjs` + 自写剖面重做。 - **racingshop 的 gapfill.mjs(协议相对 URL 归一重解)**——评估后不纳入:它修的是爬虫把 `//host/path` 拼成 `https://origin//host/path` 的 bug,而 `mirror-sit
  • Network accessline 156
    - **racingshop 的 gapfill.mjs(协议相对 URL 归一重解)**——评估后不纳入:它修的是爬虫把 `//host/path` 拼成 `https://origin//host/path` 的 bug,而 `mirror-site.mjs` 已在提取阶段就把协议相对 URL 归一成 `https://host/path`,根因不再产生,留着只会诱导别人跑一个针对不存在故障的补丁。若历史镜像里已有这类损坏条目,一次性重解那份 manifest 即可,不需

skills/website-rebuild/scripts/beautify-bundle.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/build-site.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/census-bundles.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/closure.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/cold-audit-decls.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/cold-audit-modules.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/crossside.config.example.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/dump-timelines.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/emit-webpack-chunk.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/extract-source.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/fingerprint.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 2
    // fingerprint.mjs — Step 0 指纹侦察(references/scope-and-fingerprint.md §2 的 // 六步 curl 协议)的跨平台等价实现。为无 POSIX 工具链的环境而写:Windows
  • Network accessline 3
    // 六步 curl 协议)的跨平台等价实现。为无 POSIX 工具链的环境而写:Windows
  • Network accessline 9
    //    的行都只是把 §3 的硬判据对应的证据摆到你面前,不替你下结论。 // //   node fingerprint.mjs --target https://example.com/awarded-path \
  • Network accessline 10
    // //   node fingerprint.mjs --target https://example.com/awarded-path \ //        [--bundle https://example.com/assets/main.xxx.js[,more.js]] \
  • Network accessline 11
    //   node fingerprint.mjs --target https://example.com/awarded-path \
  • Network accessline 12
    //        [--bundle https://example.com/assets/main.xxx.js[,more.js]] \
  • Network accessline 33
    // 中文规格(自 scripts/README.md 迁入,v0.3.21;本表另一拼写:`fingerprint.mjs`) // Step 0 六步探测协议的跨平台等价实现(GET 存活 + 重定向链与终点域同一性、双抓 diff、物种/年代、HTML 技术指纹、bundle 初检;出现次数计数与 <1KB Referer 重试内置;Sanity CMS 证据采集——projectId/dataset/API 主机/auto=format/_key,三种拼写归一,命中即
  • Network accessline 34
    // Step 0 六步探测协议的跨平台等价实现(GET 存活 + 重定向链与终点域同一性、双抓 diff、物种/年代、HTML 技术指纹、bundle 初检;出现次数计数与 <1KB Referer 重试内置;Sanity CMS 证据采集——projectId/dataset/API 主机/auto=format/_key,三种拼写归一,命中即指路 sanity-platform.md)。**只采证据不出判级**——判级仍走 scope-and-fingerprint.m
  • Network accessline 35
    // Step 0 指纹侦察(`references/scope-and-fingerprint.md` §2 六步 curl 协议)的跨平台等价——无 POSIX 工具链(Windows PowerShell 无 curl/cmp/fold/tr/perl)也能跑:GET 存活 + 手动重定向链与终点域同一性、双抓确定性 diff、物种/年代 grep、HTML 技术指纹(剥注释枚举 `<script src>`/内联 `import()`、框架模式×引擎范式标记,计数一律
  • Network accessline 36
    // `node fingerprint.mjs --target https://example.com/awarded-path --bundle https://example.com/assets/main.xxx.js`
  • Network accessline 85
    const t0 = performance.now();   for (let i = 0; i < 10; i++) {     const res = await fetch(cur, {
  • Network accessline 86
    for (let i = 0; i < 10; i++) {     const res = await fetch(cur, {       redirect: "manual",
  • Network accessline 87
    const res = await fetch(cur, {

skills/website-rebuild/scripts/flight-decode.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/frame-census.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/gapfill-video.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 10
    *  * Usage:  *   node gapfill-video.mjs --master https://cdn.example.com/vp/<id>/<id>.m3u8
  • Network accessline 11
    * Usage:  *   node gapfill-video.mjs --master https://cdn.example.com/vp/<id>/<id>.m3u8  *     [--out mirror]        mirror root (must match mirror-site.mjs)
  • Network accessline 12
    *   node gapfill-video.mjs --master https://cdn.example.com/vp/<id>/<id>.m3u8
  • Network accessline 13
    *     [--out mirror]        mirror root (must match mirror-site.mjs)  *     [--origin https://example.com]  same-origin path rule + Referer header;  *                                     defaults to the first master's origin
  • Network accessline 14
    *     [--origin https://example.com]  same-origin path rule + Referer header;
  • Network accessline 45
    * HLS/DASH 流媒体阶梯补录(master → rendition → 分片),静态爬虫的结构性盲区  * HLS 流媒体阶梯补录:master m3u8 → 递归取 variant/备用音轨/I-frame 播放列表 → 逐段下载 `.ts`/`.m4s`(含 EXT-X-MAP 初始化段、EXT-X-KEY)→ 追加进 manifest 账本。补的是静态爬虫的结构性盲区:HTML 里只有 master,其余全由播放器运行时 fetch,只有探针 404 才暴露(`
  • Network accessline 46
    * HLS 流媒体阶梯补录:master m3u8 → 递归取 variant/备用音轨/I-frame 播放列表 → 逐段下载 `.ts`/`.m4s`(含 EXT-X-MAP 初始化段、EXT-X-KEY)→ 追加进 manifest 账本。补的是静态爬虫的结构性盲区:HTML 里只有 master,其余全由播放器运行时 fetch,只有探针 404 才暴露(`serve.mjs` 的 MIME 表已含 `.m3u8`/`.ts`/`.m4s`/`.mpd`,补录后即可本
  • Network accessline 47
    * `node gapfill-video.mjs --master https://cdn.x.com/vp/<id>/<id>.m3u8 --origin https://example.com`(`--dry-run` 先看阶梯全貌)
  • Network accessline 95
    if (!MASTERS.length) {   console.error(     'usage: gapfill-video.mjs --master https://cdn.example.com/vp/id/id.m3u8 [--out mirror]\n' +
  • Network accessline 96
    console.error(     'usage: gapfill-video.mjs --master https://cdn.example.com/vp/id/id.m3u8 [--out mirror]\n' +       '       [--origin https://example.com] [--workers 4] [--delay 60] [--force] [--dry-run] [--manifest path]'
  • Network accessline 97
    'usage: gapfill-video.mjs --master https://cdn.example.com/vp/id/id.m3u8 [--out mirror]\n' +
  • Network accessline 98
    '       [--origin https://example.com] [--workers 4] [--delay 60] [--force] [--dry-run] [--manifest path]'
  • Network accessline 135
    async function get(url) {   const res = await fetch(url, {
  • Network accessline 136
    const res = await fetch(url, {

skills/website-rebuild/scripts/harvest-cases.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 98
    eval(s.js);

skills/website-rebuild/scripts/harvest.config.example.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/cdp.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 34
    for (let i = 0; i < attempts; i++) {     try {       const res = await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) });
  • Network accessline 35
    try {       const res = await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) });       const { webSocketDebuggerUrl } = await res.json();
  • Network accessline 36
    const res = await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) });

skills/website-rebuild/scripts/lib/chrome.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 259
    // writing into it, so rm throws ENOTEMPTY and a passing run exits non-zero

skills/website-rebuild/scripts/lib/cli.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/extract-refs.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 19
    // // Shapes covered, and why each one is here: //   1. absolute            https://host/path
  • Network accessline 20
    // Shapes covered, and why each one is here: //   1. absolute            https://host/path //   2. protocol-relative   //host/path        (quoted or parenthesised)
  • Network accessline 21
    //   1. absolute            https://host/path
  • Network accessline 301
    * Build an extractor bound to one site.  *  *   origin      "https://example.com" (no trailing slash) — base for root-relative refs
  • Network accessline 302
    *  *   origin      "https://example.com" (no trailing slash) — base for root-relative refs  *   originHost  hostname of the origin
  • Network accessline 303
    *   origin      "https://example.com" (no trailing slash) — base for root-relative refs
  • Network accessline 347
    // ⛔ A TEMPLATE PREFIX IS NOT AN ADDRESS. A URL assembled at runtime —     //     `https://cdn.jsdelivr.net/npm/${pkg}@${ver}/dist/x.wasm`
  • Network accessline 348
    //     `https://cdn.jsdelivr.net/npm/${pkg}@${ver}/dist/x.wasm`
  • Network accessline 389
    // strips manufactured 1,593 phantom `…quality(70` URLs (v0.1.68's paren       // lesson, third location). And the match can OVERRUN a closing paren the       // URL never opened: inline `style="…url(https://…x.webp);--aspect:…"`
  • Network accessline 390
    // lesson, third location). And the match can OVERRUN a closing paren the       // URL never opened: inline `style="…url(https://…x.webp);--aspect:…"`       // yielded 98 phantom `x.webp);--aspect` URLs (fourth location) — the
  • Network accessline 391
    // URL never opened: inline `style="…url(https://…x.webp);--aspect:…"`
  • Network accessline 396
    // unconditional: sentence punctuation around a URL in prose, never path.       // ⚠ decodeEntities can INTRODUCE the very boundary chars the raw match       // excluded: `&quot;image&quot;:&quot;https://…x.webp&quot;,…` matches
  • Network accessline 397
    // ⚠ decodeEntities can INTRODUCE the very boundary chars the raw match       // excluded: `&quot;image&quot;:&quot;https://…x.webp&quot;,…` matches       // straight through, and only the decode turns &quot; back into `"`.
  • Network accessline 398
    // excluded: `&quot;image&quot;:&quot;https://…x.webp&quot;,…` matches
  • Network accessline 419
    // The (?!\/) guard is load-bearing: protocol-relative refs (//host/path)     // also start with "/", and without it they get joined onto ORIGIN as     // https://host//host/path — 77 phantom 404s on the first Shopify target
  • Network accessline 420
    // also start with "/", and without it they get joined onto ORIGIN as     // https://host//host/path — 77 phantom 404s on the first Shopify target     // (racingshop-rebuild). Shape 2 already handled those.
  • Network accessline 421
    // https://host//host/path — 77 phantom 404s on the first Shopify target
  • Network accessline 426
    // 3b. root-relative paths as PLAIN STRING LITERALS, not in an attribute.     // Shape 3 requires src=/href=/poster=…, which is right for markup and blind     // to code: `new Workbox("/sw.js")`, `fetch("/data/index.json")`,
  • Network accessline 427
    // Shape 3 requires src=/href=/poster=…, which is right for markup and blind     // to code: `new Workbox("/sw.js")`, `fetch("/data/index.json")`,     // `img.src = "/img/sprite.svg"` match nothing there.
  • Network accessline 428
    // to code: `new Workbox("/sw.js")`, `fetch("/data/index.json")`,
  • Network accessline 577
    //     //   .../media/1f9dadf367424346-s.p.04        (tail cut off)     //   https://host/static/media/9010da…        ("/_next" was in the push before)
  • Network accessline 578
    //   .../media/1f9dadf367424346-s.p.04        (tail cut off)     //   https://host/static/media/9010da…        ("/_next" was in the push before)     //   https://host/9dc1a6fb114b646f-s.p…       (the whole path prefix was)
  • Network accessline 579
    //   https://host/static/media/9010da…        ("/_next" was in the push before)
  • Network accessline 580
    //   https://host/9dc1a6fb114b646f-s.p…       (the whole path prefix was)

skills/website-rebuild/scripts/lib/flight.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 15
    * ⭐ A length-prefixed row has NO terminator. The next row's header begins at  * the declared end — the length IS the separator, which is the whole reason it  * is written down. So shortening `https://media.host/x` to `/ext/media.host/x`
  • Network accessline 16
    * the declared end — the length IS the separator, which is the whole reason it  * is written down. So shortening `https://media.host/x` to `/ext/media.host/x`  * inside a row leaves the reader consuming the next row's header as text, and
  • Network accessline 17
    * is written down. So shortening `https://media.host/x` to `/ext/media.host/x`

skills/website-rebuild/scripts/lib/hash.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/ledger.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/negotiate.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 86
    // 裸主机引用(含路径引用在内的全部出现):flight 的 :HC preconnect 提示只写     // `"https://cdn.sanity.io"`,不带 /images/<projectId>/ 路径——首页可以零资产
  • Network accessline 87
    // `"https://cdn.sanity.io"`,不带 /images/<projectId>/ 路径——首页可以零资产
  • Network accessline 130
    for (const p of fetchProfiles(url, { origin, typeHint })) {     try {       const res = await fetch(url, { ...init, headers: { ...p.headers, ...(init.headers || {}) }, redirect });
  • Network accessline 131
    try {       const res = await fetch(url, { ...init, headers: { ...p.headers, ...(init.headers || {}) }, redirect });       if (res.ok || (res.status >= 300 && res.status < 400)) return { res, profile: p.name, error: "" };
  • Network accessline 132
    const res = await fetch(url, { ...init, headers: { ...p.headers, ...(init.headers || {}) }, redirect });

skills/website-rebuild/scripts/lib/npx.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/png.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/ports.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 229
    const get = async (p) => {     const c = AbortSignal.timeout(1500);     const res = await fetch(`http://127.0.0.1:${port}${p}`, { signal: c });
  • Network accessline 230
    const c = AbortSignal.timeout(1500);     const res = await fetch(`http://127.0.0.1:${port}${p}`, { signal: c });     return res;
  • Network accessline 231
    const res = await fetch(`http://127.0.0.1:${port}${p}`, { signal: c });
  • Network accessline 310
    for (;;) {     try {       const list = await (await fetch(`http://127.0.0.1:${port}/json`, { signal: AbortSignal.timeout(2000) })).json();
  • Network accessline 311
    try {       const list = await (await fetch(`http://127.0.0.1:${port}/json`, { signal: AbortSignal.timeout(2000) })).json();       seen = list.map((t) => `${t.type} ${t.url}`);
  • Network accessline 312
    const list = await (await fetch(`http://127.0.0.1:${port}/json`, { signal: AbortSignal.timeout(2000) })).json();
  • Network accessline 339
    async function warnOnForeignPid(port, pid, tool) {   try {     const v = await (await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) })).json();
  • Network accessline 340
    try {     const v = await (await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) })).json();     const cdp = await connectCdp(v.webSocketDebuggerUrl, { defaultTimeoutMs: 3000 });
  • Network accessline 341
    const v = await (await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) })).json();
  • Network accessline 359
    try {     const u = new URL(IDENTITY_PATH, baseUrl);     const res = await fetch(u, { signal: AbortSignal.timeout(3000) });
  • Network accessline 360
    const u = new URL(IDENTITY_PATH, baseUrl);     const res = await fetch(u, { signal: AbortSignal.timeout(3000) });     if (res.ok) return await res.json();
  • Network accessline 361
    const res = await fetch(u, { signal: AbortSignal.timeout(3000) });
  • Network accessline 363
    } catch {}   try {     const res = await fetch(baseUrl, { signal: AbortSignal.timeout(3000) });
  • Network accessline 364
    [Credential-related source omitted]
  • Network accessline 365
    const res = await fetch(baseUrl, { signal: AbortSignal.timeout(3000) });

skills/website-rebuild/scripts/lib/shell-build.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 34
    * targets" no matter which shapes fired — a difference-based count cannot work  * here, because localising an EXTERNAL host leaves the host string in place  * (`https://cdn.x` -> `/ext/cdn.x`).
  • Network accessline 35
    * here, because localising an EXTERNAL host leaves the host string in place  * (`https://cdn.x` -> `/ext/cdn.x`).  */
  • Network accessline 36
    * (`https://cdn.x` -> `/ext/cdn.x`).
  • Network accessline 43
    // ⚠ `to || "/"` when NO path follows. Replacing `https://host` with "" for an
  • Network accessline 44
    // origin host leaves `href=""`, which is not "the home page" — it is "this   // page", a silently broken link. Caught cross-side by the payload gate: the   // mirror kept `href="http://www.chungiyoo.com"` (serve.mjs only rewrites the
  • Network accessline 45
    // page", a silently broken link. Caught cross-side by the payload gate: the   // mirror kept `href="http://www.chungiyoo.com"` (serve.mjs only rewrites the   // trailing-slash form) while the build produced `href=""`, so the two
  • Network accessline 46
    // mirror kept `href="http://www.chungiyoo.com"` (serve.mjs only rewrites the
  • Network accessline 55
    // site's own relaunch, which prints the address it is talking about:   //   //     <a href="https://host/">https://host/</a>
  • Network accessline 56
    //   //     <a href="https://host/">https://host/</a>   //
  • Network accessline 57
    //     <a href="https://host/">https://host/</a>
  • Network accessline 192
    // ⛔ THESE GO THROUGH THE LENGTH-AWARE PATH TOO. It is not only localisation   // that edits a length-prefixed payload: the thing that had to be deleted here   // was a `<link rel="preload" href="https://www.googletagmanager.com/…">`
  • Network accessline 193
    // that edits a length-prefixed payload: the thing that had to be deleted here   // was a `<link rel="preload" href="https://www.googletagmanager.com/…">`   // sitting INSIDE a flight row, and deleting it blanket-style shortens the row
  • Network accessline 194
    // was a `<link rel="preload" href="https://www.googletagmanager.com/…">`

skills/website-rebuild/scripts/lib/tokens.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/lib/urlpath.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 35
    //   /cdn/shop/x.jpg                 ->  cdn/shop/x.jpg //   /collections/foo?page=2         ->  collections/foo@@page=2/index.html //   https://cdn.other.com/a.js?b=1  ->  assets/cdn.other.com/a@@b=1.js
  • Network accessline 36
    //   /collections/foo?page=2         ->  collections/foo@@page=2/index.html //   https://cdn.other.com/a.js?b=1  ->  assets/cdn.other.com/a@@b=1.js //
  • Network accessline 37
    //   https://cdn.other.com/a.js?b=1  ->  assets/cdn.other.com/a@@b=1.js

skills/website-rebuild/scripts/lib/version.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/mirror-site.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 11
    *  * Usage:  *   node mirror-site.mjs --origin https://example.com [--out mirror]
  • Network accessline 12
    * Usage:  *   node mirror-site.mjs --origin https://example.com [--out mirror]  *     [--hosts cdn.example.com,media.example.net]  extra asset hosts to follow
  • Network accessline 13
    *   node mirror-site.mjs --origin https://example.com [--out mirror]
  • Network accessline 43
    * BFS 爬虫镜像(资产白名单 + 迭代到不动点;`redirect:manual` + 三本账,含逐文件 sha256;⭐ `redirects.tsv` 与 manifest 一样**跨运行累积**——`--scope` 补页曾把它截成只剩表头,载荷门在 `/work` 撞 404 才发现)。`--scope <前缀>` 把**页面**队列限制在目标路径下(微站挂在企业 CMS 域下时必用;⛔ 只限页面不限资产)。**账本累积**(`--seeds` 补漏不再截短上一轮
  • Network accessline 44
    * BFS 爬虫镜像源站(页面/跨域资产,文本资产迭代到不动点;对要求同源 Referer 的资产域补齐 Referer 头、404 模板探测)。**`redirect: "manual"` 硬纪律**:重定向只记进 `redirects.tsv` 并把目标重新入队,绝不把 301 的 body 写在来源路径下。产出三本账:`mirror-manifest.json`(含逐文件 sha256)、`inventory.tsv`、`redirects.tsv`,外加 `urlpa
  • Network accessline 45
    * js|mjs|json|svg|html?` 扩展名白名单,`.atom`/`.xml`/`.rss`/`.txt` 与无扩展名路由整类不被打开,而闭包门用的是同一张表所以查不出来;`application/octet-stream` 按**没有声明**处理,它是"服务器不知道"不是"这是二进制")。v0.3.16:绝对 `--out` 按给定路径用;`--rounds/--workers` 须为 ≥1 的整数(否则 exit 2);三本账每 100 个文件与 Ctrl-
  • Network accessline 111
    const ORIGIN_RAW = flag('origin', null); if (!ORIGIN_RAW) {   console.error('usage: mirror-site.mjs --origin https://example.com [--out mirror] [--hosts a,b] [--pages /x,/y] [--probe-404 /slug] [--seeds urls.txt] [--rounds 4] [--workers 8] 
  • Network accessline 112
    if (!ORIGIN_RAW) {   console.error('usage: mirror-site.mjs --origin https://example.com [--out mirror] [--hosts a,b] [--pages /x,/y] [--probe-404 /slug] [--seeds urls.txt] [--rounds 4] [--workers 8] [--scope /path/] [--query-ignore v,cb | -
  • Network accessline 113
    console.error('usage: mirror-site.mjs --origin https://example.com [--out mirror] [--hosts a,b] [--pages /x,/y] [--probe-404 /slug] [--seeds urls.txt] [--rounds 4] [--workers 8] [--scope /path/] [--query-ignore v,cb | --query-only width,hei
  • Network accessline 247
    // refuses requests WITHOUT a same-origin Referer (landonorris), another // refuses requests WITH browser-shaped headers (video.twimg.com served a // bare curl and 403'd the polite profile — measured on rauchg). So a 4xx on
  • Network accessline 248
    // refuses requests WITH browser-shaped headers (video.twimg.com served a // bare curl and 403'd the polite profile — measured on rauchg). So a 4xx on // the standard profile gets ONE retry on a minimal profile before the URL is
  • Network accessline 249
    // bare curl and 403'd the polite profile — measured on rauchg). So a 4xx on
  • Network accessline 314
    // Root-relative `href="/x"` AND absolute/protocol-relative same-origin // `href="https://host/x"` — WordPress and most CMS themes emit the latter for
  • Network accessline 315
    // `href="https://host/x"` — WordPress and most CMS themes emit the latter for
  • Network accessline 392
    const url = ORIGIN + (path === '/' ? '/' : path);     try {       const res = await fetch(url, { headers: { 'user-agent': BROWSER_UA }, redirect: 'manual' });
  • Network accessline 393
    try {       const res = await fetch(url, { headers: { 'user-agent': BROWSER_UA }, redirect: 'manual' });       if (res.status >= 300 && res.status < 400) {
  • Network accessline 394
    const res = await fetch(url, { headers: { 'user-agent': BROWSER_UA }, redirect: 'manual' });

skills/website-rebuild/scripts/module-map.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/netcapture.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 27
    // // Usage: //   node netcapture.mjs --origin https://example.com [--mirror mirror]
  • Network accessline 28
    // Usage: //   node netcapture.mjs --origin https://example.com [--mirror mirror] //     [--routes /,/about,/contact]      routes to visit (default "/")
  • Network accessline 29
    //   node netcapture.mjs --origin https://example.com [--mirror mirror]
  • Network accessline 64
    // 真实浏览器 CDP 抓包对账补录运行时资源(**CDN 站必须传 `--hosts`**,否则只观测同源流量、会报假 GAP=0) // 真实浏览器 CDP 抓包,与磁盘镜像 diff 对账(HAVE/GAP),补运行时拼接 URL。**`--hosts` 在 CDN 站上不是可选项**:记录范围是 host 白名单(语义同 mirror-site 的 `ASSET_HOSTS`,把同一份 host 清单传给它);不在白名单的 host 只计数并在末尾列出,未传 `--
  • Network accessline 66
    // `node netcapture.mjs --origin https://example.com --hosts cdn.x.com --routes /,/about`
  • Network accessline 98
    const ORIGIN_RAW = flag("origin", null); if (!ORIGIN_RAW) {   console.error("usage: netcapture.mjs --origin https://example.com [--mirror mirror] [--routes /,/a] [--viewports desktop,mobile] [--steps 12] [--dwell 1500] [--settle 9000] [--ho
  • Network accessline 99
    if (!ORIGIN_RAW) {   console.error("usage: netcapture.mjs --origin https://example.com [--mirror mirror] [--routes /,/a] [--viewports desktop,mobile] [--steps 12] [--dwell 1500] [--settle 9000] [--hosts cdn.x.com,media.y.net] [--out file.ts
  • Network accessline 100
    console.error("usage: netcapture.mjs --origin https://example.com [--mirror mirror] [--routes /,/a] [--viewports desktop,mobile] [--steps 12] [--dwell 1500] [--settle 9000] [--hosts cdn.x.com,media.y.net] [--out file.tsv] [--fetch] [--swift
  • Network accessline 215
    // whole capture down with an uncaught TypeError — losing every route, not     // just the bad request. A capture tool must survive its subject.     // Field case: a tag manager built https://senses%20trackingscript.<host>/…
  • Network accessline 216
    // just the bad request. A capture tool must survive its subject.     // Field case: a tag manager built https://senses%20trackingscript.<host>/…     // — a percent-encoded SPACE inside the hostname, 8x per session.
  • Network accessline 217
    // Field case: a tag manager built https://senses%20trackingscript.<host>/…
  • Network accessline 234
    const sitePath = inflight.get(p.requestId);     if (!sitePath) return;     requests.set(sitePath, {
  • Network accessline 235
    if (!sitePath) return;     requests.set(sitePath, {       path: sitePath,
  • Network accessline 236
    requests.set(sitePath, {
  • Network accessline 242
    } else if (msg.method === "Network.loadingFinished") {     const sitePath = inflight.get(p.requestId);     const rec = sitePath && requests.get(sitePath);
  • Network accessline 243
    const sitePath = inflight.get(p.requestId);     const rec = sitePath && requests.get(sitePath);     if (rec) rec.bytes = p.encodedDataLength || 0;
  • Network accessline 244
    const rec = sitePath && requests.get(sitePath);
  • Network accessline 301
    const rows = [...requests.values()].sort((a, b) => a.path.localeCompare(b.path));
  • Network accessline 387
    // m.path is an absolute URL (records are keyed by host + path).     // ⛔ PER-URL TOLERANCE + PERIODIC LEDGERING. The first version had neither:     // one thrown fetch (DNS, TLS, reset) aborted the WHOLE loop before
  • Network accessline 388
    // ⛔ PER-URL TOLERANCE + PERIODIC LEDGERING. The first version had neither:     // one thrown fetch (DNS, TLS, reset) aborted the WHOLE loop before     // appendLedger ever ran, stranding every file already written as
  • Network accessline 389
    // one thrown fetch (DNS, TLS, reset) aborted the WHOLE loop before

skills/website-rebuild/scripts/pixel-walk.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/pixelcompare.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 8
    // <out>/metric.json. // //   node pixelcompare.mjs --a http://localhost:5173/ --b http://localhost:5175/
  • Network accessline 9
    // //   node pixelcompare.mjs --a http://localhost:5173/ --b http://localhost:5175/ //     [--name home]                    view name (keys metric.json + filenames)
  • Network accessline 10
    //   node pixelcompare.mjs --a http://localhost:5173/ --b http://localhost:5175/
  • Network accessline 69
    // ⛔ **冻 JS 时钟冻不住 CSS 动画**——`animation` 跑在浏览器动画时间线上,不经过 JS。症状是**同侧对照比跨侧还大**且最差格相同。该旗标把所有动画 `paused` + 固定负延迟钉在同一相位(⚠ 它改变被渲染内容,这正是目的:两侧定格在同一位置)。 // 双服务器 A/B 截图 + 64×40 网格量化(适合活体场景)+ 并排合成图 + metric.json;`--max-mean` 可作门。**开拍前先证明 A/B 是两个进程**:同 
  • Network accessline 71
    // `node pixelcompare.mjs --a http://127.0.0.1:25002/ --b http://127.0.0.1:25001/ --name home`;1728×1080 加 `--format jpeg --quality 92`
  • Network accessline 256
    await waitFor(async () => (await fetch(URL_A)).ok, 10000, 'server A ' + URL_A);
  • Network accessline 257
    await waitFor(async () => (await fetch(URL_B)).ok, 10000, 'server B ' + URL_B);

skills/website-rebuild/scripts/probe-shim.js

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/probe.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 63
    * CDP 无头探针:console/异常/网络采集 + Log 域监听(SRI 拦截盲区修复)、`--eval/--evalAfter/--shot/--mobile`、CLEAN 判定退出码进 CI。`--no-external` 把"任何离开本服务 origin 的请求"记为失败(断网门要求的零外联,此前无人断言);`--walk N` 全页滚动走查(`--scroll` 只跳单点,跳过的场景根本不挂载)。调试端口按 side 分配(side 从目标 URL 的端口自动
  • Network accessline 64
    * 逐参数走 argv,旗标可以在 URL 前面  * `node probe.mjs http://127.0.0.1:25001/ --shot out.png --walk 24 --no-external`;大视口截图 `--shot out.jpg --format jpeg --quality 92`  */
  • Network accessline 65
    * `node probe.mjs http://127.0.0.1:25001/ --shot out.png --walk 24 --no-external`;大视口截图 `--shot out.jpg --format jpeg --quality 92`
  • Network accessline 97
    // the next argument. // ⛔ WALK THE ARGV; do not `find` the first token without dashes. With a flag // ahead of the URL (`--wait 9000 http://…`) that token is the flag's VALUE, and
  • Network accessline 98
    // ⛔ WALK THE ARGV; do not `find` the first token without dashes. With a flag // ahead of the URL (`--wait 9000 http://…`) that token is the flag's VALUE, and // the probe died on `new URL('9000')` with a bare TypeError — after the flag
  • Network accessline 99
    // ahead of the URL (`--wait 9000 http://…`) that token is the flag's VALUE, and
  • Network accessline 255
    case 'Network.requestWillBeSent': {       const u = m.params.request.url;       requests.set(m.params.requestId, u);
  • Network accessline 257
    requests.set(m.params.requestId, u);
  • Network accessline 270
    }     case 'Network.loadingFailed': {       const u = requests.get(m.params.requestId) || '?';
  • Network accessline 271
    case 'Network.loadingFailed': {       const u = requests.get(m.params.requestId) || '?';       if (!m.params.canceled) failures.push(`FAILED ${m.params.errorText} ${u}`);
  • Network accessline 272
    const u = requests.get(m.params.requestId) || '?';

skills/website-rebuild/scripts/reconcile-gaps.mjs

  • Executable scriptline 1
    Executable file
  • Network accessline 96
    for (const p of profilesFor(url)) {     try {       const r = await fetch(url, { headers: p.headers, redirect: "manual" });
  • Network accessline 97
    try {       const r = await fetch(url, { headers: p.headers, redirect: "manual" });       if (r.ok) {
  • Network accessline 98
    const r = await fetch(url, { headers: p.headers, redirect: "manual" });

skills/website-rebuild/scripts/serve.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 60
    // 中文规格(自 scripts/README.md 迁入,v0.3.21;本表另一拼写:`serve.mjs`) // 零依赖静态服务器(MIME/Range/服务层改写/重定向回放),兼任源站参照服。`--rewrite FROM::TO` 是**登记式字面量替换**,为的是一类本地化触及不到的东西——**源程序按自己的域名分支**(`location.hostname=="x.com" && (CDN=...)`,镜像不在那个域名上于是整个子系统走空路径);**首次命
  • Network accessline 61
    // 零依赖静态服务器(MIME/Range/服务层改写/重定向回放),兼任源站参照服。`--rewrite FROM::TO` 是**登记式字面量替换**,为的是一类本地化触及不到的东西——**源程序按自己的域名分支**(`location.hostname=="x.com" && (CDN=...)`,镜像不在那个域名上于是整个子系统走空路径);**首次命中打印**,因为沉默与生效此前无法区分。`--fallback-root` 让复刻侧只放产出、资产全部从只读镜像读(`
  • Network accessline 62
    // 零依赖静态服务器:MIME 补全(含 HLS 阶梯与 `.mov`)、Range、redirects.tsv 重定向回放(FROM 写绝对 URL 或裸路径都能命中)、`/ext/<host>/` 服务层改写(镜像磁盘神圣不改)、`--stub-ext-hosts` 把"改写进 `/ext/` 但故意不镜像"的遥测 host 回 JS stub(否则要么真外联、要么 404)、`?__probe` 注入 probe-shim、404.html 回放。**`--side 
  • Network accessline 189
    // project, or pass --stub-ext-hosts; register each one as a deviation. // The rewrite is what makes this work even for runtime-built URLs: a loader // that concatenates a "https://telemetry.example/tag/" literal with an id has
  • Network accessline 190
    // The rewrite is what makes this work even for runtime-built URLs: a loader // that concatenates a "https://telemetry.example/tag/" literal with an id has // the literal rewritten in the JS response, so the built URL is redirected too,
  • Network accessline 191
    // that concatenates a "https://telemetry.example/tag/" literal with an id has
  • Network accessline 285
    // (`//example.com/cdn/...`, common on platforms that serve the store CDN under // the custom domain). Served from 127.0.0.1 those resolve to // http://example.com/..., i.e. THE OFFLINE MIRROR SILENTLY PHONES THE LIVE SITE
  • Network accessline 286
    // the custom domain). Served from 127.0.0.1 those resolve to // http://example.com/..., i.e. THE OFFLINE MIRROR SILENTLY PHONES THE LIVE SITE // for bytes that are already on disk. Rewriting them to root-relative is a
  • Network accessline 287
    // http://example.com/..., i.e. THE OFFLINE MIRROR SILENTLY PHONES THE LIVE SITE
  • Network accessline 353
    // unhandled is an outbound request the render-level gates cannot show you: // //   plain          https://host/path        http://host/path
  • Network accessline 354
    // //   plain          https://host/path        http://host/path //   protocol-rel   //host/path
  • Network accessline 355
    //   plain          https://host/path        http://host/path
  • Network accessline 356
    //   protocol-rel   //host/path //   JSON-escaped   https:\/\/host\/path  and  \/\/host\/path //   BARE CONSTANT  "https://host"           then code does host + "/v1/metrics"
  • Network accessline 357
    //   JSON-escaped   https:\/\/host\/path  and  \/\/host\/path //   BARE CONSTANT  "https://host"           then code does host + "/v1/metrics" //
  • Network accessline 358
    //   BARE CONSTANT  "https://host"           then code does host + "/v1/metrics"
  • Network accessline 361
    // a theme asset URL inside an inline script; the bare constant is how telemetry // SDKs and platform boilerplate store their base URL (`window.shopUrl = // 'https://example.com'`). Measured on objectandarchive with only the
  • Network accessline 362
    // SDKs and platform boilerplate store their base URL (`window.shopUrl = // 'https://example.com'`). Measured on objectandarchive with only the // trailing-slash forms handled: the last 6 outbound requests of an otherwise
  • Network accessline 363
    // 'https://example.com'`). Measured on objectandarchive with only the
  • Network accessline 395
    // //     let CDN_PATH = ""; //     window.location.hostname == "example.com" && (CDN_PATH = "https://cdn.example");
  • Network accessline 396
    //     let CDN_PATH = ""; //     window.location.hostname == "example.com" && (CDN_PATH = "https://cdn.example"); //
  • Network accessline 397
    //     window.location.hostname == "example.com" && (CDN_PATH = "https://cdn.example");
  • Network accessline 483
    const eh = h.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");     text = text       .replace(new RegExp(`https?://([\\w.+-]+(?::[^@/\\s"']*)?)@${eh}/`, "gi"), (m, ui) => `http://${ui}@${HOST}:${PORT}/ext/${h}/`)
  • Network accessline 484
    text = text       .replace(new RegExp(`https?://([\\w.+-]+(?::[^@/\\s"']*)?)@${eh}/`, "gi"), (m, ui) => `http://${ui}@${HOST}:${PORT}/ext/${h}/`)       .replace(new RegExp(`https?:\\\\/\\\\/([\\w.+-]+(?::[^@\\s"']*)?)@${eh}\\\\/`, "gi"), (m
  • Network accessline 485
    .replace(new RegExp(`https?://([\\w.+-]+(?::[^@/\\s"']*)?)@${eh}/`, "gi"), (m, ui) => `http://${ui}@${HOST}:${PORT}/ext/${h}/`)
  • Network accessline 489
    // DSN is the canonical case: `https://<key>@o3794….ingest.us.sentry.io/…`   // sits in a chunk, the stub host is listed, and the request still went out —   // because `https://host/` never occurs in the text; `https://key@host/` does.
  • Network accessline 490
    // sits in a chunk, the stub host is listed, and the request still went out —   // because `https://host/` never occurs in the text; `https://key@host/` does.   // Normalize the userinfo away for LISTED hosts only (plain and \/-escaped
  • Network accessline 491
    // because `https://host/` never occurs in the text; `https://key@host/` does.
  • Network accessline 499
    }   for (const h of ORIGIN_HOSTS) {     text = text.replaceAll(`https://${h}/`, "/").replaceAll(`http://${h}/`, "/");
  • Network accessline 501
    text = text.replaceAll(`https://${h}/`, "/").replaceAll(`http://${h}/`, "/");
  • Network accessline 502
    // The NO-PATH form: `https://host` with nothing after it means the home
  • Network accessline 524
    }   for (const h of EXT_HOSTS) {     text = text.replaceAll(`https://${h}/`, `/ext/${h}/`).replaceAll(`http://${h}/`, `/ext/${h}/`);
  • Network accessline 525
    for (const h of EXT_HOSTS) {     text = text.replaceAll(`https://${h}/`, `/ext/${h}/`).replaceAll(`http://${h}/`, `/ext/${h}/`);     text = text
  • Network accessline 526
    text = text.replaceAll(`https://${h}/`, `/ext/${h}/`).replaceAll(`http://${h}/`, `/ext/${h}/`);
  • Possible obfuscationline 619
    // (`x@@dpl=…<U+200B>.png`) because that is the URL it was fetched by, so an exact
  • Network accessline 754
    const server = http.createServer(async (req, res) => {   try {     const url = new URL(req.url, `http://${req.headers.host || "localhost"}`);
  • Network accessline 756
    const url = new URL(req.url, `http://${req.headers.host || "localhost"}`);
  • Network accessline 778
    to = EXT_HOSTS.includes(u.hostname)           ? `/ext/${u.hostname}${u.pathname}${u.search}`           : `http://${req.headers.host || "localhost"}${u.pathname}${u.search}${u.hash}`;
  • Network accessline 779
    ? `/ext/${u.hostname}${u.pathname}${u.search}           : `http://${req.headers.host || "localhost"}${u.pathname}${u.search}${u.hash}`;
  • Network accessline 780
    : `http://${req.headers.host || "localhost"}${u.pathname}${u.search}${u.hash}`;
  • Network accessline 889
    server.listen(PORT, HOST, () => {   console.log(`serving ${ROOT}  [side ${IDENTITY.side.toUpperCase()}]`);   console.log(`  http://${HOST}:${PORT}/`);
  • Network accessline 890
    console.log(`serving ${ROOT}  [side ${IDENTITY.side.toUpperCase()}]`);   console.log(`  http://${HOST}:${PORT}/`);   console.log(`  port ${labelPort(PORT)}`);
  • Network accessline 891
    console.log(`  http://${HOST}:${PORT}/`);

skills/website-rebuild/scripts/shell-config.example.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/side-by-side.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/slice-esm.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 46
    import { readFile, writeFile, mkdir, rm } from "node:fs/promises";

skills/website-rebuild/scripts/slice-modules.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/slices.config.example.mjs

  • Executable scriptline 1
    Executable file

skills/website-rebuild/scripts/sweep-routes.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 27
    * probe --no-external.  *  *   node scripts/sweep-routes.mjs --base http://127.0.0.1:6571 --pages docs/pages.json
  • Network accessline 28
    *  *   node scripts/sweep-routes.mjs --base http://127.0.0.1:6571 --pages docs/pages.json  *        [--wait 6000] [--interact "<js, runs after wait>"] [--interact-wait 4000]
  • Network accessline 29
    *   node scripts/sweep-routes.mjs --base http://127.0.0.1:6571 --pages docs/pages.json
  • Network accessline 166
    case "Network.requestWillBeSent": {       const u = m.params.request.url;       requests.set(m.params.requestId, u);
  • Network accessline 167
    const u = m.params.request.url;       requests.set(m.params.requestId, u);       if (/^https?:/.test(u) && new URL(u).origin !== SELF_ORIGIN) {
  • Network accessline 168
    requests.set(m.params.requestId, u);
  • Network accessline 187
    }     case "Network.loadingFailed": {       const u = requests.get(m.params.requestId) || "?";
  • Network accessline 188
    case "Network.loadingFailed": {       const u = requests.get(m.params.requestId) || "?";       if (!m.params.canceled) {
  • Network accessline 189
    const u = requests.get(m.params.requestId) || "?";
  • Network accessline 225
    for (const route of routes) {   pageErrors = []; failures = []; allowedFailures = []; lifecycle = []; navigations = 0;   requests.clear(); external.clear(); allowedExternal.clear();
  • Network accessline 227
    requests.clear(); external.clear(); allowedExternal.clear();

skills/website-rebuild/scripts/verify-crossside.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-flight.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-fresh.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 27
    import { readFile, mkdtemp, rm } from "node:fs/promises";

skills/website-rebuild/scripts/verify-harvest.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-lenprefix.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 16
    *     <id>:T<hex>,<exactly that many UTF-8 BYTES of text>  *  * Rewriting `https://media.host/x` to `/ext/media.host/x` inside such a row
  • Network accessline 17
    *  * Rewriting `https://media.host/x` to `/ext/media.host/x` inside such a row  * shortens the text while `T<hex>` still claims the old count. The reader takes
  • Network accessline 18
    * Rewriting `https://media.host/x` to `/ext/media.host/x` inside such a row
  • Network accessline 37
    *  *   node scripts/verify-lenprefix.mjs --dir site  *   node scripts/verify-lenprefix.mjs --base http://127.0.0.1:8081 --routes /,/careers
  • Network accessline 38
    *   node scripts/verify-lenprefix.mjs --dir site  *   node scripts/verify-lenprefix.mjs --base http://127.0.0.1:8081 --routes /,/careers  *
  • Network accessline 39
    *   node scripts/verify-lenprefix.mjs --base http://127.0.0.1:8081 --routes /,/careers
  • Network accessline 126
    const targets = []; if (DIR) for await (const f of htmlFiles(path.resolve(DIR))) targets.push({ label: path.relative(path.resolve(DIR), f), get: () => readFile(f, "utf8") }); if (BASE) for (const r of ROUTES) targets.push({ label: r, get: (
  • Network accessline 128
    if (BASE) for (const r of ROUTES) targets.push({ label: r, get: () => fetch(new URL(r, BASE)).then((x) => x.text()) });

skills/website-rebuild/scripts/verify-mirror.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 70
    *   node verify-mirror.mjs --mirror mirror --resample 8 --resample-delay 2000  *  *   [--origin https://example.com]  default: the manifest's own `origin`
  • Network accessline 71
    *  *   [--origin https://example.com]  default: the manifest's own `origin`  *   [--hosts a,b]                   extra hosts for the closure pass (default:
  • Network accessline 72
    *   [--origin https://example.com]  default: the manifest's own `origin`
  • Network accessline 193
    const ORIGIN = (flag("origin", manifest.origin || "") || "").replace(/\/+$/, ""); if (!ORIGIN) {   console.error("FATAL: no origin — pass --origin https://example.com (the manifest has none).");
  • Network accessline 194
    if (!ORIGIN) {   console.error("FATAL: no origin — pass --origin https://example.com (the manifest has none).");   process.exit(2);
  • Network accessline 195
    console.error("FATAL: no origin — pass --origin https://example.com (the manifest has none).");
  • Network accessline 733
    console.log(       `         An HTML body under an image / font / script URL is a refusal page, a login wall\n` +         `         or an SPA catch-all — not the asset. Re-fetch (Referer? cookies? rate limit?)\n` +
  • Network accessline 734
    `         An HTML body under an image / font / script URL is a refusal page, a login wall\n` +         `         or an SPA catch-all — not the asset. Re-fetch (Referer? cookies? rate limit?)\n` +         `         or register the URL as unf
  • Network accessline 735
    `         or an SPA catch-all — not the asset. Re-fetch (Referer? cookies? rate limit?)\n` +
  • Network accessline 777
    //   // So an excuse now means exactly what it is written as:   //   host only  (`telemetry.example.net`, `https://telemetry.example.net/`)
  • Network accessline 778
    // So an excuse now means exactly what it is written as:   //   host only  (`telemetry.example.net`, `https://telemetry.example.net/`)   //              -> the whole host is excused. That is what "accepted
  • Network accessline 779
    //   host only  (`telemetry.example.net`, `https://telemetry.example.net/`)
  • Network accessline 780
    //              -> the whole host is excused. That is what "accepted   //                 degradation / stubbed vendor" decides, at host scope.   //   full URL   (`https://cdn.example.com/a/8914/files`)
  • Network accessline 781
    //                 degradation / stubbed vendor" decides, at host scope.   //   full URL   (`https://cdn.example.com/a/8914/files`)   //              -> EXACT. It excuses itself and nothing below it.
  • Network accessline 782
    //   full URL   (`https://cdn.example.com/a/8914/files`)
  • Network accessline 783
    //              -> EXACT. It excuses itself and nothing below it.   //   trailing * (`https://cdn.example.com/legacy/pack/*`)   //              -> prefix, DECLARED. Listed loudly on every run, because each
  • Network accessline 784
    //   trailing * (`https://cdn.example.com/legacy/pack/*`)
  • Network accessline 935
    // --- gate 5: sampled re-fetch (opt-in) --------------------------------------
  • Network accessline 968
    const want = f.profile || "std";       const prof = fetchProfiles(url, { origin: ORIGIN, typeHint: f.type || "" }).find((x) => x.name === want);       const res = await fetch(url, {
  • Network accessline 969
    const prof = fetchProfiles(url, { origin: ORIGIN, typeHint: f.type || "" }).find((x) => x.name === want);       const res = await fetch(url, {         headers: prof ? prof.headers : { "user-agent": BROWSER_UA, accept: "*/*", referer: ORIGIN
  • Network accessline 970
    const res = await fetch(url, {

skills/website-rebuild/scripts/verify-module-map.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 42
    import { readFile, readdir, writeFile, mkdtemp, rm } from "node:fs/promises";

skills/website-rebuild/scripts/verify-nextdata.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 36
    async function get(base, p) {   if (isHttp(base)) {     const r = await fetch(base + p, { headers: { "user-agent": UA } });
  • Network accessline 37
    if (isHttp(base)) {     const r = await fetch(base + p, { headers: { "user-agent": UA } });     return { status: r.status, text: await r.text() };
  • Network accessline 38
    const r = await fetch(base + p, { headers: { "user-agent": UA } });

skills/website-rebuild/scripts/verify-offline.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 24
    *  * Usage:  *   node scripts/verify-offline.mjs --base http://127.0.0.1:29001 --routes /,/x,/y
  • Network accessline 25
    * Usage:  *   node scripts/verify-offline.mjs --base http://127.0.0.1:29001 --routes /,/x,/y  *
  • Network accessline 26
    *   node scripts/verify-offline.mjs --base http://127.0.0.1:29001 --routes /,/x,/y
  • Network accessline 29
    * **零外联门的静态一半**:枚举产出字节里每个外部绝对 URL 并逐条裁决(§1.6 的四类断言面里,资源级探针看不见的那三类)  * **零外联门的静态半边**(资源级半边是 `probe.mjs --no-external`):产出字节里的外部绝对 URL 普查——class 1 连接热身(preconnect/dns-prefetch)、class 2/3 调用点(sendBeacon/fetch/Image 携带外部字面量),census 里每个 host 必须在
  • Network accessline 30
    * **零外联门的静态半边**(资源级半边是 `probe.mjs --no-external`):产出字节里的外部绝对 URL 普查——class 1 连接热身(preconnect/dns-prefetch)、class 2/3 调用点(sendBeacon/fetch/Image 携带外部字面量),census 里每个 host 必须在 `mirror/external.txt` 有登记行  * `node verify-offline.mjs --base http:
  • Network accessline 31
    * `node verify-offline.mjs --base http://127.0.0.1:<port> --routes /,/about`
  • Network accessline 40
    return i >= 0 && args[i + 1] !== undefined ? args[i + 1] : d; }; const BASE = (flag("base", "http://127.0.0.1:29001") || "").replace(/\/+$/, "");
  • Network accessline 41
    }; const BASE = (flag("base", "http://127.0.0.1:29001") || "").replace(/\/+$/, ""); const ROUTES = flag("routes", "/").split(",").filter(Boolean);
  • Network accessline 42
    const BASE = (flag("base", "http://127.0.0.1:29001") || "").replace(/\/+$/, "");
  • Network accessline 57
    try {   await fetch(BASE, { redirect: "manual", signal: AbortSignal.timeout(5000) });
  • Network accessline 58
    await fetch(BASE, { redirect: "manual", signal: AbortSignal.timeout(5000) });
  • Network accessline 68
    for (const route of ROUTES) {   const res = await fetch(BASE + route, { redirect: "manual" });
  • Network accessline 69
    const res = await fetch(BASE + route, { redirect: "manual" });

skills/website-rebuild/scripts/verify-payload.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 27
    * So: expand both sides, compare the STRUCTURE, and report where they diverge.  *  *   node scripts/verify-payload.mjs --a http://127.0.0.1:24001 --b http://127.0.0.1:24002 \
  • Network accessline 28
    *  *   node scripts/verify-payload.mjs --a http://127.0.0.1:24001 --b http://127.0.0.1:24002 \  *        --routes /,/works,/about,/contact
  • Network accessline 29
    *   node scripts/verify-payload.mjs --a http://127.0.0.1:24001 --b http://127.0.0.1:24002 \
  • Network accessline 167
    const get = async (base, route) => {   const res = await fetch(base + route);
  • Network accessline 168
    const res = await fetch(base + route);

skills/website-rebuild/scripts/verify-reassembly.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-refs-served.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 14
    * (verification-gates.md §1.6 class 4).  *  *   node scripts/verify-refs-served.mjs --base http://127.0.0.1:6376 --dir site [--allow mirror/external.txt]
  • Network accessline 15
    *  *   node scripts/verify-refs-served.mjs --base http://127.0.0.1:6376 --dir site [--allow mirror/external.txt]  *
  • Network accessline 16
    *   node scripts/verify-refs-served.mjs --base http://127.0.0.1:6376 --dir site [--allow mirror/external.txt]
  • Network accessline 19
    * **引用可达门**:把产出字节里的每一条资源引用**逐条问服务器**(一次 GET,不开浏览器)。⭐ 关键在于**问服务器,而不是再实现一遍它的解析**——一个自己走镜像的离线检查就是第二份 url→path 实现,而第二份实现就是一次等着被报成窟窿的分歧(实测它把 28 张在场的图报成缺失,只因不知道服务器的查询变体回退)。⚠ 它看不见运行时拼出来的 URL,那是资源级探针的活(§1.6 class 4)  * **引用可达门**:产出字节里每条资产引用逐条**向真服务
  • Network accessline 20
    * **引用可达门**:产出字节里每条资产引用逐条**向真服务器请求**(GET + Range 0-0)。⭐ 问服务器,不重实现它——离线走盘的检查是 url→path 的第二份实现,第二份实现就是一个待报的假洞。`--allow` 消费与镜像门同一份 `external.txt`(源站自身 404 的引用是登记的偏差,不是要发明文件补的洞)  * `node verify-refs-served.mjs --base http://127.0.0.1:<port> --a
  • Network accessline 21
    * `node verify-refs-served.mjs --base http://127.0.0.1:<port> --allow mirror/external.txt`
  • Network accessline 31
    const args = process.argv.slice(2); const flag = (n, d) => { const i = args.indexOf("--" + n); return i >= 0 ? args[i + 1] : d; }; const BASE = flag("base", "http://127.0.0.1:6376").replace(/\/$/, "");
  • Network accessline 32
    const flag = (n, d) => { const i = args.indexOf("--" + n); return i >= 0 ? args[i + 1] : d; }; const BASE = flag("base", "http://127.0.0.1:6376").replace(/\/$/, ""); const DIR = path.resolve(flag("dir", "site"));
  • Network accessline 33
    const BASE = flag("base", "http://127.0.0.1:6376").replace(/\/$/, "");
  • Network accessline 88
    const ref = list[idx++];     let code = 0;     try { code = (await fetch(BASE + ref, { method: "GET", headers: { range: "bytes=0-0" } })).status; } catch { code = -1; }
  • Network accessline 89
    let code = 0;     try { code = (await fetch(BASE + ref, { method: "GET", headers: { range: "bytes=0-0" } })).status; } catch { code = -1; }     n++;
  • Network accessline 90
    try { code = (await fetch(BASE + ref, { method: "GET", headers: { range: "bytes=0-0" } })).status; } catch { code = -1; }

skills/website-rebuild/scripts/verify-routes.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 11
    //   set CONFIG.server to have the gate boot it first. // // Measure redirects on the ORIGIN with `curl -sI` / fetch(redirect:"manual")
  • Network accessline 12
    // // Measure redirects on the ORIGIN with `curl -sI` / fetch(redirect:"manual") // before filling in CONFIG.redirects — server-side routing behavior leaves
  • Network accessline 13
    // Measure redirects on the ORIGIN with `curl -sI` / fetch(redirect:"manual")
  • Network accessline 56
    base: `http://127.0.0.1:${PORT}`,
  • Network accessline 140
    for (let i = 0; i < 80; i += 1) {     try {       await fetch(CONFIG.base + "/", { redirect: "manual" });
  • Network accessline 141
    try {       await fetch(CONFIG.base + "/", { redirect: "manual" });       up = true;
  • Network accessline 142
    await fetch(CONFIG.base + "/", { redirect: "manual" });
  • Network accessline 154
    } else {   try {     await fetch(CONFIG.base + "/", { redirect: "manual" });
  • Network accessline 155
    try {     await fetch(CONFIG.base + "/", { redirect: "manual" });   } catch {
  • Network accessline 156
    await fetch(CONFIG.base + "/", { redirect: "manual" });
  • Network accessline 167
    for (const [route, mirrorFile] of CONFIG.pages) {     const res = await fetch(CONFIG.base + route, { redirect: "manual" });
  • Network accessline 168
    const res = await fetch(CONFIG.base + route, { redirect: "manual" });
  • Network accessline 201
    for (const [from, wantCode, wantTo] of CONFIG.redirects) {     const res = await fetch(CONFIG.base + from, { redirect: "manual" });
  • Network accessline 202
    const res = await fetch(CONFIG.base + from, { redirect: "manual" });
  • Network accessline 211
    for (const p of CONFIG.notFound) {     const res = await fetch(CONFIG.base + p, { redirect: "manual" });
  • Network accessline 212
    const res = await fetch(CONFIG.base + p, { redirect: "manual" });
  • Network accessline 218
    for (const p of CONFIG.publicAssets) {     const res = await fetch(CONFIG.base + p);
  • Network accessline 219
    const res = await fetch(CONFIG.base + p);

skills/website-rebuild/scripts/verify-shell.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-ssr.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 47
    env: process.env.PORT || null, }); const BASE = `http://127.0.0.1:${PORT}`;
  • Network accessline 48
    }); const BASE = `http://127.0.0.1:${PORT}`; console.log(`[verify-ssr] server under test ${BASE}  (${PORT_LABEL})`);
  • Network accessline 49
    const BASE = `http://127.0.0.1:${PORT}`;
  • Network accessline 123
    try {   await fetch(BASE, { redirect: "manual" });
  • Network accessline 124
    await fetch(BASE, { redirect: "manual" });
  • Network accessline 131
    for (const [route, mirrorFile] of pages) {   const a = await fetch(BASE + route).then((r) => r.text());
  • Network accessline 132
    const a = await fetch(BASE + route).then((r) => r.text());
  • Network accessline 146
    const notFound = await fetch(BASE + NOT_FOUND_ROUTE);

skills/website-rebuild/scripts/verify-standalone.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 35
    import { readFile, readdir, stat, cp, mkdtemp, rm } from "node:fs/promises";

skills/website-rebuild/scripts/verify-symbols.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-tokens.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-tween.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/verify-zerodep.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/scripts/wayback-mirror.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 16
    *  * 1. ⭐ RAW BYTES ONLY: every fetch uses the `id_` (identity) replay flag —  *    `https://web.archive.org/web/<ts>id_/<original>` returns the capture's
  • Network accessline 17
    * 1. ⭐ RAW BYTES ONLY: every fetch uses the `id_` (identity) replay flag —  *    `https://web.archive.org/web/<ts>id_/<original>` returns the capture's  *    original bytes, no rewriting, no toolbar. Never mirror the replay HTML.
  • Network accessline 18
    *    `https://web.archive.org/web/<ts>id_/<original>` returns the capture's
  • Network accessline 37
    * exponential backoff on 429/503. A rescue is not a race.  *  *   node scripts/wayback-mirror.mjs --origin https://darknetflix.io \
  • Network accessline 38
    *  *   node scripts/wayback-mirror.mjs --origin https://darknetflix.io \  *        [--hosts cdn.example.com] [--anchor 20200626202014 | auto]
  • Network accessline 39
    *   node scripts/wayback-mirror.mjs --origin https://darknetflix.io \
  • Network accessline 44
    * 中文规格(自 scripts/README.md 迁入,v0.3.21;本表另一拼写:`wayback-mirror.mjs`)  * **X 类抢救:死站 → 标准镜像**(`references/archival-rescue.md`)。CDX 枚举 → 锚点+时间窗逐 URL 选连贯捕获(auto 锚点 = 根页 200 最密年代取中位,抢注者时代的 301 垃圾靠状态码+窗口出局)→ `id_` 旗抓**原始字节**(绝不镜像被注入改写的回放 HTML)→ 产出与
  • Network accessline 45
    * **X 类抢救:死站 → 标准镜像**(`references/archival-rescue.md`)。CDX 枚举 → 锚点+时间窗逐 URL 选连贯捕获(auto 锚点 = 根页 200 最密年代取中位,抢注者时代的 301 垃圾靠状态码+窗口出局)→ `id_` 旗抓**原始字节**(绝不镜像被注入改写的回放 HTML)→ 产出与 mirror-site 同构的 mirror/ + 账本 + `wayback-provenance.json`(逐文件捕获时间戳/d
  • Network accessline 46
    * `node wayback-mirror.mjs --origin https://dead.example --anchor auto --window-days 365`
  • Network accessline 68
    const ORIGIN = (flag("origin", "") || "").replace(/\/$/, ""); if (!ORIGIN) { console.error("usage: wayback-mirror.mjs --origin https://dead.example [--hosts cdn.x] [--anchor auto] ..."); process.exit(2); }
  • Network accessline 69
    if (!ORIGIN) { console.error("usage: wayback-mirror.mjs --origin https://dead.example [--hosts cdn.x] [--anchor auto] ..."); process.exit(2); }
  • Network accessline 85
    for (let t = 0; t < tries; t++) {     try {       const r = await fetch(url, { redirect: "manual", headers: { "user-agent": "website-rebuild-skill/wayback-rescue (research; low-rate)" } });
  • Network accessline 86
    try {       const r = await fetch(url, { redirect: "manual", headers: { "user-agent": "website-rebuild-skill/wayback-rescue (research; low-rate)" } });       if (r.status === 429 || r.status === 503) { await sleep(2000 * 2 ** t); continue; 
  • Network accessline 87
    const r = await fetch(url, { redirect: "manual", headers: { "user-agent": "website-rebuild-skill/wayback-rescue (research; low-rate)" } });
  • Network accessline 126
    for (const u of seeds) {     if (manifest2[u]) continue;     const r = await politeFetch(`https://web.archive.org/web/${anchor}id_/${u}`, { tries: 4 });
  • Network accessline 127
    if (manifest2[u]) continue;     const r = await politeFetch(`https://web.archive.org/web/${anchor}id_/${u}`, { tries: 4 });     await sleep(350);
  • Network accessline 128
    const r = await politeFetch(`https://web.archive.org/web/${anchor}id_/${u}`, { tries: 4 });
  • Network accessline 133
    const loc = r.headers.get("location");       if (!loc) continue;       final = await politeFetch(new URL(loc, "https://web.archive.org").href, { tries: 4 });
  • Network accessline 134
    if (!loc) continue;       final = await politeFetch(new URL(loc, "https://web.archive.org").href, { tries: 4 });       await sleep(350);
  • Network accessline 135
    final = await politeFetch(new URL(loc, "https://web.archive.org").href, { tries: 4 });
  • Network accessline 160
    const captures = []; // {original, timestamp, status, mimetype, digest, host} for (const host of HOSTS) {   const cdxUrl = `https://web.archive.org/cdx/search/cdx?url=${encodeURIComponent(host + "/*")}&output=json&fl=original,timestamp,stat
  • Network accessline 161
    for (const host of HOSTS) {   const cdxUrl = `https://web.archive.org/cdx/search/cdx?url=${encodeURIComponent(host + "/*")}&output=json&fl=original,timestamp,statuscode,mimetype,digest`;   const r = await politeFetch(cdxUrl, { tries: 6 });
  • Network accessline 162
    const cdxUrl = `https://web.archive.org/cdx/search/cdx?url=${encodeURIComponent(host + "/*")}&output=json&fl=original,timestamp,statuscode,mimetype,digest`;
  • Network accessline 194
    // real digest exists whenever the URL was truly there; revisits are skipped // and the earlier identical capture wins through normal selection. // ⛔ SPELLING TWINS COLLIDE ON DISK. The archive stores `http://x/` and
  • Network accessline 195
    // and the earlier identical capture wins through normal selection. // ⛔ SPELLING TWINS COLLIDE ON DISK. The archive stores `http://x/` and // `http://x:80/` as two originals; `f.eot` and `f.eot?` (the IE eot hack)
  • Network accessline 196
    // ⛔ SPELLING TWINS COLLIDE ON DISK. The archive stores `http://x/` and
  • Network accessline 197
    // `http://x:80/` as two originals; `f.eot` and `f.eot?` (the IE eot hack)
  • Network accessline 244
    let picked = null, buf = null, r = null;     for (const cc of cands.slice(0, 4)) {       const rawUrl = `https://web.archive.org/web/${cc.timestamp}id_/${cc.original}`;
  • Network accessline 245
    for (const cc of cands.slice(0, 4)) {       const rawUrl = `https://web.archive.org/web/${cc.timestamp}id_/${cc.original}`;       r = await politeFetch(rawUrl);
  • Network accessline 246
    const rawUrl = `https://web.archive.org/web/${cc.timestamp}id_/${cc.original}`;
  • Network accessline 348
    const base = holeUrl.split("/").pop().split("?")[0];   if (!base || base.length < 5) continue;   const q = `https://web.archive.org/cdx/search/cdx?url=${encodeURIComponent(new URL(holeUrl).host + "/*")}&output=json&filter=original:.*/${enco
  • Network accessline 349
    if (!base || base.length < 5) continue;   const q = `https://web.archive.org/cdx/search/cdx?url=${encodeURIComponent(new URL(holeUrl).host + "/*")}&output=json&filter=original:.*/${encodeURIComponent(base).replace(/\./g, "\\.")}$&fl=origina
  • Network accessline 350
    const q = `https://web.archive.org/cdx/search/cdx?url=${encodeURIComponent(new URL(holeUrl).host + "/*")}&output=json&filter=original:.*/${encodeURIComponent(base).replace(/\./g, "\\.")}$&fl=original,timestamp,statuscode&limit=50`;
  • Network accessline 357
    if (!cands.length) continue;   const [archivedAs, ts] = cands[0];   const fr = await politeFetch(`https://web.archive.org/web/${ts}id_/${archivedAs}`); await sleep(350);
  • Network accessline 358
    const [archivedAs, ts] = cands[0];   const fr = await politeFetch(`https://web.archive.org/web/${ts}id_/${archivedAs}`); await sleep(350);   if (!fr || fr.status !== 200) continue;
  • Network accessline 359
    const fr = await politeFetch(`https://web.archive.org/web/${ts}id_/${archivedAs}`); await sleep(350);

skills/website-rebuild/tools/accept-names.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/tools/assemble-static.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 16
    import { mkdir, readdir, symlink, copyFile, rm } from "node:fs/promises";

skills/website-rebuild/tools/flight-to-mdx.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/tools/group-parts.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/tools/harvest-optimized-images.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 7
    // (同 url+w+q,忽略 Vercel 的 dpl 部署 id——源站发了什么才是参照),镜像没有的档位才向本机 // `next start` 的优化器取(登记:这些档位是重建侧生成物),按 lib/urlpath 的查询变体命名落进静态树。 //   node tools/harvest-optimized-images.mjs [--base http://127.0.0.1:3311] [--site rebuild/static-site] [--mirro
  • Network accessline 9
    //   node tools/harvest-optimized-images.mjs [--base http://127.0.0.1:3311] [--site rebuild/static-site] [--mirror mirror]
  • Network accessline 16
    const args = process.argv.slice(2); const flag = (k, d) => { const i = args.indexOf("--" + k); return i >= 0 ? args[i + 1] : d; }; const BASE = flag("base", "http://127.0.0.1:3311"), SITE = flag("site", "rebuild/static-site"), MIRROR = flag
  • Network accessline 17
    const flag = (k, d) => { const i = args.indexOf("--" + k); return i >= 0 ? args[i + 1] : d; }; const BASE = flag("base", "http://127.0.0.1:3311"), SITE = flag("site", "rebuild/static-site"), MIRROR = flag("mirror", "mirror"); const POLICY =
  • Network accessline 18
    const BASE = flag("base", "http://127.0.0.1:3311"), SITE = flag("site", "rebuild/static-site"), MIRROR = flag("mirror", "mirror");
  • Network accessline 43
    let ok = 0, fromMirror = 0, fail = 0; for (const u of [...urls].sort()) {   const q = new URL("http://x" + u).searchParams;
  • Network accessline 44
    for (const u of [...urls].sort()) {   const q = new URL("http://x" + u).searchParams;   const key = `${q.get("url")}|${q.get("w")}|${q.get("q")}`;
  • Network accessline 45
    const q = new URL("http://x" + u).searchParams;
  • Network accessline 48
    if (mirrorByKey.has(key)) { buf = await readFile(join(MIRROR, mirrorByKey.get(key))); fromMirror++; }   else {     const r = await fetch(BASE + u).catch(() => null);
  • Network accessline 49
    else {     const r = await fetch(BASE + u).catch(() => null);     if (!r || !r.ok) { fail++; console.log(`  FAIL ${r ? r.status : "net"} ${u.slice(0, 90)}`); continue; }
  • Network accessline 50
    const r = await fetch(BASE + u).catch(() => null);
  • Network accessline 52
    buf = Buffer.from(await r.arrayBuffer());   }   const rel = localRelPath("http://x" + u, "x", POLICY);
  • Network accessline 53
    }   const rel = localRelPath("http://x" + u, "x", POLICY);   await mkdir(dirname(join(SITE, rel)), { recursive: true });
  • Network accessline 54
    const rel = localRelPath("http://x" + u, "x", POLICY);

skills/website-rebuild/tools/make-standalone.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Network accessline 176
    for (const { path: rel } of await readInventory(root)) if (rel && !OWNER.has(rel)) OWNER.set(rel, root); } const ORIGIN_URL = (MANIFEST.origin || "https://example.invalid").replace(/\/$/, "") + "/";
  • Network accessline 177
    } const ORIGIN_URL = (MANIFEST.origin || "https://example.invalid").replace(/\/$/, "") + "/"; const ORIGIN_HOST = new URL(ORIGIN_URL).hostname;
  • Network accessline 178
    const ORIGIN_URL = (MANIFEST.origin || "https://example.invalid").replace(/\/$/, "") + "/";

skills/website-rebuild/tools/modules-to-src.mjs

  • Executable scriptline 1
    #!/usr/bin/env node
  • Dangerous shell operationline 34
    import { readFile, writeFile, mkdir, rm } from "node:fs/promises";

skills/website-rebuild/tools/name-modules.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/tools/package.json

  • Executable scriptline 1
    Executable file

skills/website-rebuild/tools/sourcify-chunk.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

skills/website-rebuild/tools/verify-fresh-next.mjs

  • Executable scriptline 1
    #!/usr/bin/env node

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Some files could not be read; the facts below still hold.

No combined signals at this commit.

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeCompatibleStandard SKILL.md skills/website-rebuild/SKILL.md.claude/skills/<skill-name>/
CodexCompatibleStandard SKILL.md skills/website-rebuild/SKILL.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md skills/website-rebuild/SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md skills/website-rebuild/SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md skills/website-rebuild/SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md skills/website-rebuild/SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.

Explore alternatives and comparisons

Add this badge to your README

It updates every night and links to this page.

boyang-hu/website-rebuild-skill: #614 on hotskills, 1.6k stars

[![boyang-hu/website-rebuild-skill on hotskills](https://hotskills.dev/badge/boyang-hu-website-rebuild-skill.svg)](https://hotskills.dev/skill/boyang-hu-website-rebuild-skill/)