Home / All Skills / Design & Motion / travel-photo-abstraction
Design & Motion · Evianis/travel-photo-abstraction

travel-photo-abstraction

Analyze the photograph uploaded by the user, deconstruct its visual evidence, abstract and distill the essential relationships, then reconstruct them as a new nonliteral lower-panel composition guided by 19 bundled references. Use for CLEAN upper-photo/lower-abstraction editorial artworks with a number, date, and short phrase in the lower panel. This is abstraction and reconstruction, never style conversion or a miniature redraw. Preserve the exact user-uploaded photograph unchanged above.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandNetwork AccessWrite FileDual-pass Audit
Author EvianisGitHub Evianis/travel-photo-abstraction ↗Stars 749License Travel Photo Abstraction Source-Available License 1.0(仓库根 LICENSE,© 2026 Evianis;GitHub API spdx 为 NOASSERTION——明确非 OSI 开源许可:禁止修改/衍生/再分发)Commit 96e387635e
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

The core of the process is prompt orchestration based on 'visual evidence → minimalist symbol mapping' rather than algorithms: the skill defines the generation task into three stages: Deconstruct → Abstract/distill → Reconstruct. The model must first compile an evidence checklist of the source image, map it into symbols, and finally reconstruct it into a sparse layout.

travel-photo-abstraction/SKILL.md
Treat the task as three deliberate operations: **deconstruct**, **abstract/distill**, and **reconstruct**. The lower panel is a new visual composition made from relationships extracted from the upper photograph. It is neither a miniature redraw nor a style-converted copy.
What is happening here: Strict three-stage phrasing rules out default generative model behaviors like 'style transfer / miniature redrawing' as invalid, forcing the model along an evidence-preservation path. Sections 1–4 of references/analysis-method.md provide operational evidence tiers (Recognition / Structural influence / Contrast / Specificity) and a symbol lexicon (mass → flat block, boundary → thin line, etc.), anchoring every step of the abstraction process to observable facts in the source image.

The 'Deconstruct-Reconstruct' workflow is divided between the upper generative model and lower deterministic Python scripts: the abstract lower panel is handed to the built-in image generation tool, while image composition, micro-typography typesetting, and machine validation are all handled by local scripts to prevent the generative model from tampering with the photo or producing erroneous text.

travel-photo-abstraction/SKILL.md
Supply the image tool with locked `USER_PHOTO` plus 3–4 selected bundled references in one generation call (the tool accepts at most five images total). Label roles explicitly: `Image 1 = USER-UPLOADED CONTENT SOURCE ONLY`; `Images 2–N = BUNDLED LOWER-PANEL STYLE REFERENCES ONLY`. Generate only `GENERATED_PANEL`.
Locking input roles (Image 1 = sole content source, 2–N = style only) and specifying 'Generate only GENERATED_PANEL' is the core defense against hallucination/diffusion: style references must never contaminate the content channel, and the user photo must never become an editing target.

Deliverables can only be produced by finalize_artwork.py, which sequentially executes compose_artwork.py (composition) + validate_output.py (validation); any failure at any step deletes the output and refuses delivery (fail-closed).

travel-photo-abstraction/scripts/finalize_artwork.py
try: subprocess.run(compose, check=True) subprocess.run( [sys.executable, str(scripts / "validate_output.py"), str(output), "--original", str(original)], check=True, ) except (subprocess.CalledProcessError, OSError): if output.is_file(): output.unlink() raise SystemExit("FINALIZATION FAILED: invalid output removed; deliver no artwork")
What is happening here: finalize is not simple glue—failure branches explicitly delete candidate outputs, and SKILL.md synchronously requires 'Return an image only after the finalizer prints DELIVERY PASS', physically removing intermediate artifacts that failed validation from the delivery surface.

Pixel-level photo integrity is guaranteed by validate_output.py via machine checks: the top of the final image is cropped to the exact dimensions of the source photo and compared pixel-by-pixel using ImageChops.difference, requiring zero difference.

travel-photo-abstraction/scripts/validate_output.py
photo_match = None actual = image.crop((0, 0, source.width, source.height)) photo_match = native_dimensions and ImageChops.difference(actual, source).getbbox() is None
validate_output.py locates the split line based on relative image dimensions (split=source.height, lower area=height-split, requiring 1.10≤panel/photo≤1.60 and panel taller than photo). It also performs a uniformity check across 6 sampling points on the empty lower background (channel_span≤4.0 required to pass) and checks the lower area for average brightness/neutrality—all deterministic rules without subjective AI judgment.

The three micro-typography elements (NO. 00X / DD MON YYYY / UPPERCASE PHRASE) are strictly validated via regex and drawn deterministically; the generative model is prohibited from rendering any text in the canvas.

