REA
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
`xxg-portrait-rebuild-light` is an image-edit skill for existing portrait photos. It reconstructs the key light, fill, shadows, and background atmosphere with a director-led lighting workflow while restoring clean, healthy, low-contrast photographic skin microtexture.
作者提供的原文
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/skills/moskoo-xxg-portrait-rebuild-light)在同一工作中把 AI 连到服务的 MCP
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.
MCP server for terminal commands, file operations, and process management
同类工作,排序与 Skill 列表相同
| 本项 xxg-portrait-rebuild-light | rea | andrej-karpathy-skills | graphify | MoneyPrinterTurbo | |
|---|---|---|---|---|---|
| 作者 | moskoo | morluto | multica-ai | Graphify-Labs | harry0703 |
| Skill 数 | 1 | 1 | 1 | 1 | 1 |
| GitHub 星标 | 227 | 470,165 | 234,528 | 150,695 | 144,727 |
| 最近代码更新 | 2026年10月9日 | 2026年11月20日 | 2026年4月20日 | 2026年11月20日 | 2026年11月19日 |
| 许可证 | MIT | MIT | – | Apache-2.0 | MIT |
moskoo 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server
MCP = 手
把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。
Skill = 手册
教 AI 怎么做某项工作的文本文件,不连接任何服务。
有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。
Claude CodeCodex
依据开发者 README 和 repo 中的文件夹
GitHub 账号 moskoo(个人),已创建 9 年
★ 227 星,目前用户较少 · 代码最近更新 2026年10月9日
有 5 个可以在电脑上运行的脚本:scripts/audit_pixel_regions.py, scripts/check_aspect_ratio.py, scripts/evaluate_backend_gate.py, scripts/validate_edit_plan.py 另外还有 1 个文件
脚本中没有发现联网命令
没有发现 hook 或写入电脑设置的操作
根据仓库 commit 39b1ffd 中的文件自动检查(只读取文件,没有运行任何内容)。这不是安全保证,请自己阅读后再决定
第一步:你用哪个 AI?
选择你用的应用,本页只显示该应用的安装方法
无法上传到 claude.ai,因为描述超过 200 个字符(500 个字符)。请改用"让 AI 帮你安装"
复制这句话,粘贴到 Claude Code 的对话中
如果只用于一个项目,请粘贴到在该项目文件夹中打开的对话里 · AI 在安装前一定会先告诉你路径
AI 会先说明要做什么,每一步都会征求你的同意
重新打开 Claude Code,输入 /xxg-portrait-rebuild-light,或直接提出相关任务,Claude 会自动选用
Checked against official docs 2026年11月12日 · Source: code.claude.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill
在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中
AI 在安装前一定会先告诉你路径
AI 会先说明要做什么,每一步都会征求你的同意
把 xxg-portrait-rebuild-light 文件夹放到 ~/.agents/skills/xxg-portrait-rebuild-light
~ 是你的主文件夹($HOME)
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill
想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展
如果只用于一个项目,请粘贴到在该项目文件夹中打开的对话里 · AI 在安装前一定会先告诉你路径
AI 会先说明要做什么,每一步都会征求你的同意
Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
复制这句话,粘贴到 Cursor 的对话中
如果只用于一个项目,请粘贴到在该项目文件夹中打开的对话里 · AI 在安装前一定会先告诉你路径
AI 会先说明要做什么,每一步都会征求你的同意
在 Cursor 的 Agent 聊天中输入 / 并选择 xxg-portrait-rebuild-light
Checked against official docs 2026年11月12日 · Source: cursor.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · 复制这句话,粘贴到应用的对话中
如果只用于一个项目,请粘贴到在该项目文件夹中打开的对话里 · AI 在安装前一定会先告诉你路径
AI 会先说明要做什么,每一步都会征求你的同意
Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com
其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。
已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹
以下文字来自开发者的 repo,不是 PopNx MCP 的指令
显示前 8,000 个字符 · 在 GitHub 打开完整文件
---
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({
referenced_image_paths: ["/absolute/path/source.png"],
prompt: "compact English image-edit prompt"
});
generatedImage(result);
```
Never guess `tools.image_gen` or `input_image`. Correct wrong members, arguments, or `TypeError` from the registered signature and retry. In Claude, OpenClaw, or another host, use the equivalent native image-edit action explicitly exposed by that host.
For base-anchored or multi-round repair, pass exactly `[CURRENT_EDIT, ROOT_BASE]` and state: Image 1 is the edit target; Image 2 is the original root reference for declared locked axes only. Do not attach every intermediate round.
## Route the Outcome
| Observed state | Required action |
| --- | --- |
| Compatible image tool discovered | Invoke it. A small face, dense text, complex props, or edge contact lowers detail ambition but never blocks generation. |
| Correct image tool returns a real error | Report the actual error, enter `prompt-only`, and return a complete compact prompt. |
| Discovery completes with no compatible callable | Enter `invocation-handoff` and return a complete compact prompt. |
| Result is nearly unchanged, changes identity, creates artificial skin, or misses the light | State that the result did not achieve the requested improvement, enter `prompt-handoff`, and recompile from the source. |
Reading a skill, inspecting an image, creating a task, or announcing generation is not an image-tool invocation.
## Never Produce the Final Image Locally
Do not use Pillow, NumPy, OpenCV, ImageMagick, FFmpeg, `sips`, or custom raster scripts to relight, grade, retouch, sharpen, add texture, resize, crop, extend, composite, repair, or produce the delivered image. Use them only for read-only aspect-ratio, mask, and result audits. See `requirements.txt`.
## Compile the Image Prompt
Read [the V2.3 prompt compiler](references/prompt-recipes.md), [the lighting and skin recipes](references/lighting-skin-color-temperature-recipes.md), [the tone/exposure/style/device recipes](references/tone-exposure-style-device-recipes.md), and [the quality/iteration recipes](references/quality-repair-and-iteration.md). Decide internally as:
```text
Scope → Key L → Exposure E → Fill/Shadow → Skin scale S → Skin finish P → Light color T → Look G → Capture D → Background/Atmosphere A → Quality Q
```
Select exactly:
```text
one L + one E + one S + one P + one T + one G + one D + zero or one A + one Q
```
Use one key-light system. Atmosphere and skin reflections must inherit its direction, size, falloff, and color. E controls exposure, G controls palette/curve, and D controls capture response; none may invent another light. `A6` is the sole override: force E6 silhouette exposure, remove all subject fill/catchlights/internal illumination, use L/T only for the rear source and background, and suppress S/P. Q may clean the background but must never restore detail inside the silhouette.
Send four core lines, adding RENDER for a requested grade/device response and QUALITY for an observed repair target:
```text
EDIT: scope, identity/structure lock, and source-optics lock.
LIGHT: one L, one E, physical shadow/background response, T, and optional A.
RENDER: one G plus one D, only when either differs from source.
SKIN: one scale-aware S behavior plus one source-consistent P finish.
QUALITY: one Q repair, only when Q differs from source.
AVOID: only the two or three failures most likely for this source.
```
- Use four lines when `G0 + D0 + Q0`; add RENDER only for a requested grade/device and QUALITY only for an observed repair target. Target `55–110` English words, with an absolute ceiling of `135` for combined edits.
- State identity once. Treat the source itself as the identity card; do not invent a new age, personality, beauty description, lens, or aperture.
- Use positive, observable photographic behavior before negative constraints. Omit recipe codes, audits, confidence, backend notes, and reasoning.
- Compile bare words such as `cinematic`, `editorial`, `HDR`, `film`, `DSLR`, `medium format`, or `smartphone` into vi提问、分享技巧或报告无法使用。按“有帮助”数量排序。