Community图像github.com

xhs-image-remake

小红书参考图复刻(支持同款复刻与换元素两种模式、逐元素判定生图模型或本地画、多图组图复刻与单图扩多角度摆拍)。触发词:参考图复刻 / 小红书复刻 / 照着参考图做 / 同款复刻 / 换产品 / 英文贴字换中文 / 换场景换道具 / 扩成多角度组图。全自动规划与执行,仅在产生生图费用前设置唯一整批报价停点;纯本地零费用路径直接执行。

xhs-image-remake 是什么?

xhs-image-remake is a Claude Code agent skill that 小红书参考图复刻(支持同款复刻与换元素两种模式、逐元素判定生图模型或本地画、多图组图复刻与单图扩多角度摆拍)。触发词:参考图复刻 / 小红书复刻 / 照着参考图做 / 同款复刻 / 换产品 / 英文贴字换中文 / 换场景换道具 / 扩成多角度组图。全自动规划与执行,仅在产生生图费用前设置唯一整批报价停点;纯本地零费用路径直接执行。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/kerwin-li-8888/xhs-image-remake/tree/HEAD

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Xiaohongshu Reference Image Remake (xhs-image-remake)

Automatically decompose, determine mode, route per-element "generate image vs. local draw", orchestrate image series, composite and render, review and archive based on reference images (single or a set) and user's actual product assets.

This Skill runs completely self-contained, without relying on external closed-source workflows or backend services; the image generation model can be freely swapped via a lightweight adapter layer.

Reference Documents on Demand

End-to-End Flow (Fully Automated + Single Quotation Checkpoint)

  1. Receive Input: Reference images (single/multiple) + user's actual product assets + copy or modification intent + target number of images (if any). When product facts are missing, clearly mark them as gaps or pending verification; never fabricate.
  2. Full Auto-Planning (Zero Cost):
    • First, scan 1-2 sections of references/lessons.md relevant to the current task and convert matched rules into constraints for this execution.
    • Actual Image Decomposition: Identify scene, composition, camera position, action, lighting, product relationships, stickers/text, and icons/cards for each image.
    • Mode Determination: If the user does not specify, automatically determine Mode A (Same-Style Remake) or Mode B (Element Replacement) (rules in modes-and-series.md).
    • Per-Element Routing: Decompose to the element level and decide "local drawing (HTML/CSS/SVG)" or "image generation model", determining whether the entire image is pure local / hybrid / pure generation (rules in element-routing.md).
    • Image Series Orchestration: For multi-image references, set a series-level bible (Series Bible) + generate each image individually (Mode B can use style_anchor for the first shot); for single-image expansion to multiple angles, prefer native sequential, and fall back to per-image generation when not supported.
    • Plan Persistence: Call scripts/run_store.py init to initialize the run directory, writing decomposition highlights, keep/replace lists, per-element routing, and pending shots into run.json.
  3. Single Checkpoint: Batch Quotation (Triggered only when paid generation is involved):
    • If all elements are local draws (zero cost), skip this step and go directly to Step 4.
    • If generation is needed, first call scripts/gen_image.py quote --adapter <name> --request <req.json> to verify credential readiness at zero cost, plan batching, and estimate unit price (unconfigured credentials or single-shot limits will block the request directly).
    • Report to the user in one go: total number of images, model/adapter used, unit price and estimated total price (or risk warning if unit price is unknown), whether to batch or fall back to per-image generation.
    • Hard rule: Never submit any paid request without the user's explicit confirmation; after confirmation, execute all images within the authorized scope in one batch.
  4. Auto Execution:
    • Generation Layer: Call scripts/gen_image.py run --adapter <name> --request <req.json> (--dry-run isolates and stores sandbox results in dry_run/<call_id>/, without overwriting official evidence). Prompts must require clean base images without text (except for packaging-inherent text). The same output directory uses a shared submission lock for single and batch runs; on timeout or insufficient returned images (incomplete_delivery), mark ok=false, retain the lock and successful evidence to prevent re-entry into the same directory. Must first check raw/ and adapter_result.json, and never automatically resend paid requests.
    • Local Layer: First view the generated base image to confirm subject and prop safety zones, then write editable HTML/CSS/SVG source code into local/, call scripts/render_local.py <html_path> <out_png> --base-image <base_png> to render and composite into outputs/.
    • Write actual prompts, artifact paths, and cost details back to run.json.
  5. Visual Self-Check and Delivery:
    • Must actually view each final image (never rely on exit codes or file sizes instead of visual review; if viewing is impossible, honestly state that visual check is incomplete).
    • Verify: Mode consistency, product identity (brand/bottle shape/color/specifications), lighting and gesture linkage, base images free of garbled text and watermark residue, local text accurate and readable on mobile devices.
    • Layered Fixes: Fix issues at the layer they occur (fix text/annotations only in the local layer, without touching the base image); if additional paid redraws exceed the authorized budget, re-quote.
    • Deliver final images + a brief description (mode used, which were generated/which were locally drawn, whether fallback to per-image generation was needed), and call scripts/run_store.py write-summary to write into summary.md. Do not produce side-by-side comparison images or lengthy reports.
  6. Lightweight Experience Capture (Low-intrusion, On-demand Trigger):
    • Triggered only when any of the following conditions are met: 1) Substantial revisions ≥ 2 rounds after the first draft; 2) Troubleshooting and solving a new tool/model pitfall; 3) User explicitly requests a record.
    • Not triggered for standard one-pass completions. When auto-trigger conditions are met, append a brief confirmation at the end of the delivery note (e.g., "There is 1 reusable experience from this run, write to lessons.md?"), then deduplicate and persist according to lessons.md rules after confirmation.

Archiving Directory and Script Quick Reference

Default archive root: ./runs/<task>/run-YYYYMMDD-HHmmss/ (can be overridden via environment variable XHS_IMAGE_REMAKE_OUT_ROOT or --out-root), containing run.json, summary.md, gen/, local/, outputs/.

python scripts/run_store.py init --task <task_name> [--out-root <directory>] [--mode A|B]
python scripts/gen_image.py capabilities --adapter <mock|ark_seedream>
python scripts/gen_image.py quote        --adapter <mock|ark_seedream> --request <req.json>
python scripts/gen_image.py run          --adapter <mock|ark_seedream> --request <req.json> [--dry-run]
python scripts/render_local.py <local/page.html> <outputs/final.png> [--base-image <base.png>]

Boundaries and Red Lines

  • This iteration does not include: Pure style reconstruction (redesigning composition and camera position together), side-by-side comparison images, visual decomposition reports, videos, or per-image coordinate/font size parameter tables.
  • Do not hardcode any API keys, Endpoint IDs, or unit prices; all image generation calls must go through scripts/gen_image.py and the adapter layer.

相关技能