travel-photo-abstraction/scripts/compose_artwork.py
NUMBER_RE = re.compile(r"^NO\. \d{3}$") DATE_RE = re.compile(r"^\d{2} [A-Z]{3} \d{4}$") PHRASE_RE = re.compile(r"^[A-Z0-9]+(?: [A-Z0-9]+){0,2}$")
The generation prompt scaffold in SKILL.md similarly hardcodes 'Text: generate no text of any kind'. The date/phrase/number elements are mandatory components of the finished artwork, but they may only be drawn by compose_artwork.py using ImageDraw as light gray fine text (fill=(145,145,140), font size approx min(w,h)*0.012). Any text generated in the rendering stage results in immediate disqualification.

19 bundled style reference images constitute an 'approved visual grammar library', strictly separated from the source photo's content channel; references only lend abstract grammar, density, and whitespace, not content or legacy layouts.

travel-photo-abstraction/references/structural-reference-index.md
Use the selected lower panels to guide abstraction vocabulary, mark-making, scale contrast, restrained color, editorial quietness, and poetic negative space. The current `USER_PHOTO`, not the references, supplies the miniature's complete composition, aspect ratio, topology, and element coordinates. Do not copy reference subjects or exact compositions.
All 19 PNGs genuinely exist (verified via PNG header parsing, approx 836–1122 × 1402–1881 portrait format); the index table annotates what to learn from each image (e.g., 011 for extreme reduction, 019 for converging road lines). The 9 showcase images in README match the exact dimensions of their corresponding memory-references, serving as watermarked demonstrations of the same batch.

Installation self-check and operational gatekeeping: check_installation.py verifies that all required files and the 19 reference images are present, failing if anything is missing; SKILL.md also requires verifying that the host's built-in image tool is callable before generation, halting immediately otherwise.

travel-photo-abstraction/SKILL.md
1. Run `scripts/check_installation.py`. Stop and report an incomplete installation if it fails. 2. Confirm that a built-in image generation tool is callable. If it is absent, unavailable, denied, or fails, stop and tell the user.
REQUIRED and STRUCTURAL_REFS in check_installation.py correspond one-to-one with the repository's actual file list (19 memory-reference PNGs asserted by 001–019 naming); the script itself is a pure file existence check. Relying on host image tools means this skill is only usable on hosts with built-in image generation capabilities (Codex/ChatGPT class), as stated in the README: 'Codex with skill support'.

2Core Capabilities

01Photo evidence-driven abstract lower panel generation: Deconstructs any travel/daily photo into primary elements, structural axes, and spatial rhythm, reconstructing them into a nonliteral abstract composition preserving the source relationships
02Pixel-level user photo fidelity: Places the original photo on top without scaling or cropping, with machine validation verifying zero pixel difference before delivery
03Deterministic micro-typography typesetting: Numbers, dates, and phrases are ingested via strict regex parameters, barring text during generation and rendering text during composition
04Machine QA for CLEAN background contract: Requires a uniform, near-#F3F0E8 monochromatic background for the lower panel, enforcing multi-point channel span ≤4.0 and average brightness ≥205, rejecting non-compliant outputs
05Selective borrowing from a 19-image style library: Picks 3–4 references guided by the structural-reference-index, strictly applying styles only to the lower panel
06Fail-closed delivery gate: Deletes candidate files and halts upon missing source images or validation failures, never returning intermediate panels
07Hardcoded aspect ratio discipline: Enforces that the abstract panel's display height must be 1.10–1.60 times the photo height, rejecting composition if out of bounds

3External Dependencies

