Communitygithub.com

ZJU-REAL/Easel

General image processing: resize, crop, pad, format conversion (PNG/JPG/WebP), compression, watermarking, rounding, collage, thumbnail, and info extraction. Deterministic processing via image_ops.py.

What is Easel?

Easel is a deterministic image processing skill designed for AI agents like Claude Code, Cursor, and Codex. It provides a comprehensive set of non-destructive, pixel-level operations on existing images—resize, crop, pad to platform ratios, convert formats, compress to target size, add text/image watermarks, apply rounded corners, collages, generate thumbnails, and read image metadata. All operations are implemented via a single, well-tested Python script (`image_ops.py`) using Pillow, ensuring consistent and reliable outputs. The skill integrates with platform-size references (e.g., Xiaohongshu 1080×1440, WeChat Moments 1:1) and can optionally adapt watermark text and default sizes based on a user profile. It is explicitly separate from card-based skills (which perform HTML design and rendering); Easel only modifies existing image files without any generative or design capabilities.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ZJU-REAL/Easel/tree/HEAD/skills/openclaw/image-editing

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Image Processing

Perform deterministic processing on existing images: resize/crop/pad/format conversion/compression/watermark/round/collage/thumbnail.
All operations go through skills/shared/scripts/image_ops.py (pure Pillow), no ad-hoc scripting.

Input

  • One or more existing image file paths (PNG, JPG, WebP, or other Pillow-supported formats)
  • Target operation and parameters (dimensions, aspect ratio, quality, watermark text, collage layout, etc.)

Output

  • Processed image file(s) (path specified by user or defaults to outputs/<topic name>/)
  • Each command echoes ✅ path (widthxheight, sizeKB); info outputs JSON

Boundaries (Distinction from card-*)

  • card-quote / card-xiaohongshu / poster-hero / comparison-card = design and render new images (HTML → screenshot)
  • image-editing = process existing images, no visual design, no content generation, only pixel-level operations
  • For "generate an image from data/text" → use chart/infographic/card-*; this skill only processes existing image files

Execution Steps

  1. Confirm input image exists and ensure the target operation and parameters are clear
  2. Run the corresponding subcommand of image_ops.py from the project root (see below)
  3. When platform sizes are needed, consult references/platform-sizes.md for recommended aspect ratios/pixels
  4. Report output path and dimensions; multiple steps can be chained (e.g., resize then compress)

Command Reference

Script path is always skills/shared/scripts/image_ops.py; all subcommands support -h to view parameters.

# Resize: by width/height/percentage, --keep-ratio maintains aspect ratio within bounds without distortion
python skills/shared/scripts/image_ops.py resize -i in.jpg -o out.jpg --width 1080
python skills/shared/scripts/image_ops.py resize -i in.jpg -o out.jpg --percent 50
python skills/shared/scripts/image_ops.py resize -i in.jpg -o out.jpg --width 1080 --height 1440 --keep-ratio

# Crop: by coordinates or center-crop to target dimensions
python skills/shared/scripts/image_ops.py crop -i in.jpg -o out.jpg --box 100,50,900,650
python skills/shared/scripts/image_ops.py crop -i in.jpg -o out.jpg --width 1080 --height 1080

# Pad to target aspect ratio (core social media adaptation): pad any image to 1:1 / 9:16 / 16:9
python skills/shared/scripts/image_ops.py pad -i in.jpg -o out.png --ratio 9:16 --background "#ffffff"
python skills/shared/scripts/image_ops.py pad -i in.jpg -o out.png --ratio 1:1 --background "20,20,30"

# Format conversion png/jpg/webp
python skills/shared/scripts/image_ops.py convert -i in.png -o out.webp --format webp --quality 85

# Compress: fixed quality or approximate target file size (jpg/webp)
python skills/shared/scripts/image_ops.py compress -i in.jpg -o out.jpg --quality 80
python skills/shared/scripts/image_ops.py compress -i in.jpg -o out.jpg --max-kb 200

# Watermark: text (position/opacity/size/color, auto-find Chinese system font) or image (bottom-right, etc.)
python skills/shared/scripts/image_ops.py watermark -i in.jpg -o out.png --text "@handle" --position bottom-right --opacity 0.5 --size 40
python skills/shared/scripts/image_ops.py watermark -i in.jpg -o out.png --image logo.png --position bottom-right --scale 0.3 --opacity 0.8

# Rounded corners (outputs transparent PNG); --radius-percent 50 gives a circle
python skills/shared/scripts/image_ops.py round -i in.jpg -o out.png --radius 60
python skills/shared/scripts/image_ops.py round -i avatar.jpg -o out.png --radius-percent 50

# Collage: horizontal/vertical/grid NxM (columns x rows), --cell-width/height set uniform cell size
python skills/shared/scripts/image_ops.py collage -i a.jpg b.jpg c.jpg -o out.jpg --mode horizontal --gap 12
python skills/shared/scripts/image_ops.py collage -i 1.jpg 2.jpg 3.jpg 4.jpg -o out.jpg --grid 2x2 --gap 10 --cell-width 540 --cell-height 540

# Thumbnail (longest side in pixels)
python skills/shared/scripts/image_ops.py thumbnail -i in.jpg -o thumb.jpg --size 256

# Read image info (JSON: dimensions/format/aspect ratio/size/transparency)
python skills/shared/scripts/image_ops.py info -i in.jpg

Domain Knowledge: Recommended Platform Sizes

