portrait-clone
Skill này làm gì
Skill này chuyển ảnh tham chiếu thành một prompt JSON được khóa cho mô hình tạo ảnh, để cùng một người trông gần như giống hệt trong mỗi ảnh được tạo. Nó dành cho người sáng tạo và nhà thiết kế cần một nhân vật nhất quán qua nhiều ảnh.
Khi nào nên dùng
- ✓Khi bạn muốn tái tạo diện mạo của một người qua nhiều ảnh được tạo.
- ✓Khi bạn cần một nhân vật nhất quán cho một loạt ảnh hoặc một video.
- ✓Khi bạn muốn chỉnh sửa prompt sau khi so sánh ảnh được tạo với ảnh tham chiếu.
Liên kết skill
https://github.com/superdesigndev/treg/blob/main/.agents/skills/portrait-clone/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể biến ba bức ảnh nhân vật này của tôi thành một prompt đã khóa để tạo các ảnh khớp nhau không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent nghiên cứu các ảnh tham chiếu và viết một prompt JSON chi tiết, cố định mọi thuộc tính nhìn thấy được thành một giá trị. Nó liệt kê những đặc điểm không được xuất hiện, áp dụng bước de-slop để bỏ các chi tiết thừa, và chỉ trả về khối JSON.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Đầu ra có gì ngoài JSON không?
Không. Skill nói chỉ trả lời bằng đúng một khối mã JSON và không có gì khác.
Vì sao phải nêu những gì không có mặt?
Skill nói các mô hình tạo ảnh sẽ tự thêm chi tiết nếu bạn không ghi rõ là không có.
Tôi có thể thêm trường vào schema không?
Có. Schema là mức tối thiểu, và càng nhiều trường được khóa thì càng tốt.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 7.0k
- Vị trí xếp hạng
- #13700
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
code-quality
7.0kDạy agent của bạn chuẩn mã rõ ràng: dùng công cụ để áp quy tắc, hạn chế chú thích, viết test có thể thất bại và giữ tài liệu ngắn gọn.
google-ads
7.0kGiúp agent của bạn chạy báo cáo và thay đổi Google Ads an toàn, tránh các lỗi phổ biến về phiên bản API và ngân sách làm lãng phí tiền.
google-analytics
7.0kGiúp agent của bạn lấy số liệu lưu lượng, chuyển đổi và doanh thu chính xác từ Google Analytics 4, tránh dữ liệu ngày chưa đầy đủ và số 0 sai.
google-search-console
7.0kGiúp agent của bạn báo cáo lượt nhấp, hiển thị và thứ hạng tìm kiếm tự nhiên từ Search Console, không nhầm ngày gần đây chưa đủ dữ liệu là sụt giảm.
Skill tương tự
gifgrep
394kCho phép agent của bạn tìm thư viện GIF, xem trước kết quả, tải một GIF, và lấy một khung hình tĩnh hoặc bảng ghép nhiều khung hình.
meme-maker
394kCho phép agent của bạn chọn một mẫu meme, thêm chú thích của riêng bạn và tạo meme dưới dạng ảnh SVG hoặc PNG.
ios-icon-gen
280kGiúp agent tạo biểu tượng cho ứng dụng iOS. Dùng biểu tượng của Apple hoặc từ các nguồn khác để tạo đúng định dạng tệp.