KindDependency / Endpoint
api宿主内置图像生成工具(built-in image generation tool)
packagePython Pillow(PIL)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • scripts/: Execute local script or command: travel-photo-abstraction/scripts/check_installation.py (installation self-check, pure file existence check)
  • 网络端点: Declare external network access: Zero network calls in SKILL.md or script source code (repository-wide token scanning for URL/curl/wget/requests only matches git cl in README)
  • 本地工作目录: File read/write and artifact output: compose_artwork.py writes the final composite image to the path specified by --output and automatically creates parent directories (output.parent.mkdir(parent
Audit Notes: Risk Notice: Blue (Generally safe, minor points of attention). No credential access, no external network requests, no third-party code execution—the executable surface consists solely of 4 bundled scripts that interact purely via local paths and valid parameters (subprocess calls sibling scripts in the same directory, with parameters enforced by strict regex); the only external side effect is invoking the host's image generation tool to process user photos (which is the core function of the skill, and both README/SKILL require confirming tool availability beforehand). Points of attention: a) Reads/writes local image files and outputs PNGs (Pillow parsing untrusted images constitutes a host library risk surface); b) Uploaded photos are sent as input to the image generation tool, subject to host platform privacy terms; c) Although the prompt's three-stage phrasing prevents 'style transfer', it still generates aesthetic content requiring human aesthetic evaluation; d) Authorizing 'passing photos to external image tools' means photo data leaves the local environment, requiring discretion for sensitive photos. No obfuscated, hidden, or download-and-execute code.

5Second-Pass Verification

  • [ok] 像素保真由机器验证而非口头承诺 — validate_output.py 第 90 行附近 ImageChops.difference(actual, source).getbbox() is None + native_dimensions 判定,README『pixel-verify』无夸大。
  • [ok] finalize_artwork.py 只调兄弟脚本、无外带载荷 — subprocess 参数 = sys.executable + scripts/ 下 compose_artwork.py/validate_output.py + 本地路径与正则校验过的三文本;无 shell=True、无环境变量透传。
  • [ok] 无网络调用、无凭证读取结论 — 全仓 token 扫描命中仅两处:README git clone URL(人用安装命令)与 finalize 本地 subprocess;os.environ/getenv/keyring/api_key 等零命中。
  • [ok] 19 张样式参考真实存在且为图 — PNG 头逐一验证 memory-reference-001..019.png 均为合法 PNG,竖幅、尺寸各异;check_installation.py 的断言与文件清单一致。
  • [ok] 文本三件套仅由确定性脚本添加(生成阶段禁字) — compose_artwork.py 正则 NUMBER_RE/DATE_RE/PHRASE_RE + ImageDraw 绘制;SKILL.md 第 10、11 步与 prompt scaffold『Text: generate no text of any kind』双重印证。
  • [ok] 背景 CLEAN 契约可机器核验 — validate_output.py 6 采样点 (0.12,0.18)(0.50,0.18)(0.12,0.48)(0.88,0.48)(0.50,0.88)(0.88,0.88) + channel_span≤4.0 + lower_brightness≥205 判定存在。
  • [ok] 依赖清单完备性(有无漏掉 CLI/包) — 可执行代码只用 sys.executable/subprocess 调兄弟脚本与 Pillow(import 处显式报错提示);字体走系统字体候选列表(DejaVuSansMono.ttf/consola.ttf/Menlo.ttc)失败则 fallback load_default,非硬依赖。无 gh/git/ffmpeg/yt-dlp 等外部 CLI。
  • [ok] commit/metadata 一致 — git HEAD==96e387635edf==pin;GitHub API:stars 749、pushed_at 2026-08-03T00:24:09Z(与本地最后提交同时刻)、license spdx NOASSERTION(仓库 LICENSE 为自拟 Source-Available 1.0,README 明示非 OSI 开源)。

6Verdict & Scenarios

  • Extremely clear division between 'generative aesthetics' and 'deterministic engineering', completely removing areas where models are unreliable (pixel fidelity, text, sizing) from the generation phase.
  • Fail-closed delivery gate: Any failure at any step deletes candidate files and halts delivery, eliminating 'unfinished artifacts + verbal excuses'.
  • Bundles 19 portrait style references with an image-by-image index, turning 'abstract grammar' into actionable assets rather than model improvisation.
  • Strict anti-degradation and anti-hallucination rules: Texture, vignetting, miniature scenes, invented symmetry, and hallucinated occluded bodies are explicitly listed as rejection criteria.
  • Rigid self-check and stop discipline: Halts immediately if the environment is incomplete (missing files, no image tool, broken paths) without falling back to degraded inputs.
  • Best for: Creators and designers on hosts with built-in image generation tools (Codex/ChatGPT class) who want to turn travel, street, or daily photos into 'upper photo + lower abstraction' editorial artworks; workflows requiring auditable quality contracts (pixel fidelity, no generated text, uniform background) for batch or serialized output; especially suited for serial works generating multiple distinct relationship abstractions from a single photo (utilizing the NO. 00X increment mechanism).
    Not for: Hosts lacking built-in image tools (execution will halt immediately); workflows requiring stylization or filtering of the photo itself (the skill strictly prohibits generative editing of the original photo); secondary development needing alterations to the visual language or pipeline (license prohibits modification and redistribution); scenarios treating the abstract panel as a standalone asset (the panel is defined as an intermediate asset that must be delivered alongside the photo).
    Install Agent-Ready
    ① Verified Mirror 2026-09-09
    Option A · Direct DownloadDownload travel-photo-abstraction.tar.gz
    sha256: 013e3c7b5205fbdc…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 96e387635e.