photo-s

photo-s is a skill for Claude Code, Codex from Dongwu259/photo_s. It costs 443 tokens per session (4,004 once invoked), scanned A, original, MIT.

A command-line toolkit for processing many photos at once, including RAW camera files and JPEGs. It can also work with photo metadata, such as ratings, keywords, camera details, and GPS information.

In plain words
What is it for?
Use it to compress, convert, resize, organize, compare, select, and rank photos, or to keep the sharpest image from similar shots.
Why use it?
It reduces repetitive photo work and provides machine-readable JSON results for automation while requiring explicit options before files are moved, deleted, or overwritten.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to compress, convert, resize, organize, compare, select, and rank photos, or to keep the sharpest image from similar shots.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dongwu259/photo_s/photo-s
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Dongwu259/photo_s --skill photo-s
Clone the repo
git clone --depth 1 https://github.com/Dongwu259/photo_s

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for photo-s

README.md
[![agentmods](https://agentmods.dev/badge/skills/dongwu259/photo_s/photo-s/github.svg)](https://agentmods.dev/skills/dongwu259/photo_s/photo-s)
Your own site
<a href="https://agentmods.dev/skills/dongwu259/photo_s/photo-s"><img src="https://agentmods.dev/badge/skills/dongwu259/photo_s/photo-s/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for photo-s

Your own site · 80×15
<a href="https://agentmods.dev/skills/dongwu259/photo_s/photo-s"><img src="https://agentmods.dev/badge/skills/dongwu259/photo_s/photo-s.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 443 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00443 $0.04004
Opus 5 $0.00221 $0.02002
Sonnet 5 $0.00089 $0.00801
Haiku 4.5 $0.00044 $0.00400

Measured yesterday against content hash e79d80f89168, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

photo-s scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/photo-s/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PhotoS — Batch Photo Toolbox

Positioning: CLI for AI agents, GUI for humans. All heavy lifting is exposed as stable CLI commands with machine-readable JSON output. Full contract: docs/AGENT_API.md (in this repo).

Install

pip install photo-s-tools            # core: Pillow + rawpy (RAW decode)
pip install "photo-s-tools[enhance]" # + opencv: denoise / straighten / HDR / face blur
pip install "photo-s-tools[mcp]"     # + MCP server (Python 3.10+)
  • Binary: photo-s · Python package: photo_s (importable in-process) · PyPI name: photo-s-tools · brand: PhotoS.
  • Works on macOS / Linux / Windows. Python 3.9+.

Golden rules (read first)

  1. Always pass --json for automation. Every command returns one JSON document on stdout with a top-level schema_version key (currently 1); human-readable text goes to stderr when --json is set. JSON keys are always English.
  2. Never delete or overwrite inputs implicitly. batch/compress write outputs beside inputs (or into -o DIR). Deletion-style commands (dedup keep-sharpest, --remove-original) require explicit flags.
  3. Prefer --dry-run first for anything that moves or deletes files (select, dedup) — zero writes, same JSON shape with would_* actions.
  4. Pin language when text matters: --language en|zh|auto (default auto = system detection). Use en for scripted/CI use.
  5. Exit codes: 0 = success, 1 = failure (bad args, missing deps). Per-file errors are reported in results[].status/error, not by aborting the batch.
  6. Optional opencv features (denoise, auto_straighten, hdr, blurfaces) fail per-file with a clear "install photo-s-tools[enhance]" message when opencv is missing. Check photo-s info --jsonoptional_features first.

Subcommand → task map

Task Command Notes
Full pipeline batch (compress/convert/resize/tone/crop/watermark/…) photo-s batch PATHS... [-o DIR] [-q 85] [--resize 1920x1080] [--crop-ratio 16:9] [--strip-gps] [--preset NAME] [--blur-faces MODE] [--denoise] [--ev -1] MODE = blur or pixelate; see photo-s batch --help
Single-file convert photo-s convert IN [-o OUT]
RAW → JPEG/TIFF batch photo-s batch 'RAW/*.ARW' --format jpeg rawpy built-in, no extra dep
EXIF read / write / filter photo-s exif PATHS... [--rating N] [--keywords ...] [--gps "lat,lon"] [--make --model] [--from-csv meta.csv] --rating-min N filters
Deduplicate photo-s dedup PATHS... [--action keep-sharpest] [--dry-run] perceptual hash; actions: report/move/delete/keep-sharpest
Cull by exposure/sharpness photo-s cull PATHS... [--overexposed-max ...] [--sharpness-min ...] threshold pass rejects
Quality-score ranking photo-s cull PATHS... --score [--json] weighted 0-100 (exposure/contrast/sharpness/saturation) - ranks, never rejects
Burst keep-best photo-s cull PATHS... --burst [--gap 2] --list clusters frames by EXIF time, keeps the top score per burst
Rank & move by rating photo-s select PATHS... [--keep-min 4] [--reject-max 2] [--selects-dir DIR] [--rejects-dir DIR] [--copy] [--dry-run] reads EXIF rating
HDR merge (exposure brackets) photo-s hdr IMG1 IMG2 IMG3... -o out.jpg [--align] needs [enhance]
Face blur / pixelate photo-s blurfaces PATHS... [--mode pixelate] [--margin 20] [-o DIR] privacy; needs [enhance]
Contact sheet photo-s contact-sheet PATHS... -o sheet.jpg [--cols 4] [--caption]
HTML gallery photo-s gallery PATHS... -o OUTDIR [--title ...]
Batch rename photo-s rename PATHS... --pattern '{seq}' live preview; vars: {year} {month} {day} {date} {time} {camera} {make} {iso} {focal} {seq}
Corrupt-file scan photo-s check PATHS... [--json] integrity report
SHA-256 manifest photo-s hash PATHS... -o manifest.csv [--verify manifest.csv] generate / verify
Watch a folder photo-s watch DIR [-o DIR] [--recursive] auto-process new files
Presets photo-s preset save NAME --quality 80 ... then photo-s batch ... --preset NAME saves full option set
Speed benchmark photo-s bench --dir DIR -j 1,2,4,8 [--evaluate] temp output, source untouched
LR-style grading photo-s batch PATHS... --curves "0,0;128,140;255,255" [--levels --vibrance --hsl --point-color --clarity --dehaze] compact-string params, see batch --help
Local masks + adjustments photo-s batch PATHS... --masks "sky:linear:0.5,0,0.5,1,feather=0.3" --mask-adjust "sky:exposure=-0.7" named linear/radial/color/brush masks + AI masks (subject / person / object:car) + combos (combo:A&B); mask_adjust also takes curves/hsl/vignette strings {...}
Lens correction photo-s batch PATHS... --lens-distort 0.15 [--lens-vignette "0.3,0.4" --lens-ca "0.999,1.001"] manual distortion / vignette / CA fix
Perceptual analysis photo-s analyze PATHS... --json histograms, channel stats, WB lean, exposure, blur - the feedback half of closed-loop grading
Rule-based suggestions photo-s suggest PATHS... [--scale 1.0] [--json] analyze stats → conservative fix params (ev/wb_temp/wb_tint/contrast/vibrance/highlight_recovery/levels) each with a reason + the metric behind it; neutral images return an empty dict; zero models, offline - the "decide params" step made automatic
AI auto-tone (plugin) photo-s batch PATHS... --auto-tone 0.8 personal-style 9-param prediction (pip install 'photo-s-plugin-auto-tone[model]'); its MCP tools/REST routes register automatically once installed; zero-model alternative: suggest
Visual snapshot photo-s preview IMG [--max-dim 1024] [--json] downscaled JPEG + histogram PNG (base64) - pixels for multimodal agents
Regional feedback photo-s analyze PATHS... --grid 4 --json per-cell luma/color + sky/skin ratios + over/underexposed boxes
Quality gate photo-s audit PATHS... [--over-max 2 --blur-min 0.05] [--json] pass/fail + reasons - the agent's stop condition
Version compare photo-s diff A.jpg B.jpg --json PSNR / SSIM / MAD between before/after
LR training package photo-s lr-scan [--export-dir DIR --render-dir DIR --sanitize] discover .lrcat/.xmp → coverage report + JSONL labels + before images
Auto-tone train photo-s lr-train --data lr_records.jsonl --images before/ --out m.npz ridge regression, pure numpy, 9 global params (needs >=30 edited photos)
Auto-tone predict photo-s lr-predict IMG --model m.npz image → 9 global params (auto-detect ridge / CLIP+MLP npz)
Recipe clustering photo-s lr-recipes --data lr_records.jsonl your personal style signatures as PhotoS options
Similar-edit search photo-s lr-similar IMG --data lr_records.jsonl --images before/ content-feature kNN → past edit as starting point
Eval set prep photo-s lr-eval --data ... --out eval.json --sample 200 before/after render pairs + teacher scoring template
Trace log photo-s batch PATHS... --trace DIR before-analyze → params → after-analyze per file (training format)
XMP export (Lightroom roundtrip) photo-s xmp-export IMG... [--embed] [--auto-tone 0.8] [--rating 4 --keywords a,b] [--json] writes adjustments as LR-readable XMP: JPEG gets it embedded (--embed — LR ignores sidecars on JPEG), RAW/other formats get a .xmp sidecar; masks/rating/keywords included; --auto-tone records the actually-applied predictions; batch variant: batch ... --write-xmp
Unattended pipeline photo-s autopilot DIR [--mode suggest|auto_tone|both] [--scan-existing] [--write-xmp] watch → suggest/auto-tone → process → audit gate → route to passed/ review/ + JSONL trace; --write-xmp hands off to human LR fixes (residual training signal); stop with Ctrl+C; MCP autopilot_start/status/stop for async
Semantic index photo-s index PATHS... [-r] [--tags "landscape,night" --min-score 0.2 --write-xmp] builds an embedding index (.photo-s-index.npz, incremental by mtime+size); plugin = SigLIP text+image, bare install = 84-dim histogram (image-only); --tags auto-tags top matches into EXIF/XMP keywords
Semantic search photo-s find "query words" [-k 10] or photo-s find --image REF.jpg cosine ranking over the index; prefer English queries with SigLIP (Chinese unreliable); mismatched/missing index → explicit error telling you to rebuild
Environment probe photo-s info --json version, optional features, plugins

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +16 lines · +97 tokens per session e79d80f89168
  2. 12d ago First seen · 154 lines · 346 tokens per session scan A 1455b5bc69b1

Subscribe to this mod's changes

photo-s is a skill published in the GitHub repository Dongwu259/photo_s (0 stars, last pushed 2d ago), licensed MIT. It adds 443 tokens to every session and 4,004 once invoked, about $0.0022 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gwm

Manage git worktrees across any repository with the gwm Rust binary (CLI + ratatui TUI). Use when the user asks to create / list / remove / bootstrap / switch / link worktrees, run a command across worktrees (gwm exec) or reclaim build artifacts (gwm clean), materialise a PR into a worktree (gwm review), drive a…

kbrdn1/gwm-cli · 0 tokens

bibverify

Verify, repair, explain, and generate BibTeX references with Bibverify's DOI-first CLI and MCP tools.

Hylouis233/bibverify · 26 tokens

ppt-orchestrator

A dispatcher for creating presentations, slide decks, long images, and weekly reports. It chooses a visual style and output format, then sends the work to a more specialised add-on.

huangrichao2020/pretty-skills · 160 tokens

zhongguose-html-skill

An HTML-only presentation system using traditional Chinese colours and Chinese-style visual design. It helps organise source material into a report structure and produces a self-contained HTML file with its assets.

huangrichao2020/pretty-skills · 232 tokens

dashiai-ppt

A presentation-making add-on that creates an HTML slide deck from preset visual page designs. The result can open offline in a browser and can be exported as a PowerPoint or PDF file.

huangrichao2020/pretty-skills · 62 tokens

wechat-delivery

A workflow for preparing WeChat Official Account articles, images, covers, and publishing files in Chinese. WeChat Official Accounts are channels used by organizations to publish articles to followers.

huangrichao2020/pretty-skills · 129 tokens