# Portrait Clone

Turn any n reference images (with at least one person) into one exhaustively locked...

- Repository: https://github.com/superdesigndev/treg (6950 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add superdesigndev/treg --skill portrait-clone -g -a claude-code -y`
Codex: `npx skills add superdesigndev/treg --skill portrait-clone -g -a codex -y`
Cursor: `npx skills add superdesigndev/treg --skill portrait-clone -g -a cursor -y`
Gemini CLI: `npx skills add superdesigndev/treg --skill portrait-clone -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add superdesigndev/treg`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

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