go-cms-images

Implements image editing, persistent derivatives, and thumbnail caching for the GO CMS backend.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/vernal96/go-cms --skill go-cms-images-vernal96
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: go-cms-images
Source: https://github.com/vernal96/go-cms/tree/main/.codex/skills/go-cms-images
Command: npx skills add https://github.com/vernal96/go-cms --skill go-cms-images-vernal96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It defines a consistent architecture for image editing in GO CMS so that originals are never overwritten, edited versions are tracked as derived files, and thumbnails are generated as regeneratable cache entries rather than persistent data. ## Core Features & Use Cases - Non-destructive image editing: Crop, rotate, resize, scale, and fit transforms always produce a new derived File rooted at the original, with Media.FileID switched atomically and compensation on failure. - Thumbnail pipeline: Deterministic cache keys based on file ID, source checksum, and normalized transform spec, delivered through an HTTP endpoint with resource limits against decompression bombs. - Deletion and restore semantics: Restore-to-original support, delete-impact previews for derivative trees, and explicit cascade policies for Media references. - Use Case: When adding an image editor to the GO CMS admin panel, use this Skill to implement the backend edit/restore service, thumbnail endpoint, and FileExplorer preview integration without corrupting originals or leaking cache into the database. ## Quick Start Ask the AI to implement the GO CMS image edit and restore service following the root-original derivative model defined in this skill.

Frequently Asked Questions about go-cms-images

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement non-destructive image editing in a CMS?▼

Create a new derived File with ParentID pointing to the root original, then switch Media.FileID to it. Never overwrite the original bytes, and always re-edit from the root original rather than chaining lossy edits.

How should image thumbnails be stored in a CMS database?▼

Thumbnails should not be stored in the database at all. Treat them as regeneratable cache entries keyed by file ID, source checksum, and a normalized transform hash, using cache-aside generation on miss.

What image processing library does GO CMS use for transforms?▼

The skill recommends a pure-Go adapter such as github.com/disintegration/imaging behind a technology-neutral Processor interface. The library types must not leak into domain contracts, keeping the implementation replaceable.

How do I protect image resize endpoints from decompression bombs?▼

Bound maximum source and output dimensions, crop sizes, rotation and scale ranges, and thumbnail sizes in configuration. Validate transform options before allocating buffers, since a tiny compressed file can decode into a huge raster.

What happens when deleting an original image that has edited versions?▼

The filesystem repository walks the descendant tree for physical deletion, and the admin UI should show a delete-impact preview counting derived files and affected Media references. Confirmed cascades may delete Media rows in the tree, while direct file-field references remain protected.