image-process
Skill0 starsChanged 38 days agoMITView on GitHub
One page image from a prompts doc slot to webp srcset, asset log row and paste ready snippet, with a hard render review stop before processing.
In this repository8 other files it gives its agents.
- autocomplete-miningSkill
- conversion-tracking-auditSkill
- gsd-modeSkill
- search-term-reviewSkill
- secret-ledgerSkill
- seo-onpage-passSkill
- serp-teardownSkill
- ux-lawsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Run from the project root.
- Very specific: line 19
Write a prompts doc, default location docs/image-prompts-<page>.md:
- Distinctive: line 31
Not for: writing prompts, wiring the image into a page.
- Distinctive: line 68
Commit, push or deploy.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image process
Run from the project root. Script: ~/.claude/skills/image-process/scripts/image-chain.mjs. Generation runs through a shell command you provide in IMAGE_GEN_CMD. Processing uses ffmpeg (libwebp, metadata stripped) and ffprobe.
Setup
- Install
ffmpeg(includesffprobe). - Set the generation command. The script exports
PROMPT(style block plus slot text),OUT(PNG path),PROMPT_FILEandSLOTbefore it runs:
Unset = the script stops with a clear error.export IMAGE_GEN_CMD='openai images generate --prompt "$PROMPT" --out "$OUT"'--skip-generate <png>needs no command. - Write a prompts doc, default location
docs/image-prompts-<page>.md:## Shared style block Flat studio photo, soft daylight, light grey backdrop, no text, no logos. ## 1. Hero A standing desk with a laptop and a notebook, seen from the front.
When to use
- A page has an image slot and a prompts doc holds its final prompt as a
## N.section under a## Shared style block. - A reviewed PNG already exists and only needs the processing half (
--skip-generate <png>). - Not for: writing prompts, wiring the image into a page.
The two step run
- Generate, then stop:
Preflight runs, the PNG lands innode ~/.claude/skills/image-process/scripts/image-chain.mjs --prompts docs/image-prompts-<page>.md --slot 1 --brand acme --basename acme-standing-desk-front --element hero --alt "Standing desk: laptop and notebook on a clean surface"tmp/img_processing/<basename>.png, the script printsREVIEW: <path>and exits 0. - Open the PNG and review it yourself. Reject: subject cut by the frame, stray letters, logos, dark background, missing subject. One retry with a tightened prompt, then stop and report.
- Approved: rerun the same command with
--approve. Generation is skipped because the PNG exists. The chain writes the webp set topublic/images/, checks each file against the byte limit, moves the source totmp/img_processing/done/, appends a row todocs/image-assets.md(wired: no) and prints the srcset object and the final alt.
Exit codes: 0 ok or stopped for review, 1 preflight or processing fail, 2 generation quota or limit (message printed verbatim; park and retry later).
Flags
| flag | meaning |
--prompts <doc> | prompts doc, project relative |
--slot <N> | ## N. section in the doc |
--basename <name> | must match ^<brand>-[a-z0-9-]+$ |
--brand <slug> | basename prefix, default site |
--element hero|inline|card|og | size set 420/760/1120, 420/680/900, 320/480/640, 1200 |
--alt "<text>" | alt text without the suffix |
--alt-suffix <text> | appended as | <text>, default none |
--out-dir <dir> | webp output, default public/images |
--work-dir <dir> | PNG drop zone, default tmp/img_processing |
--asset-log <file> | Markdown log, default docs/image-assets.md |
--max-kb <N> | byte limit per webp, default 120 |
--quality <N> | webp quality, default 80 |
--style-ref <doc> | optional: shared style block must equal the one in this doc |
--allow-nod | with --style-ref, accept the reference plus appended sentences |
--dry-run | preflight plus the generation settings, nothing generated |
--skip-generate <png> | use an existing PNG (copied to the drop zone name) |
--approve | continue past the review stop; needs the PNG present |
--help | usage |
What it never does
- Wire an image into a page or edit source files.
- Commit, push or deploy.
- Invent or rewrite prompts; a missing slot section is a preflight fail.
- Judge its own render: the review stop is unconditional without
--approve.
Lessons
None yet. Add one dated line per lesson: - YYYY-MM-DD: <lesson>.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

