CommunityImagengithub.com

photo-export

Local CPU-only deterministic NON-DESTRUCTIVE photo export. Chains sibling skills photo-cull -> photo-develop -> photo-render (their exact documented CLIs; no reimplementation; no invented flags), then COPIES finished sRGB rendered images into <source>/Export. Source/session folder read-only; originals never modified; no source/XMP writes; no adjacent sidecar writes; no network; no GPU; no style learning (not photo-style-edit); no retouching; applies ONLY already-present XMP via photo-render; unsupported XMP fields reported, never silently dropped; no Adobe Lightroom/Capture One/Aftershoot pixel parity; sample mode is NOT a full-pipeline claim. All intermediates go to a work dir (default <parent>.photo-export-work; never inside Export); nothing else is written into <parent>. Clear per-stage errors; missing tool / source / malformed input / no-keepers fail loudly. Optional reuse (--reuse-cull/--cull/--xmp/--no-cull/--no-develop/--no-render, <work> pre-cull + photo-ai/xmp + .state.json...

¿Qué es photo-export?

photo-export is a Claude Code agent skill that local CPU-only deterministic NON-DESTRUCTIVE photo export. Chains sibling skills photo-cull -> photo-develop -> photo-render (their exact documented CLIs; no reimplementation; no invented flags), then COPIES finished sRGB rendered images into <source>/Export. Source/session folder read-only; originals never modified; no source/XMP writes; no adjacent sidecar writes; no network; no GPU; no style learning (not photo-style-edit); no retouching; applies ONLY already-present XMP via photo-render; unsupported XMP fields reported, never silently dropped; no Adobe Lightroom/Capture One/Aftershoot pixel parity; sample mode is NOT a full-pipeline claim. All intermediates go to a work dir (default <parent>.photo-export-work; never inside Export); nothing else is written into <parent>. Clear per-stage errors; missing tool / source / malformed input / no-keepers fail loudly. Optional reuse (--reuse-cull/--cull/--xmp/--no-cull/--no-develop/--no-render, <work> pre-cull + photo-ai/xmp + .state.json...

Compatible con✓Claude Code~Codex CLI~Cursor✓OpenCode
npx skills add https://github.com/jpb18/FototecaSkills/tree/HEAD/photo-export

Installed? Explore more Imagen skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

photo-export — local deterministic non-destructive export packaging

photo-export does no new rendering math, no culling, no develop itself. It chains existing sibling skills in order by calling their exact documented scripts/run_pipeline.py CLIs as subprocesses (CPU-only; no network; no sibling modification), then copies the finished images. It never reimplements a sibling; it never invents a sibling flag; it never deletes sources; it never mutates source files or source *.xmp.

Sibling dependencies (must be installed next to this skill; never modified)

  • photo-cull C:\...\skills\photo-cull\scripts\run_pipeline.py
  • photo-develop C:\...\skills\photo-develop\scripts\run_pipeline.py
  • photo-render C:\...\skills\photo-render\scripts\run_pipeline.py

(Resolved as siblings of this skill directory; OPENCODE_SKILLS_DIR env can override the skills root. A missing sibling script or missing python is a clear error, not a silent skip. Sibling runtime deps are the siblings' own — e.g. photo-cull needs opencv-python numpy exifread, mediapipe (imported unconditionally; --no-faces only skips model loading) + bundled models; photo-develop needs rawpy + Pillow; photo-render needs numpy + Pillow + reuses photo-develop raw.py + a bundled sRGB.icc. Optional lightcraft-cli backend only if present (--lightcraft-cli); no network.)

Run

python "$env:USERPROFILE\.config\opencode\skills\photo-export\scripts\run_pipeline.py" `
  --source "C:\path\to\session"

Windows/PowerShell; quote paths. --source = session folder, read-only. Bounded scans (siblings). CPU-only (CUDA_VISIBLE_DEVICES=-1, etc.).

Chaining (order; reuse; do NOT reimplement)

  1. photo-cull python <photo-cull>\scripts\run_pipeline.py --source <SOURCE> --output <WORK>\pre-cull-report [--no-faces] Only --source/--output/[--no-faces]. Produces <WORK>\pre-cull-report\scores.json
    • metadata.json + thumbs. Keepers = is_keeper==true. Conservative keep; no deletion; originals read-only; output redirected into <WORK> (never parent). No keepers => clear error. Malformed scores.json => clear error. NOTE: photo-cull scans only top-level .jpg (non-recursive).
  2. photo-develop python <photo-develop>\scripts\run_pipeline.py --source <SOURCE> --cull <WORK>\pre-cull-report --output <WORK>\photo-ai [--sample N] [--no-previews] --profile <read-only-neutral> [--lightcraft-cli PATH] CPU; non-destructive; reuses scores.json. Produces <WORK>\photo-ai + <WORK>\photo-ai\xmp\<stem>.xmp (Adobe Camera Raw, PV2012 11.0, with a per-frame ToneCurvePV2012, read-only suggestions) + .state.json. NOT --adjacent-sidecars. The LightCraft executable is auto-detected and passed to this stage too, so the tone curve is calibrated against the same renderer that produces the export; previews and exports then show the same image. NOT --force. Never writes source XMP. Style read-only / no style written: a shipped all-zero assets\neutral-profile.json is passed as photo-develop's documented --profile; this prevents photo-develop from auto-creating ~/.config/opencode/photo-develop/style-profile.json; nothing is learned or written. NOT photo-style-edit. NOTE: photo-develop only emits XMP for keepers with a matching .ARW; per-image errors are surfaced, not silently dropped (no silent unsupported drop).
  3. photo-render python <photo-render>\scripts\run_pipeline.py --source <SOURCE> --cull <WORK>\pre-cull-report --xmp <WORK>\photo-ai\xmp --output <WORK>\photo-render [--sample N] [--format jpeg|tiff|png] [--jpeg-quality 92] [--max-long-edge N] [--recursive] [--keep-pairs] [--emit-xmp] [--require-xmp] [--renderer auto|builtin|lightcraft] [--lightcraft-cli PATH] --require-xmp is always added unless --allow-missing-xmp is given: a frame without a sidecar was deliberately not selected for development, so it is reported as skipped instead of being exported with default settings. Applies ONLY already-present XMP; prefers <WORK>\photo-ai\xmp (photo-develop output); source read-only; no source-XMP overwrite; sRGB (only); JPEG q92; full resolution unless --max-long-edge; output <WORK>\photo-render\rendered\* + summary.json + report.html (+rendered-xmp\*.xmp iff --emit-xmp; verbatim copies; never overwrite source); no style learning; no retouching; no network; no Adobe pixel parity; applied_fields / unsupported_fields / unsupported_field_counts reported; sample => status=sample & full_pipeline_claim=false.

Passthrough (forwarded; nothing else invented)

--no-faces, --no-previews, --sample N, --format, --jpeg-quality, --max-long-edge, --recursive, --keep-pairs, --emit-xmp, --renderer, --lightcraft-cli, --no-cull, --no-develop, --no-render, --reuse-cull, --cull, --xmp, --overwrite-export, --export-dir, --work-dir, --dry-run. Defaults: format=jpeg, jpeg-quality=92, max-long-edge=full, renderer=auto, color_space=sRGB.

Export rule (the point)

  • <SOURCE> session folder read-only. <parent> = os.path.abspath(<source>).
  • Final images are COPIED, not moved, from <WORK>\photo-render\rendered* (finished rendered/; only image files) into <parent>\Export i.e. <source>\Export. Create it. Name exactly Export. <parent> = abspath (source); nothing else is written into <parent>. Only <parent>\Export
    • <WORK> are touched.
  • --export-dir overrides the target (absolute or relative; honored).
  • no-op if already inside Export: don't create Export\Export, don't re-copy content already inside the export dir, don't nest when <parent> is already inside an Export directory.
  • Only these go in Export: final rendered images + optional render-summary (summary.json, copied) + optional report (report.html, copied) + optional Export\export-summary.json manifest
    • optional emitted XMP (<WORK>\photo-render\rendered-xmp\*.xmp, only with --emit-xmp, verbatim; never overwrites source XMP). Nothing else.
  • Stable order (sorted case-insensitive then name). Deterministic unique names. Don't overwrite existing Export files unless --overwrite-export. collision -> name-2.ext (then name-3.ext, …; also against names added this run). Never overwrite sources. No source EXIF/XMP rewrite.
  • All intermediates (pre-cull-report, photo-ai, photo-render, rendered/, logs, .state.json, rendered-xmp source, …) go to <WORK> (default <parent>.photo-export-work; or --work-dir; temp allowed; never inside Export; never inside read-only <SOURCE>; nothing in <parent> outside Export + <WORK>). No photo-ai/pre-cull-report in source. No style written. No adjacent writes.
  • CLI --work-dir, --export-dir, --overwrite-export, --dry-run, --reuse-cull/--cull, --xmp, --no-cull/--no-develop/--no-render, and all listed passthrough flags.

Reuse

  • --reuse-cull: skip photo-cull; reuse <work>\pre-cull-report.
  • --cull <dir|scores.json>: reuse existing cull; skip photo-cull.
  • --xmp <dir>: reuse existing XMP; default <work>\photo-ai\xmp.
  • --no-cull / --no-develop / --no-render: skip stage; reuse artifacts in <work> (pre-cull-report, photo-ai + xmp, photo-render + rendered
    • summary.json).
  • Reuse <work> pre-cull-report, photo-ai\xmp, and .state.json.
  • <work>\.state.json (photo-export resume; no secrets) + <work>\photo-ai\.state.json (photo-develop checkpoint) written.
  • --dry-run: print planned stage commands + planned export targets; write nothing; run no siblings; full_pipeline_claim=false.

Manifest (Export\export-summary.json, optional; no secrets)

schema_version, tool, status, full_pipeline_claim, sample, sample_mode, source, parent, work_dir, export_dir, rendered_dir, stages (cull/develop/render/export status + reused artifacts + errors), counts (total_records/keepers/rendered/exported/render ok+error/applied + unsupported instances; unsupported_dropped=0), keepers, applied_fields, unsupported_fields, unsupported_field_counts, renderer, renderer_used, renderer_backend, render_status, render_full_pipeline_claim, format, jpeg_quality, color_space=sRGB, max_long_edge, recursive, keep_pairs, emit_xmp, overwrite_export, no_op, exported_images, render_summary, report, emitted_xmp, reused_artifacts, reused, honesty, no_secrets. full_pipeline_claim = NOT sample AND render full_pipeline_claim AND no stage errors AND not no-op AND rendered>0. Sample != full. No secrets/credentials.

Clear per-stage errors

Missing sibling tool/script, missing python, missing/unreadable source, malformed scores.json, no keepers, malformed XMP, per-image render error, photo-develop per-image errors, missing reuse artifact, bad flags — all produce a clear [stage=...] error and nonzero exit; nothing is silently dropped. unsupported_fields always carried through.

Honesty / non-goals

Local CPU-only; deterministic; non-destructive; originals read-only; no network; no source/XMP mutation; no adjacent writes; no source photo-ai / pre-cull-report; no style learning; not photo-style-edit; no retouching; no new renderer math; no source deletion; no invented flags; no reimplementing siblings; no sibling modification; no silent unsupported drop; sample != full claim; no Adobe Lightroom / Capture One / Aftershoot pixel parity; not GPU. Underlying model/provider internals are private.

Remaining limits

  • Inherits siblings' limits verbatim (see photo-cull / photo-develop / photo-render SKILL.md): photo-cull scans only top-level .jpg, non-recursive, conservative; photo-develop needs matching .ARW per keeper to emit XMP (otherwise rendered unedited + reported; per-image errors surfaced), reads an existing profile read-only but applies photo-develop's own conservative suggestions; photo-render builtin renderer is a documented approximation (not Adobe-exact), crs:CameraProfile/HSL/split-toning/lens/local-adjust/noise+ sharpen (builtin)/named-curve-without-points/EXIF-only/AlreadyApplied re-derivation etc. unsupported & reported, sRGB-in→sRGB-out, crop/WB/contrast approximations, LightCraft (if used) not Adobe, output determinism depends on installed rawpy/Pillow/numpy, RAW decode depends on LibRaw version.
  • Photo-export itself adds no pixels; final quality == photo-render output.
  • <parent>\Export re-run: collision name-2.ext unless --overwrite-export.
  • On --recursive re-runs, photo-render itself scans <source>; exclude Export outputs manually if re-rendering an already-exported source.
  • no-op if already inside Export interpretation (see Export rule) is applied conservatively; --export-dir into source root is honored but source originals are still never overwritten.
  • Default <work> is sibling <parent>.photo-export-work; --work-dir rejected if inside read-only source or inside Export.

Tests

python -m py_compile "$env:USERPROFILE\.config\opencode\skills\photo-export\scripts\run_pipeline.py"
python -m unittest discover -s "$env:USERPROFILE\.config\opencode\skills\photo-export\tests" -v

Stdlib unittest; no network; no sibling modification; uses synthetic temp sources + temp fake sibling tree for chaining/order/error tests + (where real sibling deps + real .ARW are available) real end-to-end. Covers chaining order, scores.json keepers, photo-ai/xmp produced+preferred, sample, <source>\Export created + rendered copied, nothing in parent outside Export+work, source bytes + source XMP unchanged (sha256), no adjacent writes, no source photo-ai/pre-cull-report, no style written, sRGB, q92, max-long-edge, collision, overwrite, dry-run, missing tool/source/malformed/no-keepers clear error, manifest schema, no silent drop, no network, stable order.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

photo-compose

Local CPU-only non-destructive intelligent composition step for the photo pipeline (photo-cull -> photo-compose -> photo-develop -> photo-export). Analyses each photo-cull keeper for horizon/level (accidental tilt), verticals/perspective, saliency, focal elements, face gaze and movement space, then proposes and ranks rotation + smart-crop candidates and writes Camera Raw geometry XMP (straighten + crop + orientation) plus an interactive accept/reject/adjust report. Deterministic geometry in code; semantic/aesthetic judgment supplied by a multimodal agent via semantic.json. Use when the user asks to straighten horizons, level or fix tilt, crop or re-crop smartly, improve composition/framing, apply rule-of-thirds / golden ratio / negative space / gaze space, rotate photos, fix perspective or vertical lines, choose an aspect ratio, or to run/repair the composition step of a photo batch. Originals are read-only; nothing is written into the source except by photo-export's own Export folder.

photo-cull

Pipeline local de pré-culling fotográfico: analisa uma pasta de fotos (JPG/ARW) e detecta, automaticamente, fotos com desfoco, motion blur, sobre/subexposição, banding de LED e olhos fechados, classificando cada uma em MANTER / REVISAR / REJEITAR / INDETERMINADO; agrupa fotos duplicadas/quase-duplicadas e escolhe a melhor de cada grupo; produz um relatório HTML centrado em grupos. Usa esta skill sempre que o usuário quiser filtrar, "pre-cull", analisar qualidade, remover duplicados ou limpar um lote de fotos — por exemplo "remove fotos desfocadas", "encontrar fotos sobreexpostas", "reporte de qualidade de fotos", "culling de fotos de um evento", "limpa esta pasta de fotos ruins", "encontrar fotos com olhos fechados", "remover duplicadas" — mesmo que não diga a palavra "culling" explicitamente.

photo-develop

Local CPU-only Sony ARW develop, image review, Lightroom/Camera Raw XMP with a per-frame tone curve, previews and session report. Reuses photo-cull scores.json without repeating pre-cull.

photo-render

Local CPU-only deterministic non-destructive renderer: apply EXISTING edits from matching *.xmp sidecars (exposure, white balance, contrast, highlights, shadows, whites, blacks, saturation/vibrance, tone curve, crop/rotate/ straighten, process-version aware) to source RAW (Sony .ARW) or supported images and write finished sRGB images (JPEG 92 / TIFF / PNG, full resolution or --max-long-edge). Third stage of photo-cull -> photo-develop -> photo-render. Prefers photo-develop XMP at <source-or-output>/photo-ai/xmp. Originals read-only; source XMP never overwritten; no style learning; no retouching; no network. Batch-capable; reuses photo-develop raw.py + cull_input and optional LightCraft CLI backend when present; honest applied/unsupported field reporting; no Adobe Lightroom/Capture One/Aftershoot pixel parity.

Skills relacionados