auto-tone
Skill21 starsChanged 7 days agoMITView on GitHub
Use when the user wants automatic tonal correction — fix flat/washed-out / underexposed / low-contrast images by stretching levels, normalising contrast, and gamma-correcting to a neutral midtone. Implements auto-level (per-channel histogram stretch), auto-gamma (midtone correction), and a combined "punch" mode via ImageMagick. Operates on JPEG/PNG/TIFF/WebP.
In this repository28 other files it gives its agents.
- ai-graphicsSkill
- auto-deskewSkill
- auto-white-balanceSkill
- batch-set-copyrightSkill
- check-model-pricingSkill
- convert-to-avifSkill
- fast-resizeSkill
- fast-thumbnailSkill
- from-jxlSkill
- images-to-pdfSkill
- install-depsSkill
- new-projectSkill
- new-workflowSkill
- open-workspaceSkill
- optimize-jpegSkill
- optimize-pngSkill
- pdf-extract-embedded-imagesSkill
- pdf-to-imagesSkill
- read-metadataSkill
- scrub-metadataSkill
- set-metadataSkill
- svg-to-rasterSkill
- to-jxlSkill
- transcode-jpeg-to-jxl-losslessSkill
- upscale-imageSkill
- vectorizeSkill
- web-readySkill
- workspace-setupSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Do not use this skill when:
- Very specific: line 38
Verify ImageMagick 7+. magick -version | head -1.
≈ “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
Auto Tone
Fix flat or under/over-exposed images without manual curves work. Three modes:
- level (default) —
-auto-levelon the luminance channel. Stretches the histogram to[0,1]without touching colour balance. Safe, reversible-feeling. - gamma —
-auto-gamma. Drives the image's mean brightness toward 50% grey. Lifts dark scans, tames blown-out daylight. - punch —
-normalize(1% black + 1% white clip) followed by-auto-gamma. Stronger; the "press the button" preset for batch gallery prep.
When to use
- Underexposed indoor / night phone shots.
- Faded scans of old prints.
- Bulk normalisation of a gallery shot under varying light.
- Pre-step before sharpening or upscaling — auto-tone first so the next stage isn't operating on a flat histogram.
Do not use this skill when:
- Source is a RAW file — fix tone in
darktable-cliwhere you have full bit depth. - Image is intentionally low-key (silhouettes, night scenes with crushed shadows) or high-key (snow, fashion editorials). Auto-gamma flattens the look.
- The histogram is already well-distributed (a quick
magick identify -format "%[fx:standard_deviation]" "$IN"≥ 0.22 → likely already toned; auto-level becomes a no-op or worse).
Inputs
- Input — file or directory. Required.
- Mode —
level(default) |gamma|punch. - Recursive —
--recursivefor directory descent. - Output — default in-place suffix
_tone.--output-dir <path>to write into a sibling folder.--overwriteto replace. - Strength —
0.0to1.0(default1.0). Blends corrected image with original via-compose blend. - Preserve hue — default
on. Operate on the luminance channel only (HSLL), so colour relationships aren't shifted.--per-channelto apply auto-level independently to R/G/B (acts as combined tone + white-balance — usually you wantauto-white-balancefor that instead). - Clip (mode=punch) — black/white clip percent. Default
1.--clip 0.5for gentler,--clip 2for aggressive contrast.
Procedure
- Verify ImageMagick 7+.
magick -version | head -1. Elseconvert(IM6) with the same syntax. - Enumerate inputs (JPEG/JPG/PNG/TIFF/TIF/WebP). Skip RAW with note.
level (luminance-only auto-level, hue-preserving):
magick "$IN" -colorspace HSL -channel L -auto-level +channel -colorspace sRGB "$OUT"With
--per-channel:magick "$IN" -channel RGB -auto-level +channel "$OUT"gamma:
magick "$IN" -auto-gamma "$OUT"-auto-gammacomputes the gamma needed to drivemean → 0.5and applies it. No clipping, no hue shift.punch:
magick "$IN" -normalize -auto-gamma "$OUT"Or with explicit clip:
magick "$IN" -channel L -contrast-stretch ${CLIP}%x${CLIP}% +channel -auto-gamma "$OUT"-contrast-stretch 1%x1%clips the darkest 1% to black and brightest 1% to white before stretching — the "Photoshop auto-contrast" behaviour.Strength blend (when
<1.0):magick "$IN" "$WB" -compose blend -define compose:args=$(awk "BEGIN{print $STRENGTH*100}") -composite "$OUT"- For batch, parallelise with
xargs -P $(nproc). Skip files ending_toneto avoid recursive re-processing.
Output
- Tone-corrected images at the resolved paths.
- Summary:
- Files processed / skipped (RAW or non-image) / failed / no-op (where the histogram was already well-distributed).
- Per-mode count when mixed.
- Average histogram-spread before/after (
fx:standard_deviation) — sanity check that the run actually changed something.
Notes
- For "make my photos look better" without thinking:
--mode punch --strength 0.7is the sane default. - Auto-tone amplifies noise. If the source is already noisy (high ISO phone shots), denoise first, then tone.
- Combined with
auto-white-balance: run WB first (so tone correction operates on a neutral image), then tone. Reverse order is not order-equivalent. - This skill is the tone-only primitive. The orchestrator
apply-filtersmay chain it with sharpen/saturate; use this skill standalone when you only want tonal work.
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.