Common platform recommendations can be found in references/platform-sizes.md. Quick cheat sheet:

  • Xiaohongshu vertical image post: 1080×1440 (3:4); Xiaohongshu video/vertical poster: 1080×1920 (9:16)
  • WeChat Moments single image / general square image: 1:1 (e.g., 1080×1080)
  • Horizontal quote/cover: 16:9 (e.g., 1920×1080); WeChat Official Account header: 900×383
  • Weibo image: 1:1 or 4:3; Douyin/WeChat Channels cover: 9:16 (1080×1920)

Adaptation approach: prefer pad (add padding without cropping content or distorting) to preserve the full image; if a full-bleed edge-to-edge result is desired, use crop center-crop to target ratio; just to reduce file size, use resize/compress.

Profile Awareness

  • With Profile: default watermark text uses account name/handle; default output ratio matches the user's primary platform (e.g., Xiaohongshu account defaults to 1080×1440)
  • Without Profile: executes according to explicit user parameters; ratio defaults to original, watermark requires user-provided text

Dependencies & Error Handling

  • Dependency: Pillow (already installed, python -c "import PIL" works), pure standard library, no other third-party packages
  • Built-in boundary checks in the script: file not found / crop box out of bounds / invalid ratio or color → exit code 2 and prints ERROR:
  • Falls back to PIL default font with a WARN if Chinese system font is not found; can specify with --font
  • Self-test: python skills/shared/scripts/image_ops.py --selftest

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

ZJU-REAL/Easel

AI 视频生成:文生视频 / 图生视频 / 数字人首帧驱动。通过可插拔 provider(通义万相 Wan / 火山 Seedance / 快手可灵 / OpenAI 兼容)异步生成视频,用户自备 API key。当用户说 AI 视频生成、文生视频、图生视频、AI 生成视频、AI 短视频、让图片动起来、数字人视频、生成一段视频 时使用。与 video-strategy(选型/策略)、video-editing(剪辑处理)、clipify(切片)区别:本 SKILL 是从 0 用 AI 生成新视频。

ZJU-REAL/Easel

通用音频处理:音频剪辑/裁剪、格式转码(mp3/wav/m4a/aac)、音量归一化、从视频提取音轨、多段拼接、淡入淡出、变速(保音高)。当用户说“剪音频”“裁一段”“转成 mp3”“调音量/响度”“提取音轨/扒音频”“拼接音频”“淡入淡出”“加速/减速音频”“变速不变调”时使用。与 audio-denoise 的区别:audio-denoise 专做降噪,audio-editing 做除降噪外的通用音频操作(也内置 denoise 作为兜底)。

ZJU-REAL/Easel

一句话主题 → 成品短视频:自动串联 文案→配图/AI视频→配音→字幕→BGM→合成,把 Easel 制作层零件编排成一条'一键出片'流水线。**单条视频、口播/资讯向,画面默认逐句配图 + Ken Burns 缓动,需要动态时才逐段图生视频**。当用户说 一键生成视频、自动做短视频、主题生成视频、帮我做条视频、口播视频一条龙、自动出片、短视频一键生成 时使用。**有剧情/角色/对白/反转/多集的短剧改用 short-drama(每镜强制图生视频、不用静态图冒充);只写脚本用 video-script;只生成单个片段用 ai-video-gen。**

ZJU-REAL/Easel

自动字幕 / 语音转字幕:把音频或视频里的语音识别成字幕文件(SRT/ASS/TXT/JSON),可选把字幕烧录进视频。当用户说自动字幕、语音转字幕、视频加字幕、上字幕、转录、听写、字幕文件、生成字幕、烧字幕时使用。

ZJU-REAL/Easel

音乐卡点视频 / 踩点视频:检测背景音乐的节拍,让图片或片段在节拍点上切换,配推进/白闪特效,做出燃系'卡点'短视频。当用户说 卡点视频、踩点视频、音乐卡点、节奏卡点、按音乐切换、鼓点视频、踩节奏、beat 卡点、图片卡点、卡点混剪 时使用。基于 shared/scripts/beatsync.py(librosa 节拍检测)。与 slideshow-video 区别:slideshow 每图固定时长、柔和转场,本 SKILL 切换点由音乐节拍决定、硬切踩点带特效。

ZJU-REAL/Easel

Easel clipify: long English talk → punchline cuts → optional 16:9→9:16 face-pan/split → opus word-by-word ASS burn. Ships scripts + assets/preview.png. Part of 1.6k★ Easel suite.

ZJU-REAL/Easel

多角色对话配音:按 cast 和逐行对白为不同角色分配音色与情绪,合成多声线音轨和带角色名字幕。 当用户说“多角色/双人/剧本/对话配音、多人对白、不同角色不同声音、有声剧配音”时使用。 单一公共音色用 tts-voiceover;克隆本人音色用 voice-clone;整部短剧制作由 short-drama 编排。

ZJU-REAL/Easel

Easel video-highlights: CN/livestream highlight extract + stable static vertical reframe (sibling to clipify).

ZJU-REAL/Easel

>- 视频制作策略与工具选型:AI 视频生成模型对比、视频脚本结构设计、制作流程规划,覆盖产品演示/解说/社媒短视频场景。 当用户说"视频怎么做""视频选型""用什么工具做视频""视频制作流程""视频策略""视频系列规划"时使用。 和 video-script 的区别:video-strategy 做内容规划与工具选型,video-script 写具体某条视频的脚本。

Related Skills