agentleFS
SparkElfSparkElf/deepseek-harness-plus/.agents/skills/chroma-key-cutout/SKILL.md

chroma-key-cutout

Skill1 starsChanged 3 months agoMITView on GitHub

Use when the user asks to remove green-screen or chroma-key backgrounds from local raster images, create transparent PNG cutouts, validate alpha edges, or batch-repeat the same keying workflow for UI/game/art assets.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 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.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify the PNG is RGBA, corner alpha is 0, and alpha extrema include (0, 255).

    line 18
  2. Very specific:

    Use default --mode strict when green-screen pixels may appear inside holes, such as an outlined heart or transparent UI center.

    line 22
  3. Very specific:

    Use --mode connected when foreground art contains exact green areas that must survive and only the outer background should disappear.

    line 23
  4. Distinctive:

    Never overwrite a source file.

    line 54
  5. Distinctive:

    Always make a dark preview for visual QA.

    line 56
  6. Very specific:

    If text or fine black edges show green spill, rerun with a stricter key color or reduce --soft-high.

    line 57
  7. Very specific:

    If foreground gets deleted, switch to --mode connected or narrow --max-rb.

    line 58
  8. Very specific:

    If enclosed green holes remain, switch back to --mode strict.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Chroma Key Cutout

Overview

Creates alpha PNG cutouts from green-screen assets with deterministic local processing. Prefer this over model image editing when the source already has a removable chroma-key background.

Workflow

  1. Inspect source with file and, if useful, view_image.
  2. Sample border color or pass an explicit key color.
  3. Run scripts/chroma_key_cutout.py.
  4. Inspect the dark preview for holes, green fringe, and accidental removal.
  5. Verify the PNG is RGBA, corner alpha is 0, and alpha extrema include (0, 255).

Mode Choice

  • Use default --mode strict when green-screen pixels may appear inside holes, such as an outlined heart or transparent UI center.
  • Use --mode connected when foreground art contains exact green areas that must survive and only the outer background should disappear.
  • Pass --key-color '#00ff00' only when automatic border sampling chooses the wrong color.

Commands

Single image:

python3 /root/projects/.agents/skills/chroma-key-cutout/scripts/chroma_key_cutout.py \
  --input "/root/projects/source.png"

Explicit output:

python3 /root/projects/.agents/skills/chroma-key-cutout/scripts/chroma_key_cutout.py \
  --input "/root/projects/source.png" \
  --output "/root/projects/source-cutout.png" \
  --preview "/root/projects/source-cutout-preview-dark.png"

Preserve non-border exact-green foreground:

python3 /root/projects/.agents/skills/chroma-key-cutout/scripts/chroma_key_cutout.py \
  --input "/root/projects/source.png" \
  --mode connected

Quality Rules

  • Never overwrite a source file.
  • Save transparent output beside the source unless the user gives a destination.
  • Always make a dark preview for visual QA.
  • If text or fine black edges show green spill, rerun with a stricter key color or reduce --soft-high.
  • If foreground gets deleted, switch to --mode connected or narrow --max-rb.
  • If enclosed green holes remain, switch back to --mode strict.

Dependencies

Requires Python3 plus Pillow and numpy.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.