



English | 简体中文 | 日本語 | 한국어
xxg-portrait-rebuild-light is an image-edit skill for existing portraits. V2.3 separately controls physical light, exposure placement, color/style grade, capture-device response, broad skin tone, bounded reflection, scale/focus-aware microdetail, and AI-generation quality repair.
The skill changes the lighting without redrawing the person. It preserves identity, facial structure and proportions, natural slight asymmetry, expression, pose, camera view, and composition. It avoids plastic skin, grainy skin, dirty color variation, and fake depth made by exaggerating wrinkles.
Key features
- Provides
texture-only fidelity recovery without changing source lighting, color, focus, depth of field, or scene content.
- Repairs plastic smoothness by separating clean broad tone, source-shaped highlights, and scale/focus-aware regional microdetail.
- Adds seven skin-finish profiles (
P0–P6) for source-matched, satin-matte, soft-daylight, editorial, direct-flash, beauty, and available-light response.
- Adds
E0–E7 exposure recipes that explicitly place highlight headroom, facial midtones, directional shadows, and black point.
- Adds
G0–G8 color/style grades and D0–D8 capture profiles for full-frame digital, medium format, 35mm negative, CCD compact, point-and-shoot flash, smartphone, instant film, and disposable-camera response.
- Separates device response from optics: camera-style edits preserve viewpoint, perspective, crop, focal plane, and depth of field unless optical restyle is explicitly requested.
- Repairs weak backlighting, disconnected indoor window light, flat lighting, unintended crushed shadows, and highlights with no physical source.
- Supports soft window light, commercial soft light, Rembrandt lighting, cinematic low-key lighting, golden hour, dual-color neon, and diagonal hard light.
- Adds at most one physically coherent atmosphere effect, including prism refraction, blind/lattice shadow lines, rain-wet reflections, window/tree shadow, bokeh, sunset flare, volumetric light, or a full-black silhouette.
- Adds dedicated candle/flame and rim-led portrait keys with realistic falloff, edge placement, and restrained fill.
- Adds
Q0–Q6 quality recipes for synthetic dirt/grid patterns, banding, edit seams, color drift, and cumulative multi-round degradation.
- Uses the first root base—not the previous edit round—as the stable color/identity reference, while retaining intentional new colors and authorized lighting or grading.
- Repairs only observed artifacts and preserves pores, hair, directional fibers, fabric weave, edges, shadow boundaries, and source focus falloff.
- Controls subject and background in layers: key light and exposure intent first, then fill, shadows, ambient light, and color temperature.
- Preserves identity, facial feature size and position, expression, pose, wardrobe, background structure, and source framing.
- Reduces the skin-detail target automatically when the face is small, without canceling the requested lighting change.
- Uses the current agent's own image-generation or image-editing capability by default; no separate API is required.
- If the current agent has no image-edit capability, or the edit misses the target, returns one complete compact image-edit prompt.
- Never uses Pillow, NumPy, OpenCV, ImageMagick, or temporary filter scripts to produce the delivered image.

