Skip to content
Back to skills

Refinish

ASecurity

Re-finishes an existing character picture or background in another style by code, never by regenerating it: the drawing stays, only the finish changes. 37 styles: TV anime cel and its heavy, bold-ink, film, night, sunset, pastel, 90s variants; a cleaner de-AI finish; duotone, sepia, cyanotype, risograph; watercolour, gouache, thick paint; manga screentone, key drawing, screen print; ink wash, woodblock, pop art, neon, stained glass, paper cut, charcoal, pastel, stickers; pixel sprites; landsc...

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
ai-agentspythongoshellbash

Works with

  • cli

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add owoevan-dev/refinish-skill --skill refinish --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refinish?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Refinish
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/owoevan-dev-refinish/badge)](https://www.skillsdirectory.com/skills/owoevan-dev-refinish)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: refinish
description: "Re-finishes an existing character picture or background in another style by code, never by regenerating it: the drawing stays, only the finish changes. 37 styles: TV anime cel and its heavy, bold-ink, film, night, sunset, pastel, 90s variants; a cleaner de-AI finish; duotone, sepia, cyanotype, risograph; watercolour, gouache, thick paint; manga screentone, key drawing, screen print; ink wash, woodblock, pop art, neon, stained glass, paper cut, charcoal, pastel, stickers; pixel sprites; landscapes. Also matches the finish of reference pictures by measurement, tweaks a style from words ('softer shadows'), relights for night or sunset, mixes finishes by part, cuts out figures and composites them into scenes. Use it whenever the user wants a picture in a technique's style, an anime look, a less AI-looking finish, a manga, watercolour, woodblock, pixel or retro version, a night version, consistent sprites or a figure in a scene, even if they only say 'make this look hand-drawn' or 'it looks too AI'."
license: MIT
compatibility: Python 3.10 to 3.14 with numpy, opencv-python and scipy (Pillow optional, for reading PNG notes). No image model, no network, no GPU. Two optional segmentation models (See-Through, SAM 2), installed apart and best on an NVIDIA GPU, can read a figure's head and eyes (references/seethrough.md).
metadata:
  author: "owoevan-dev"
  version: "0.2.1"
---

# Refinish

Regenerating a picture to change its style also changes the character: another face, another hand, a costume that drifts. This skill keeps the drawing and paints a new finish over it, the way an anime finishing department or a print studio would: flat tones laid where the source drew its shadows, lines re-inked or re-traced, washes, screens, blocks, pixels. Everything is code. The result is the same character, frame for frame, in the new finish.

**Status: experimental.** Tell the user before you start that results can be wrong. Show them each result at full size, and let them decide before it is used.

Give the user's pictures and your results by full path, outside this skill's folder: an update replaces that folder. Do not name a result after a picture the user wants to keep; a run protects the files it read, not every picture nearby.

What it can and cannot do (tell the user before starting):
- **Can**: change the finish — how shadows are shaped and coloured, the lines' weight, colour and texture, the palette, the medium (paint, print, ink, pixels), the hour's light.
- **Cannot**: change the design — proportions, the way eyes are drawn, the pose, the number of folds. A request for "the style of X" gets X's finish on the user's own drawing, not a redrawing.

## Workflow

Copy this checklist and tick it off. Each step ends on its done-criterion.

- [ ] **0. Tools**: `python scripts/check_env.py --venv PROJECT/.refinish-venv` reports `ok`. On `install`, run the `argv` lists it printed in order (`commands` holds the same for a person's shell) and use the Python it names (`use_python`) for every script: they install the tested versions into a separate environment, `.refinish-venv` in the user's project folder (PROJECT, by full path). The skill's own folder may be read-only, and an update replaces it. On `blocked`, its `note` says what to sort out. On `untested`, the scripts should run: tell the user which versions are outside the tested range.
- [ ] **1. Source**: `scripts/check_input.py` graded the picture; a figure is a cut-out (transparent background), or was cut out of its scene with `scripts/cutout.py`; below 2000 px tall it was enlarged with `scripts/prep.py`.
- [ ] **2. Subject**: a subject file whose parts are right on the parts sheet (`scripts/auto_parts.py`, with a hints file for the cel, paint and print styles), or `scripts/scene_subject.py` for a background.
- [ ] **3. Style**: chosen from [references/presets.md](references/presets.md) with the user, or written or measured (steps 7–8).
- [ ] **4. Finish**: `scripts/refinish.py` ran; its check has no FAIL left unexplained.
- [ ] **5. Look**: the result seen at full size, the face and hands at 1:1, beside the source.
- [ ] **6. Deliver**: the disclosure the user's platform needs, noted in the file if they want it.

### 1. Check the source

`python scripts/check_input.py PICTURE.png` grades a picture for each family of styles and says what to expect:

- An outline drawn on both sides of the figure: a closed outline is drawn where it is missing, but a rim light's colour stays in the fill.
- Flat shading: soft airbrushed gradients blotch under flat-tone styles.
- A cut-out: the figure styles need one.

The thresholds come from [references/input-check.md](references/input-check.md).

A figure on a transparent or plain background is the best source. A character drawn into a scene works too: draw a rough outline round the figure and `scripts/cutout.py` finds the exact edge by colour. It gives:
- the cut-out;
- the background with the figure's place filled.

Each can be finished on its own; the figure is then put back where it was with `scripts/composite.py`. Holes for the gaps the outline went round, bands, points, a trimap the person paints, what to change for each symptom, and the limits: [references/cutout.md](references/cutout.md).

If the user is about to generate the picture, the source spec in [references/source-spec.md](references/source-spec.md) is the best investment: measured on one character, the drawn outline went from 58% to 92% and the shading came out paintable. [references/presets.md](references/presets.md) gives each style's own pre-production advice.

### 2. Make the subject file

A subject file says what each part of the picture is (skin, hair, each garment) and where the eyes and mouth are. The styles paint each material from its own colour model, so a mislabelled region gets the wrong colour.

- **Figures**: run `python scripts/auto_parts.py IMAGE.png subject.json` for a draft, then look at its parts sheet (`subject.sheet.jpg`) and face sheet. For the cel, paint and print styles, write a hints file:
  - points on each material, from `scripts/hints.py pick`, which puts each point in the middle of its colour;
  - a rough box per part, generous round arms, forearms and thighs;
  - boxes round the eyes and the mouth.

  Then run `auto_parts.py --hints` again. Two rounds settle most pictures. When they do not, change the approach rather than the points: [subject-file.md](references/subject-file.md), "When the parts will not come right", lists what to try.
- **A head the colours misread** (an iris taken for the white or the hair, glasses, hair across the face), or any recolour: when See-Through and SAM 2 are installed, `scripts/seethrough_parse.py IMAGE.png parse.png` reads the head's parts and splits each eye into iris, white and lashes. Look at every eye on its sheet (`parse.eyes.jpg`), click the wrong ones, then give `--parse parse.png` to `auto_parts.py` beside the hints. Install, licences, the click file and the limits: [references/seethrough.md](references/seethrough.md). Without the models, the colours read the head as before.
- **Backgrounds**: `python scripts/scene_subject.py IMAGE.png subject.json` finds the scene's areas by colour and guesses their kinds (sky, far hills, foliage, ground, ...). A painted background takes `deai-light` or a scene style, not a cel style: flat tones break its gradients into blotches (presets.md, Scenes).
- **No parts needed**: the de-AI and duotone styles run on the draft as it is.

Everything about subjects and hints, with the measured failure modes, is in [references/subject-file.md](references/subject-file.md). The draft is often wrong somewhere, so before finishing, show the person the parts sheet and the face sheet, and tell them one sentence is enough to fix a mistake ("the bow is part of the skirt"). Never ask them for boxes or points: turn the sentence into hints yourself. Check the eye boxes first when the eyes are closed, winking, spirals or '><', or when something is held beside the face: the face finder misses or mistakes these.

### 3. Choose a style

[references/presets.md](references/presets.md) lists all 37 styles by family. For each it gives:
- what the style needs (parts or not);
- the pre-production advice;
- its known limits.

Show the user two or three candidates on their own picture rather than describing them.

### 4. Re-finish

```bash
python scripts/refinish.py subject.json styles/tv-cel.json out.png
```

`--hour night|sunset|dusk|film-night` relights a style for another hour; the pixel, sticker and neon styles change the picture's size and refuse it. The script prints JSON:
- the style and engine;
- what the same-material guard moved (pixels the part map put in the wrong part, given back to their material before painting);
- the check:
  - **cel and paint**: the result is checked against the source (parts, colours, outline, lost features);
  - **engines built on a cel finish** (print, woodblock, wash, pencil, pixel, tone and the special styles): that cel finish is checked;
  - **de-AI**: its own colour-shift check (H1);
  - **every engine, the duotones too**: its own result for a skin printed another colour (O7), a box round the features (O8) and mottled darks (O9).

Each FAIL names a box and a likely cause; [references/checks.md](references/checks.md) says how to fix each one, usually a hint point or a box.

### 5. Look before showing

The numbers catch the common mistakes, not all of them. Before showing a result, look at it at full size beside the source, and at the face and the hands at 1:1. Look for blotches in soft areas, a material in another's colour, and lost eye highlights. A patch in another material's colour is almost always the part map: fix the parts there first (a hint point on the patch) and render again, before changing the style. Blotches inside one material come from soft shading in the source instead. A style's limits are in presets.md; say them rather than hiding them.

When something is wrong, change a setting for this picture rather than a script. Change one at a time, a part's rule before the style, and compare before and after. [references/adjusting.md](references/adjusting.md) gives each common problem's cause and setting:
- a skin painted another colour;
- a box round the features;
- frayed shadow edges and flecks (`"deblotch"` per part, or `"auto_deblotch"`);
- mottled darks;
- an unreadable face;
- a lost thin part;
- a costume in the wrong ink.

Settle a setting for a batch on a few pictures, then check it on ones you did not tune it on.

### 6. Deliver

The finish does not change where a picture came from. A picture generated with an image model is still AI-generated after any style here, the de-AI styles included: they give a cleaner finish and are not tuned against any detector. [references/legal-and-disclosure.md](references/legal-and-disclosure.md) covers:
- style and copyright;
- what Steam and pixiv ask for.

A finish of a prepped picture is at prep's size: `python scripts/prep.py out.png final.png --restore source.png --box X0,Y0,X1,Y1 --scale 2` (the box and the scale prep printed) puts it back on the source's canvas.

`python scripts/png_note.py out.png "AI-assisted: ..."` writes a note into the PNG.

### 7. Adjust a style by words

```bash
python scripts/tweak_style.py tv-cel my-style.json "softer shadows, more vivid"
```

It moves each matched word's keys one step (`--steps N` for more) and names the measured number that should move. Words in English, Chinese and Japanese; `--list` shows them all. A word that names the design ("bigger eyes") has no entry: the finish cannot change the drawing.

### 8. Match reference pictures

```bash
python scripts/fit_style.py subject.json ref1.png ref2.png --out matched.json
```

It measures the references' finish, starts from the nearest bundled cel style and moves each number more than 10% off toward the references, round by round. It fits the cel finishes only: for a reference in another technique (a watercolour, a print), start from the nearest bundled style of that technique and change it by words (step 7). Tell the user what does not carry over: the design and the scene's light. [references/replicating-a-style.md](references/replicating-a-style.md) has the manual loop and the table of numbers to parameters.

Three rules hold either way:
- the reference pictures stay where the user keeps them, never copied into a project or a shared file;
- a style file holds numbers only;
- a style is named after its technique, never after the work or artist it was measured from.

### 9. Composite and camera

```bash
python scripts/composite.py scene.json frame.png
```

It lays re-finished figures over a background with a lens:
- depth of field and bokeh in linear light;
- light wrap;
- a grade of the background region by region (a night sky apart from the ground);
- bloom, vignette and grain.

`--raw` gives the plain paste-up to compare with. A depth of field inside one figure is the `focus` post layer. Details: [references/compositing.md](references/compositing.md).

### 10. Mix finishes, or finish only part of a picture

```bash
python scripts/recipe.py recipe.json out.png
```

A recipe lays finishes over a base, each limited to parts, kinds or areas (the face, the lines) and blended in:
- the clothes in watercolour, the face and hair in TV cel;
- a screentone multiplied over a watercolour;
- 30 % of the film everyday look over a heavy cel;
- only the hair cleaned of rendering noise, the rest as drawn.

Format, blend modes and examples: [references/recipes.md](references/recipes.md).

### 11. Repair the source

```bash
python scripts/repair.py image.png repaired.png --subject subject.json
```

It fixes a source's defects without restyling it: a cut-out's fringe, stray specks, gaps in the line art, colour that ran from one material into the next. Run it before a finish when the source has them, and look at its review picture. Details and limits: [references/repairs.md](references/repairs.md).

## Writing or changing a style

A style file is numbers only: shadows, lines, palette, touches, texture, the engine's own section and `post` layers (relight, paper, grain, halation, soften, curve, focus, and the scene layers). Start from the nearest bundled style and change one section at a time. Format and every key: [references/style-format.md](references/style-format.md).

## Scripts

All print JSON on stdout. Exit code 0 means done; 1 done, with doubts or a check's FAIL to look at; 2 bad input, or a request the script cannot take; 3 an error the script did not expect, which is worth reporting. A result never replaces a file its run read: give it another name.

| script | use |
|---|---|
| `check_env.py [--venv DIR] [--here] [--share]` | step 0: are the packages there, in tested versions; the commands to install them if not; `--share` for a bug report, with no paths |
| `cutout.py PICTURE.png OUTLINE.json OUT_DIR [--trimap T.png]` | cut a figure out of a picture with a background |
| `prep.py SRC.png OUT.png [--scale 2]` | crop to the figure and enlarge; `--restore SRC.png --box B` puts a finish back on the source's canvas |
| `check_input.py PICTURE.png \| SUBJECT.json` | grade a source |
| `auto_parts.py IMAGE.png SUBJECT.json [--hints H.json] [--parse P.png]` | the subject file for a figure, with its parts sheet |
| `seethrough_parse.py IMAGE.png PARSE.png [--eyes E.json]` | optional: the head's parts and each eye's iris, white and lashes, read by two segmentation models (run with their environment's Python; references/seethrough.md) |
| `hints.py check \| points \| pick` | check hint points, turn region numbers into points, pick a point in a colour |
| `scene_subject.py IMAGE.png SUBJECT.json` | the subject file for a background |
| `parts.py SUBJECT.json` | rebuild and check a part map |
| `refinish.py SUBJECT.json STYLE.json OUT.png [--hour H]` | re-finish, with the guard and the checks |
| `check_output.py SUBJECT.json OUT.png [--style S] [--hour H]` | check a result again on its own (name its style, and the hour if it had one) |
| `measure_style.py ...` | measure a finish, compare two measurements |
| `fit_style.py SUBJECT.json REF.png ... --out STYLE.json` | fit a style to references |
| `tweak_style.py STYLE.json OUT.json "words"` | change a style by words |
| `composite.py SCENE.json OUT.png [--raw]` | composite and camera |
| `recipe.py RECIPE.json OUT.png` | mix finishes by part and blend mode |
| `repair.py PICTURE.png OUT.png [--fix ...] [--subject S.json]` | repair a source: fringe, specks, line gaps, bleed |
| `png_note.py OUT.png "text"` | a note in the PNG (any language) |
| `zoom.py PICTURE.png x0,y0,x1,y1 OUT.jpg` | an enlarged crop with a pixel grid, to read coordinates |

## Gotchas

- A figure under 2000 px tall loses its fine lines in the cel styles: `prep.py --scale 2` first, and pass `--upscaled 2` to `auto_parts.py`.
- Two materials of one colour (blue-grey hair over a pale blue cardigan, a beige coat on beige skin) are told apart only by boxes and lines. `auto_parts.py` says so in a doubt; look along that border first.
- A tall narrow box cuts off an arm or a thigh more often than any other mistake: box the whole limb.
- Night is not darkening: `--hour night` (a TV night colour model) and `--hour film-night` (a cinematic night grade) relight the colours. Generate the source in day colours under neutral light.
- On a console that is not UTF-8, the scripts print non-ASCII text escaped (still valid JSON).

Files in this skill

  • LICENSE1.1 KB
  • SKILL.md16.2 KB
  • agents/openai.yaml320 B
  • assets/icon-large.png12.3 KB
  • assets/icon-small.svg435 B
  • evals/cel-finish-keeps-the-drawing/case.yaml444 B
  • evals/cel-finish-keeps-the-drawing/graders/01-same-size-and-silhouette.md196 B
  • evals/cel-finish-keeps-the-drawing/graders/02-made-by-code.md151 B
  • evals/cel-finish-keeps-the-drawing/graders/03-flat-cel-tones.md256 B
  • evals/cel-finish-keeps-the-drawing/graders/04-says-what-changed.md181 B
  • evals/cel-finish-keeps-the-drawing/place-files.sh62 B
  • evals/cel-finish-keeps-the-drawing/prompt.md389 B
  • evals/less-ai-look-with-disclosure/case.yaml474 B
  • evals/less-ai-look-with-disclosure/graders/01-same-size-and-silhouette.md143 B
  • evals/less-ai-look-with-disclosure/graders/02-noise-and-glow-gone-colours-kept.md217 B
  • evals/less-ai-look-with-disclosure/graders/03-says-still-ai-and-to-disclose.md186 B
  • evals/less-ai-look-with-disclosure/graders/04-no-detector-claims.md166 B
  • evals/less-ai-look-with-disclosure/place-files.sh62 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.