Skip to content

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 二手分析里的可执行代码。

FileKindSize
SKILL.mdskill md16.4 KB
references/assessment.mdmarkdown3.5 KB
references/complex-playbooks.mdmarkdown2.3 KB
references/deliverables.mdmarkdown5.0 KB
references/design-dna.mdmarkdown11.5 KB
references/effect-extraction.mdmarkdown5.2 KB
references/marbles-case.mdmarkdown3.3 KB
references/reverse-engineering.mdmarkdown3.5 KB
references/static-mirror.mdmarkdown4.9 KB
scripts/asset-harvest.mjsexecutablescript3.8 KB
scripts/audit-clone.mjsexecutablescript5.4 KB
scripts/compare-recon.mjsexecutablescript10.8 KB
scripts/dna-scaffold.mjsscript11.6 KB
scripts/init-clone.mjsexecutablescript3.2 KB
scripts/interaction-probe.mjsscript12.2 KB
scripts/lib/playwright-loader.mjsexecutablescript948 B
scripts/mirror-site.mjsscript6.2 KB
scripts/network-capture.mjsexecutablescript4.2 KB
scripts/recon-site.mjsexecutablescript8.7 KB
scripts/route-crawl.mjsscript7.8 KB
scripts/sourcemap-hunt.mjsexecutablescript3.6 KB
scripts/visual-diff.mjsexecutablescript5.8 KB

scripts/asset-harvest.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/asset-harvest.mjs --recon original-recon.json --out assets/original [--manifest asset-manifest.json] [--all-external]

Reads recon JSON, downloads discovered images/scripts/stylesheets, and writes a manifest.
`);
}

function parseArgs(argv) {
  const out = { recon: "", outDir: "assets/original", manifest: "", 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] || "assets/original";
    else if (arg === "--manifest") out.manifest = argv[++i] || "";
    else if (arg === "--all-external") out.allExternal = true;
    else throw new Error(`Unexpected argument: ${arg}`);
  }
  return out;
}

function safeName(url) {
  const parsed = new URL(url);
  const ext = path.extname(parsed.pathname).slice(0, 12);
  const base = path.basename(parsed.pathname, ext).replace(/[^a-z0-9._-]+/gi, "-").slice(0, 80) || "asset";
  const hash = crypto.createHash("sha1").update(url).digest("hex").slice(0, 10);
  return `${base}-${hash}${ext || ".bin"}`;
}

function collectAssets(recon) {
  const assets = new Map();
  for (const capture of recon.captures || []) {
    const signals = capture.signals || {};
    for (const src of signals.scripts || []) assets.set(src, { type: "script", url: src });
    for (const href of signals.stylesheets || []) assets.set(href, { type: "stylesheet", url: href });
    for (const image of signals.images || []) {
      if (image.src) assets.set(image.src, { type: "image", url: image.src, alt: image.alt, width: image.width, height: image.height });
    }
  }
  return Array.from(assets.values()).filter((asset) => /^https?:\/\//i.test(asset.url));
}

async function download(asset, outDir) {
  const response = await fetch(asset.url, {
    headers: {
      "user-agent": "web-clone-skill/1.0 asset-harvest",
      "accept": "*/*",
    },
  });
  if (!response.ok) throw new Error(`${response.status} ${response.statusText}`);
  const buffer = Buffer.from(await response.arrayBuffer());
  const hostDir = path.join(outDir, new URL(asset.url).hostname);
  fs.mkdirSync(hostDir, { recursive: true });
  const file = path.join(hostDir, safeName(asset.url));
  fs.writeFileSync(file, buffer);
  return { ...asset, status: "ok", bytes: buffer.length, file };
}

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 outDir = path.resolve(args.outDir);
  const manifestFile = path.resolve(args.manifest || path.join(outDir, "asset-manifest.json"));
  const originHost = recon.url ? new URL(recon.url).hostname : "";
  const assets = collectAssets(recon).filter((asset) => args.allExternal || new URL(asset.url).hostname === originHost);
  const results = [];

  for (const asset of assets) {
    try {
      results.push(await download(asset, outDir));
    } catch (error) {
      results.push({ ...asset, status: "error", error: error.message });
    }
  }

  fs.mkdirSync(path.dirname(manifestFile), { recursive: true });
  fs.writeFileSync(manifestFile, `${JSON.stringify({
    source: args.recon,
    url: recon.url,
    allExternal: args.allExternal,
    total: results.length,
    ok: results.filter((item) => item.status === "ok").length,
    error: results.filter((item) => item.status === "error").length,
    assets: results,
  }, null, 2)}\n`);
  console.log(manifestFile);
} catch (error) {
  console.error(`asset-harvest failed: ${error.message}`);
  process.exit(1);
}
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall