XXG Portrait Rebuild Light skill

Rebuilds light, exposure and skin of a finished portrait while the person stays the same and the skin loses its plastic look.

  • 226 ★ on the repository
  • Last commit
  • MIT
Skill

Extended access

Why this level

  • A photo with a recognizable face is passed to your agent's image-editing tool.
  • The Python scripts read the image and check aspect ratios, masks and regions, and never create the delivered file.
All reasons and checks

moskoo/xxg-portrait-rebuild-light

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/xxg-portrait-rebuild-light

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • A photo with a recognizable face is passed to your agent's image-editing tool.
  • The Python scripts read the image and check aspect ratios, masks and regions, and never create the delivered file.

This is third-party code. Review the repository files before installing.

What it does

XXG Portrait Rebuild Light edits an existing portrait photo in JPG, PNG or WebP. Light, exposure, color and skin are rebuilt while the person stays the same: identity, facial proportions, expression, pose, camera view and composition are preserved. Skin gets a clean tone and low-contrast microtexture in place of plastic smoothness. An edit is assembled from codes: 15 lighting setups (`L0`–`L14`) from soft window light and Rembrandt to neon and candle, 8 exposure recipes, skin finish profiles, color grades, camera responses from a smartphone to a disposable film camera, atmosphere such as blind shadows, and quality-repair modes. The skill does not draw the image itself: it builds a prompt and hands it to the current agent's image-editing tool.

Who it is for. Photographers, retouchers and content authors who rework a finished portrait or clean up an AI image without changing the person.

Good fit when

  • An AI portrait came out with plastic skin and natural microtexture has to return without changing the lighting.
  • Flat or weak backlight in a photo is turned into soft window light or a Rembrandt setup.
  • A shot gets the response of specific gear: a smartphone, 35mm negative or a flash compact.
  • After several edits color drift, seams and banding built up, and the result is reconciled with the original frame.
  • A cover calls for a backlit silhouette or candle light with realistic falloff.

Not a fit when

  • A different person or look is wanted: the skill preserves identity, facial features and composition.
  • The agent has no image-editing tool: the skill returns only a ready prompt for another program.
  • The task is swapping a background or building a new scene: scene content and background structure stay as in the source.
  • Batch processing of hundreds of photos is needed: the skill builds a separate light and skin decision for each frame.

Example request

/xxg-portrait-rebuild-light rebuild the light as soft window light (L2, E1, S1, P2), keep the face and composition

Limitations

The skill does not edit the image itself: the agent needs an image generation or editing tool, which in Codex is `tools.image_gen__imagegen`. If there is no such tool or the edit misses the target, one ready prompt is returned for manual use. Python 3.9 and Pillow 9.1 or newer are required, but only to check aspect ratios, masks and regions: they never produce the delivered file. JPG, JPEG, PNG and WebP are accepted. The documentation and SKILL.md are in English, and README translations into Chinese, Japanese and Korean sit alongside. The last commit is dated October 2026.

How to disable. Delete the `xxg-portrait-rebuild-light` folder from the skills directory: `~/.claude/skills/`, `~/.codex/skills/` or `~/.agents/skills/`.

FAQ

How do I install the skill in Claude Code?

Clone the repository into a folder named `xxg-portrait-rebuild-light` and copy it into `~/.claude/skills/`: `mkdir -p ~/.claude/skills`, then `cp -R ./xxg-portrait-rebuild-light ~/.claude/skills/`. For the checks install `python3 -m pip install -r ./xxg-portrait-rebuild-light/requirements.txt` and call `/xxg-portrait-rebuild-light`.

What do the codes L0, E1, S1 and the rest mean?

They are edit settings: L sets the lighting setup, E exposure, S skin scale, P skin finish, T light color, G color grade, D capture response, A atmosphere and Q quality repair. A request picks one value from each group.

Does the skill keep the person's appearance?

Yes. Identity, facial proportions, natural asymmetry, expression, pose, camera view and framing stay as in the source, while light, exposure, color and skin response change.

How do I remove plastic skin without touching the light?

Ask for the `texture-only` mode: it forces `L0 + E0 + T0 + G0 + D0 + A0 + Q0` and keeps the source light, exposure, white balance, depth of field and background.

Is a separate editing API required?

No. The skill uses the agent's built-in tool, and without one it returns a ready prompt for another service.

Discussion

No questions or reviews yet.

Skills

Female Portrait Director

Female Portrait Prompt Director Skill

A skill that turns a short set of parameters into a photography-directed portrait prompt for an adult woman, plus negative constraints

