Skip to content
Skillpedia
Images & icons7.0k · #13700

portrait-clone

What it does

This skill converts reference images into a locked JSON prompt for an image model so the same person looks nearly identical in each generated image. It is for creators and designers who need a consistent character across images.

When to use it

  • ✓When you want to replicate a person's look across several generated images.
  • ✓When you need a consistent character for a series of images or a video.
  • ✓When you want to revise a prompt after comparing a generated image with the reference.

Skill link

https://github.com/superdesigndev/treg/blob/main/.agents/skills/portrait-clone/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/superdesigndev/treg/blob/main/.agents/skills/portrait-clone/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you turn these three photos of my character into one locked prompt I can use to generate matching images?”

5 new skills a week. 1 minute to read.

How it works

The agent studies the reference images and writes a detailed JSON prompt that fixes each visible attribute to one value. It lists features that should not appear, applies a de-slop step, and returns only the JSON block.

Technical content (original SKILL.md)

Original text by the author, straight from 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

  1. 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.
  2. 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 in negative_prompt.
  3. 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.
  4. Always de-slopped. Every output, version and revision applies the full De-slop step, regardless of the reference's style, medium or polish.
  5. 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).
  6. Top-level constraints. critical_constraints and negative_prompt are top-level keys, right after prompt_id / prompt_language.
  7. Complete output. Always output the full JSON, even for a one-field revision, with the prompt_id version 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
FAQ

Does the output include anything besides JSON?

No. The skill says to reply with exactly one JSON code block and nothing else.

Why state what is absent?

The skill says image models add extras unless you explicitly list them as none.

Can I add more fields to the schema?

Yes. The schema is a minimum, and more locked fields are better.

Details

Original description by the author

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

Popularity

GitHub stars
7.0k
Ranking position
#13700
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills