1实现原理 · 为什么它能做到
零代码的『编排 + 知识库』双层纯 prompt 实现:SKILL.md 是工作流与审美纪律层(先看图→取线索→选配方→生成→质检),references/afterimage-editorial-prompt.md 是被 SKILL.md 强制前置阅读的『提示词编译器』(结构约束、保真禁令、题材处理、签名系统、可直接套用的 Prompt Template)。
Read `references/afterimage-editorial-prompt.md` before composing the final image prompt.
像素生成完全委托宿主 image tool,skill 自身不含任何脚本/API 端点/供应商绑定:SKILL.md 只要求『用图片生成/编辑工具、以用户照片为参考图』,供应商由宿主(Codex 的图像工具)决定。
This is a creative image-generation skill. When producing the final image, use the image generation/editing tool with the user's photo as the reference image.
核心创作约束是『照片区真值 + 下半 relic 区抽象』的二分:任何重绘/美化/扩展/风格化都只禁止作用于真实照片区域,抽象被限定在下半 relic 区,保证成图是『真照片 + 记忆版画』而非整图滤镜。
Use abstraction only in the relic region unless the user explicitly asks for an integrated edit.
美学决策被参数化成 5 条配方轴(layout rhythm / relic grammar / mark weight / title mode / motion seed),每条轴给离散选项,prompt 前先『点菜』,用同一配方系统保证跨照片的系列一致性、靠换选项制造变化。
Pick one option from each axis before writing the image prompt. Vary the recipe when recent outputs look too similar, but keep the series identity stable.
『把细节翻译成标记』的转译表是出图质量的直接来源:屋顶→叠弧、窗→稀疏切口/小点、人→短竖刻、水→一两条水平残迹,避免把面板填成插画或装饰。
Translate details into marks, not decorations: roof layers become stacked arcs; windows become sparse cuts or tiny dots; people become short vertical ticks; water becomes one or two horizontal residues; dusk becomes one small warm signal.
双 Quality Gate(SKILL.md 十项 + references 九项)在成图前做清单式自检,任一主项失败只允许『更短更严』地重生成一次,防止无脑重试或降低标准放行。
If one major item fails, regenerate once with a shorter, stricter prompt focused on that failure.
Codex 生态入口:agents/openai.yaml 提供 display_name / short_description / default_prompt,README 引导把整目录拷进 ~/.codex/skills 后用 $photo-relic-editorial 触发;中文 README 还示范了『四字中文标题』系列化用法。
default_prompt: "Use $photo-relic-editorial to turn this photo into a Photo Relic artwork with a truthful photo region and a recognizable abstract memory print."
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| api | 宿主图像生成/编辑工具(参考图输入;SKILL.md 未点名厂商,供应商由 Codex 宿主决定) |
4风险提醒 风险提醒:绿色 · 放心使用
- 成图质量完全押在宿主图像模型对长文本禁令的遵从度上 — 『不修饰照片区/只在 relic 区抽象』是 prompt 软约束,弱模型可能照样给照片加滤镜或把 relic 画成插画;skill 只有质检后『再生成一次』的补救,无硬校验手段。
- 用户照片必然外发至图像模型供应商 — 功能本质决定参考照片会经宿主 image tool 出网(示例元数据显示供应商为 OpenAI gpt-image),涉密/未授权素材不应使用;素材版权与肖像权责任由用户自负(README MIT 段声明 'images you have permission to transform')。
- 示例图为 AI 生成的『理想示范』,可能造成效果预期偏差 — examples/paper-beijing 六张成图均为 gpt-image 2.0 生成并带 C2PA 水印/凭证,真实照片转换的实际效果取决于原图质量与模型,未必复现 README 展示质感。
- 视觉 prompt 引导面 — 输入照片中的文字/构图可能被图像模型当指令解读(通用视觉模型问题);照片是用户自持输入,风险面在宿主模型而非 skill 代码,但涉及商业图库图时需留意衍生作品与原图的近似度。
5第二遍独立确认
- [ok] 外部依赖唯一条目:宿主 image tool + 无厂商端点 — SKILL.md 全文本扫描确认只有 'use the image generation/editing tool' 一类泛称,无 openai/gpt/anthropic/replicate 等点名;示例 PNG 的 C2PA 元数据(gpt-image 2.0)属产物证据而非指令,已在条目 note 中如实标注为『实际出图工具』推断。
- [ok] security.grade=green 的反例搜查(隐藏脚本/网络/凭证) — 隐藏文件仅 .gitignore/.DS_Store 类忽略项;文本文件 URL/token/exec 模式零命中;无 package.json/requirements/*.sh;唯一网络痕迹出现在 examples/*.png 的 C2PA 证书链(cv.iptc.org、ocsp-c2pa.ssl.com、trufo.ai),属图片内嵌内容凭证,非可执行代码。
- [ok] 『照片区不可篡改』声明 vs 实际能力 — 该声明是写给宿主图像模型的文本禁令(SKILL.md Creative Rules + references Photo Preservation 双重强调),skill 无代码可强制执行;第一遍已将其表述为『prompt 层约束 + Quality Gate 兜底』,未夸大为硬保证。
- [discrepancy] README 'Paper Beijing' 示例图身份 — 第一遍初读时按 README 语境默认示例是真实照片经 skill 处理的成图——成立;但第二遍在 PNG 内发现 C2PA 软件代理串 'nameigpt-imagegversionc2.0' 与 'c2pa.watermarked.unbound',确认示例成图由 OpenAI gpt-image 2.0 生成并含水印/内容凭证动作。此发现不推翻结论,但 internal_assets 与 verdict 对示例图的描述已按此修正(AI 生成示例,作为审美锚点)。
- [ok] references 文档『Prompt Compiler / Quality Gate』引用准确性 — 逐字重读 156 行全文,第一遍所用 quote(recipe 槽位模板、'If a major gate fails, regenerate once with a shorter corrective prompt…'、'Use abstraction only in the relic region…'、Signature System 色板/比例)均与原文一致。
- [ok] 元数据:commit/license/stars/last_push — GitHub API:spdx mit、stargazers_count 378、pushed_at 2026-08-05T02:37:31Z(= pin commit 时间,仓库 3 个 commit 无更新);本地镜像 HEAD == pin sha 2232da16afddc7940e2e2f280bfb85aa62da1bae。
6结论
38c0459aca3ab84d…2232da16af