DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to relight a flat or weak backlit portrait with XXG Portrait Rebuild Light

Rebuild key light, shadows, and highlights in an existing portrait without redrawing the person.

  • Top pick
  • Content
  • Intermediate
  • 30 minutes
  • From the README
  • Any agent

Who it is forA photographer or retoucher whose portrait was shot with weak backlight or flat indoor window light and needs the light to read as physically plausible.

The problemThe source has flat lighting, crushed shadows, or highlights with no visible light source, which makes the portrait look unfinished.

The outcomeAn edited portrait with a director-led lighting change, with identity, pose, expression, and composition kept as in the source.

What you need first

  • An AI agent with image-generation or image-editing capability, since the README says the skill uses the current agent's own capability by default and needs no separate API
  • The source portrait image file, which the skill treats as the root base for color and identity
  • The skill instructions from https://github.com/moskoo/xxg-portrait-rebuild-light, read before running
  • A clear goal, such as a lighting change, a skin texture repair, or a film look

Steps

  1. Open https://github.com/moskoo/xxg-portrait-rebuild-light and read the skill instructions and the L and E recipe tables.
  2. Give the agent the source portrait and state the light you want, for example soft natural window light or natural backlight.
  3. Let the agent choose one L light code and one E exposure code, and check that the prompt uses the four core lines EDIT, LIGHT, SKIN, and AVOID.
  4. Review the returned image for changed facial structure, pose, or framing.
  5. If the edit misses the target, ask the agent for the single complete compact image-edit prompt the skill returns.

Prompt for your agent

Using the xxg-portrait-rebuild-light skill from moskoo/xxg-portrait-rebuild-light, relight the portrait at <path to source image> with soft natural window light, choosing one L light code and one E exposure code. Return the edited image, and verify that the face size, position, pose, and camera view match the source.

Caveat. The README excerpt does not list install steps, so setup depends on how your agent loads the skill from the repo.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page