Core method
The skill first makes a director-style lighting decision internally:
Scope → Key L → Exposure E → Fill/Shadow → Skin S/P → Light color T → Look G → Capture D → Atmosphere A → Quality Q
The prompt sent to the image model uses four compact core lines, adding RENDER only for a requested grade/device response and QUALITY only for an observed repair target. Target length is 55–110 English words:
EDIT: Choose the smallest authorized scope; retain source identity, geometry, pose, camera view, optics, framing, and every unauthorized axis.
LIGHT: One L and E with explicit highlight, midtone, shadow, black-point, background, T, and optional A behavior.
RENDER: One G palette/curve plus one D capture response. Omit for G0 + D0.
SKIN: One scale-aware S plus one light-consistent P finish.
QUALITY: One observed Q repair; omit for Q0.
AVOID: Only two or three source-specific failures.
The skill does not pile identity audits, object inventories, repeated negatives, and several photographic styles into one prompt. That often causes constraints to cancel each other or produces an unchanged copy.
For skin-only requests, V2.3 forces L0 + E0 + T0 + G0 + D0 + A0 + Q0. Tone correction changes only E/T/G; capture-style changes only G/D and a logically required E; relighting changes L/E/T/A; quality repair changes only Q. Viewpoint, perspective, crop, focal plane, and depth of field stay source-matched unless the user explicitly requests optical-restyle.
A6 forces E6 silhouette exposure, moves the effective light behind the person, removes all fill and catchlights, and renders the subject interior black. L/T and any G/D treatment affect only the rear source and background; S/P are suppressed.
Recipes
Choose only:
one L light + one E exposure + one S skin scale + one P skin finish + one T light color + one G color/style grade + one D capture response + zero or one A atmosphere + one Q quality repair
Lighting L
| Code | Purpose |
|---|
L0 | Match the source; repair only flat light, unexplained crushed shadows, abnormal highlights, and harsh transitions |
L1 | Natural backlight, highlight-priority by default; add fill only when explicitly requested |
L2 | Soft natural window light |
L3 | Large commercial soft light |
L4 | Outdoor skylight |
L5 | Indoor practical and mixed lighting |
L6 | Hard single-point light or direct sunlight |
L7 | Low-key diagonal narrow light beam |
L8 | Classic editorial Rembrandt lighting |
L9 | Cinematic low-key warm key / cool ambient light |
L10 | Golden-hour sunset side backlight |
L11 | Cyberpunk cyan/magenta dual-tone neon |
L12 | Clean, even commercial soft light |
L13 | Candle or flame near-field key with rapid falloff |
L14 | Rim-led dramatic portrait light with restrained frontal fill |
Exposure E
| Code | Purpose |
|---|
E0 | Preserve source highlights, midtones, shadows, and black point |
E1 | Balanced natural exposure with clear midtones and directional shadows |
E2 | Protect a bright source/rim and let unlit planes follow available bounce |
E3 | Recover only blocked shadow information while controlling bright sources |
E4 | High-key exposure with textured whites and gentle facial modeling |
E5 | Low-key exposure with selected lit planes and a clean black point |
E6 | Full silhouette exposure; use only with A6 |
E7 | Direct-flash subject exposure with rapid ambient falloff |
Skin scale S
| Code | Purpose |
|---|
S0 | Small face or wide shot; restore only clean skin tone and natural reflection |
S1 | Default for medium shots; low-contrast microtexture with original lip and eye-area detail |
S2 | High-resolution close-up; region-aware pores, fine vellus hair, and existing details |
Skin finish P
| Code | Purpose |
|---|
P0 | Preserve the exact source diffuse/specular response; default for texture-only edits |
P1 | Natural satin-matte balance with bounded key-facing highlights |
P2 | Soft-daylight luminous midtones and broad highlight roll-off |
P3 | Editorial satin response with controlled T-zone highlights |
P4 | Direct-flash response with compact separated highlights |
P5 | Clean beauty response without porcelain uniformity |
P6 | Available-light response with source focus falloff and no added grain or marks |
Color temperature T
| Code | Purpose |
|---|
T0 | Preserve the source white balance |
T1 | Neutral natural daylight |
T2 | Golden warm light with healthy neutral zones retained in the skin |
T3 | Warm key light with cool background ambience |
T4 | Cyan/magenta neon relationship |
T5 | Cool-neutral overcast or blue-hour light without a full-frame blue wash |
T6 | Warm tungsten practicals with distance-based color falloff |
T7 | Mixed daylight/practical balance with believable skin and neutral objects |
T8 | Candle/flame amber with distance-based warmth and neutral-deep shadows |
Color and style grade G
| Code | Purpose |
|---|
G0 | Preserve the source palette and curve |
G1 | Neutral editorial color with a restrained S-curve |
G2 | Clean commercial color, accurate whites, bright midtones |
G3 | Muted documentary environment with protected skin chroma |
G4 | Warm lit skin with controlled cool background/shadow ambience |
G5 | Pastel editorial midtones and compressed highlights |
G6 | Tonal monochrome with separated skin, hair, clothing, and background |
G7 | Restrained 1970s print response; grain remains opt-in |
G8 | Clean 1990s/Y2K flash color and contrast |
Capture response D
| Code | Purpose |
|---|
D0 | Preserve source capture response |
D1 | Modern full-frame digital: clean detail and smooth highlight roll-off |
D2 | Medium-format digital: smooth tonal steps and restrained sharpening |
D3 | 35mm color negative: gentle highlight compression and softer microcontrast |
D4 | Compact CCD/digicam: direct crisp tone with modest highlight headroom |
D5 | Point-and-shoot direct flash; pair with L6 + E7 |
D6 | Smartphone computational: broad range without HDR halos or crunchy edges |
D7 | Instant-film tone; border and grain remain opt-in |
D8 | Disposable-camera response; exposure defects and grain remain opt-in |
Atmosphere A
| Code | Purpose |
|---|
A0 | Add no atmosphere effect |
A1 | Soft window shadow |
A2 | Sparse natural tree shadow |
A3 | Soft bokeh restricted to the defocused background |
A4 | Gentle lens flare aligned with the sunset direction |
A5 | Very subtle volumetric light with sparse dust motes |
A6 | Force the entire backlit subject to a clean black silhouette; no face, skin, hair, or clothing detail remains visible inside |
A7 | Prism refraction with a few source-aligned spectral bands or caustic patches |
A8 | Physically projected blind/lattice light-and-shadow lines |
A9 | Rain-wet atmosphere with gravity-consistent droplets and key-shaped reflections |
Quality repair Q
| Code | Purpose |
|---|
Q0 | Preserve current quality behavior; perform no quality repair |
Q1 | Remove only repeating synthetic cellular/maze/grid/chroma residue while preserving natural directional detail |