SkillMinimal access1.7KRepository stars

A skill that makes an editorial poster from a photo: the shot stays unchanged, with an abstract panel and a local title beside it.

SkillMinimal access131Repository stars

Portrait skill that makes a snapshot cinematic while keeping face and scene, or builds an original series from scratch.

SkillExtended access467Repository stars

A Codex skill for photo color grading and RAW development from a JSON recipe, with no generative edits and faces and texture kept.

SkillExtended access58Repository stars

A skill that turns a picture into a generator prompt: frame breakdown, an enhanced version, three variants and platform editions.

SkillMinimal access61Repository stars

Skill that turns a photo into an original 3:4 art poster: scene analysis, a fitting medium, palette and typography

SkillMinimal access129Repository stars

README in short

Version 2.3.0 separated control of light, exposure, color grade, capture response, skin tone and quality repair. Before querying the model the skill makes a decision like a lighting director and compresses it into a prompt of 55–110 English words with four core lines: `EDIT`, `LIGHT`, `SKIN` and `AVOID`.

README badge

Original SKILL.md

---
name: xxg-portrait-rebuild-light
description: "Edit an existing JPG, JPEG, PNG, or WebP portrait to rebuild physically coherent light, exposure, color, capture style, clean optical skin, and frame quality without changing the person. Use for plastic-skin or AI-look removal, dirty synthetic texture, banding, edit seams, color drift, multi-round quality loss, tone or white-balance correction, camera/film/device emulation, backlight, prism, blind shadows, candlelight, neon, golden hour, rim light, rain-wet low key, studio light, or silhouettes."
---

# XXG Portrait Rebuild Light V2.3

## Objective

Treat the input as the same photograph, never as a reference for a replacement portrait. Improve illumination, exposure, color rendering, capture character, skin response, and generation quality while retaining identity, facial geometry and natural asymmetry, expression, pose, camera view, framing, and subject scale. Preserve source optics unless the user explicitly requests an optical restyle.

Build realism from three separable signals:

1. clean low-frequency skin tone and broad transitions;
2. source-driven diffuse/specular response with highlights confined to plausible light-facing areas;
3. fine, region-specific microdetail limited by face scale, focus, and illumination.

Do not manufacture realism with dirt, darkness, coarse pores, uniform grain, random color patches, or exaggerated facial lines. The result must first read as a clean photograph at normal size.

## Choose the Edit Scope

- **`texture-only`**: when the user asks only to remove plastic/AI skin or recover detail, force `L0 + E0 + T0 + G0 + D0 + A0 + Q0`. Preserve the source lighting, highlight placement, exposure, white balance, focal plane, depth of field, and background.
- **`tone-and-exposure`**: when the user asks for brightness, highlight/shadow recovery, white balance, palette, or grading without new lighting, preserve the source light direction and edit only E/T/G.
- **`relight-and-skin`**: when the user requests a lighting change or selects L/T/A, authorize the requested light response while preserving source focal plane and depth of field unless explicitly changed.
- **`capture-style`**: when the user requests a camera, film, phone, CCD, or era look, edit G/D and only the exposure behavior logically required by that capture; preserve viewpoint, crop, focal plane, and depth of field.
- **`optical-restyle`**: only when the user explicitly requests a different focal-length perspective, camera angle, aperture behavior, or depth of field. State that axis once and permit only the minimum framing/background reconstruction it requires.
- **`quality-repair`**: when the user asks to remove dirty synthetic patterns, banding, posterization, seams, halos, or other generation residue, edit only Q and preserve light, color, structure, optics, and natural texture.
- **`base-color-repair`**: when an edited result has an unintended cast, use the original root base to restore only unchanged or unauthorized color relationships; preserve deliberate recolors and requested E/T/G/A changes.
- **`multi-round-repair`**: when repeated edits accumulate tint, noise, sharpening, compression, banding, or seams, use the latest accepted edit as the target and the first root base as the stable identity/geometry/color reference.

Never let texture repair become relighting, tone correction become a new light source, device emulation become a new pose/viewpoint, or quality cleanup become global smoothing or an unauthorized regrade.

## Use the Host Image Editor

1. Inspect the source and read the host's native image-generation or image-editing skill.
2. Discover the actual callable in the tool registry. In Codex, inspect `ALL_TOOLS` and prefer the exact discovered name `image_gen__imagegen`.
3. For a local source in Codex, use the discovered tool and its real arguments:

```js
const result = await tools.image_gen__imagegen({

Report a problem