crush/skills/border-trim-extend/SKILL.md
Trim uniform borders from images and extend with the same color or a specified color. Use when asked to "trim border", "remove border and add back", "extend padding", or when uniform borders need to be trimmed then re-added with potentially different sizing.
npx skillsauth add meowgorithm/dotfiles border-trim-extendInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Trim uniform borders from images and re-add borders with the same or different color.
For automatic trim-and-extend with the same border color:
~/.config/crush/skills/border-trim-extend/scripts/trim_extend.sh <input> <border-px> <output>
Example:
~/.config/crush/skills/border-trim-extend/scripts/trim_extend.sh image.png 75 image-bordered.png
When you need more control:
1. Detect the border color:
magick image.png[1x1+0+0] -format "%[pixel:s]" info:
2. Trim and extend:
magick image.png -trim +repage -bordercolor "<color>" -border <px> output.png
Trim to content only (no border added):
magick image.png -trim +repage output.png
Trim and add white border:
magick image.png -trim +repage -bordercolor white -border 50 output.png
Trim and add transparent border:
magick image.png -trim +repage -bordercolor transparent -border 100 output.png
-trim - Remove uniform border pixels+repage - Reset virtual canvas after trim-bordercolor - Color for new border (hex, name, or rgba)-border <px> - Border width in pixels on all sidesImageMagick (magick command) must be installed.
tools
Convert video files (MP4, MOV, WebM, GIF, MKV, AVI, etc.) into animated WebP images with control over fps, size, quality, loop count, and trimming. Use when the user wants to turn a video or screen recording into an animated WebP, create a lightweight demo loop, replace an animated GIF with a smaller WebP, or produce a short clip as a .webp.
development
Convert images between formats (PNG, JPEG, WebP, GIF, BMP, TIFF, AVIF, HEIC) with quality control and resizing. Use when the user needs to convert images, batch process multiple files, optimize image sizes, or convert to modern formats like WebP or AVIF.
tools
Use charmtone colors via the `charmtone` CLI or Go API (`github.com/charmbracelet/x/exp/charmtone`). Triggers when the user asks to use charmtone colors, generate color palettes, get hex values, create CSS/SCSS/Vim color variables, or work with the CharmTone palette in Go code. Also triggers on mentions of specific charmtone color names (Cherry, Charple, Julep, Hazy, etc.) or requests to pick/choose/apply charmtone colors.
testing
Stage and commit changes with a Conventional Commits message. Invoke with /commit "optional scope hint". Inspects the diff, picks an appropriate type and scope, writes a concise message, and commits. Does not push.