portrait-clone
它能做什么
这项技能将参考图片转换为一份锁定的 JSON 提示词,供图像模型使用,使同一个人在每张生成的图片中都几乎一模一样。它适合需要在多张图片中保持角色一致的创作者和设计师。
适用场景
- ✓当你想在多张生成图片中复刻某个人的外貌时。
- ✓当你需要为一系列图片或视频保持角色一致时。
- ✓当你在比较生成图片与参考图片后,想要修改提示词的时候。
技能链接
https://github.com/superdesigndev/treg/blob/main/.agents/skills/portrait-clone/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我角色的这三张照片转换成一份锁定的提示词,让我可以用它生成风格一致的图片。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会研究参考图片,并编写一份详细的 JSON 提示词,将每个可见属性固定为一个值。它会列出不应出现的特征,执行去除 AI 套话的步骤,并只返回 JSON 代码块。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Portrait Clone
Convert n reference images (at least one contains a person) into ONE AIGC image prompt in JSON.
The single goal: pin down every variable an image model could otherwise choose, so the same prompt yields a nearly identical, non-AI-looking image on every run. Any detail left unspecified is a detail the model will randomize. Stability is measured by how little freedom the model has left.
Non-negotiables
- Lock everything. Every visible or inferable attribute gets exactly one concrete value. Never write "or", ranges ("20-30"), "e.g.", "optional", "[slot]", "various", "some", "natural-looking" without specifics, or any alternative.
- Lock absence too. Anything a model might add but the reference does not contain is stated explicitly as
"none"(glasses, hat, earrings, bag, second person, text, logos, props, sweat, tattoos elsewhere) and also listed innegative_prompt. - Fields are open-ended. The Schema below is a minimum floor, not a limit. Add any key, nested object or array needed to pin a variable. Prefer splitting one vague field into several precise sub-fields. More locked fields is always better than fewer.
- Always de-slopped. Every output, version and revision applies the full De-slop step, regardless of the reference's style, medium or polish.
- JSON only. Reply with exactly one ```json code block and nothing else. Only exception: if no image contains a person, ask one short clarifying question in the user's language. Generating the image is a separate step that runs only after the user approves the JSON (§ Generate through treg).
- Top-level constraints.
critical_constraintsandnegative_promptare top-level keys, right afterprompt_id/prompt_language. - Complete output. Always output the full JSON, even for a one-field revision, with the
prompt_idversion suffix bumped (_v1,_v2, ...).
Conventions
- All JSON values in English.
- Quantify whenever possible: degrees for rotation and tilt, cm for sizes and distances, mm for small details (nail length, liner flick, chain thickness), percent for framing, ratios for proportions, counts for countable things (rings, visible teeth, buttons, strands over each shoulder), hex for every color.
- Left/right from the subject's own perspective ("her left wrist"); frame positions as "frame left" / "frame right".
- Positions of small items are given by anatomical landmark ("sitting 2 cm below the collarbones", "over the right front hip pocket").
Workflow
1. Inventory (internal, never output)
For each image note: shot type (face close-up / half body / full body / detail / scene / style reference), aspect ratio and pixel size, capture medium (video frame grab, phone photo, DSLR, film scan, render), and which traits it shows reliably.
2. Choose the anchor image
Pose, framing, lighting, camera, aspect ratio and resolution come from ONE anchor: the image the user names, otherwise the clearest medium shot. All other images only refine identity traits (face, hair, body, outfit construction, jewelry, marks). When images conflict, trust the sharpest, most frontal, least compressed evidence. Motion blur, compression and lens distortion are not traits of the person. Traits not visible in any image are still locked: choose the single most plausible value consistent with the rest and state it definitively.
3. Variable audit — pin every one
Walk this list and give each item a concrete value (or "none" / "not visible"). Add any further variable the specific images introduce.
- Subject: count of people, gender presentation, broad regional appearance (only if useful for rendering), apparent age as one number, height in cm, build (shoulder width, arm thickness, bust, waist-hip difference, hips), posture, weight distribution.
- Face geometry: shape, length/width ratio, forehead height, cheekbone height and width, midface flatness, jaw angle, chin shape, philtrum length, eye spacing, face asymmetry details.
- Eyes (highest drift risk — geometric): crease type and height, epicanthic fold, shape, tilt, size relative to face, height/width ratio, lid coverage, iris visibility fraction, open/blink state, smile deformation, iris hex, catchlight, liner length in mm, shadow, lash length and curl, under-eye.
- Brows: shape, height above eye, thickness, hex, hair density, stray hairs.
- Nose, mouth: nose bridge height and tip shape, nostril width; lip size, upper/lower ratio, colo
常见问题
输出里除了 JSON 还有别的内容吗?
没有。该技能要求只回复一个 JSON 代码块,不包含其他内容。
为什么要说明什么不应出现?
该技能说明,图像模型会自行添加额外元素,除非你明确列为无。
我可以给结构添加更多字段吗?
可以。该结构只是最低要求,锁定的字段越多越好。
详情
作者的原始描述
Turn any n reference images (with at least one person) into one exhaustively locked, always de-slopped, JSON-only AIGC image prompt whose every variable is pinned so each generation is nearly identical. Use for replicating a person's look, extracting portrait features into a prompt, locking a character, or revising such a JSON after comparing a generated image to the reference.
repo: superdesigndev/treg
热度
- GitHub 星标
- 7.0k
- 排名
- #13700
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
code-quality
7.0k教你的智能体遵循清晰的代码规范:用工具强制执行规则,少写注释,让测试能够失败,并保持文档简短。
google-ads
7.0k帮你的智能体安全地生成 Google Ads 报告并进行修改,避免常见的 API 版本和预算错误,以免浪费资金。
google-analytics
7.0k帮你的智能体从 Google Analytics 4 获取准确的流量、转化和收入数据,避免不完整的日期和虚假的零值。
google-search-console
7.0k帮你的智能体从 Search Console 报告自然搜索的点击、展示和排名,避免把尚不完整的近期数据误认为下降。