Jane-xiaoer/claude-skill-web-clone
web-clone
Verified网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 / React-Vue-Next 内容站 / WebGL-Canvas 重前端站三大分支,并强制核对任何 AI 二手分析里的可执行代码。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.4 KB |
| references/assessment.md | markdown | 3.5 KB |
| references/complex-playbooks.md | markdown | 2.3 KB |
| references/deliverables.md | markdown | 5.0 KB |
| references/design-dna.md | markdown | 11.5 KB |
| references/effect-extraction.md | markdown | 5.2 KB |
| references/marbles-case.md | markdown | 3.3 KB |
| references/reverse-engineering.md | markdown | 3.5 KB |
| references/static-mirror.md | markdown | 4.9 KB |
| scripts/asset-harvest.mjsexecutable | script | 3.8 KB |
| scripts/audit-clone.mjsexecutable | script | 5.4 KB |
| scripts/compare-recon.mjsexecutable | script | 10.8 KB |
| scripts/dna-scaffold.mjs | script | 11.6 KB |
| scripts/init-clone.mjsexecutable | script | 3.2 KB |
| scripts/interaction-probe.mjs | script | 12.2 KB |
| scripts/lib/playwright-loader.mjsexecutable | script | 948 B |
| scripts/mirror-site.mjs | script | 6.2 KB |
| scripts/network-capture.mjsexecutable | script | 4.2 KB |
| scripts/recon-site.mjsexecutable | script | 8.7 KB |
| scripts/route-crawl.mjs | script | 7.8 KB |
| scripts/sourcemap-hunt.mjsexecutable | script | 3.6 KB |
| scripts/visual-diff.mjsexecutable | script | 5.8 KB |
scripts/sourcemap-hunt.mjs
View on GitHub#!/usr/bin/env node
import fs from "node:fs";
import path from "node:path";
import crypto from "node:crypto";
function usage() {
console.log(`Usage:
node scripts/sourcemap-hunt.mjs --recon original-recon.json --out RECON/sourcemaps [--all-external]
Finds sourceMappingURL hints in discovered JavaScript bundles and tries to download source maps.
`);
}
function parseArgs(argv) {
const out = { recon: "", outDir: "RECON/sourcemaps", allExternal: false };
for (let i = 0; i < argv.length; i += 1) {
const arg = argv[i];
if (arg === "--help" || arg === "-h") out.help = true;
else if (arg === "--recon") out.recon = argv[++i] || "";
else if (arg === "--out") out.outDir = argv[++i] || "RECON/sourcemaps";
else if (arg === "--all-external") out.allExternal = true;
else throw new Error(`Unexpected argument: ${arg}`);
}
return out;
}
function collectScripts(recon) {
const scripts = new Set();
for (const capture of recon.captures || []) {
for (const script of capture.signals?.scripts || []) {
if (/^https?:\/\//i.test(script)) scripts.add(script);
}
}
return Array.from(scripts);
}
function fileNameFor(url, suffix = "") {
const parsed = new URL(url);
const base = path.basename(parsed.pathname).replace(/[^a-z0-9._-]+/gi, "-").slice(0, 90) || "bundle.js";
const hash = crypto.createHash("sha1").update(url).digest("hex").slice(0, 10);
return `${base}-${hash}${suffix}`;
}
function resolveMapUrl(scriptUrl, mapHint) {
if (!mapHint) return `${scriptUrl}.map`;
if (mapHint.startsWith("data:")) return "";
return new URL(mapHint, scriptUrl).toString();
}
async function fetchText(url) {
const response = await fetch(url, {
headers: {
"user-agent": "web-clone-skill/1.0 sourcemap-hunt",
"accept": "*/*",
},
});
if (!response.ok) throw new Error(`${response.status} ${response.statusText}`);
return response.text();
}
try {
const args = parseArgs(process.argv.slice(2));
if (args.help || !args.recon) {
usage();
process.exit(args.help ? 0 : 1);
}
const recon = JSON.parse(fs.readFileSync(args.recon, "utf8"));
const originHost = recon.url ? new URL(recon.url).hostname : "";
const scripts = collectScripts(recon).filter((script) => args.allExternal || new URL(script).hostname === originHost);
const outDir = path.resolve(args.outDir);
fs.mkdirSync(outDir, { recursive: true });
const results = [];
for (const scriptUrl of scripts) {
const entry = { scriptUrl, status: "unknown", mapUrl: "", mapFile: "", error: "" };
try {
const js = await fetchText(scriptUrl);
const hint = js.match(/[#@]\s*sourceMappingURL=([^\s*]+)/)?.[1] || "";
entry.mapUrl = resolveMapUrl(scriptUrl, hint);
if (!entry.mapUrl) {
entry.status = "inline-or-data-map";
results.push(entry);
continue;
}
const mapText = await fetchText(entry.mapUrl);
const mapFile = path.join(outDir, fileNameFor(entry.mapUrl, ".map"));
fs.writeFileSync(mapFile, mapText);
entry.mapFile = mapFile;
entry.status = "ok";
} catch (error) {
entry.status = "error";
entry.error = error.message;
}
results.push(entry);
}
const manifest = {
source: args.recon,
url: recon.url,
allExternal: args.allExternal,
scriptCount: scripts.length,
mapCount: results.filter((item) => item.status === "ok").length,
results,
};
const manifestFile = path.join(outDir, "sourcemap-manifest.json");
fs.writeFileSync(manifestFile, `${JSON.stringify(manifest, null, 2)}\n`);
console.log(manifestFile);
} catch (error) {
console.error(`sourcemap-hunt failed: ${error.message}`);
process.exit(1);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |