← 返回 Skills 市场
yangruihan

Image Edit Skill

作者 Ryan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
264
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install image-edit-skill
功能描述
Expert Pillow (PIL) skill for image processing, manipulation, and analysis. Use this skill for image editing, batch processing, watermarking, format conversi...
使用说明 (SKILL.md)

\r \r

Pillow Image Processing Skill\r

\r English | 简体中文\r \r This skill provides comprehensive image processing capabilities through executable scripts and reference documentation for Pillow (PIL).\r \r

When to Use This Skill\r

\r Activate this skill when the user requests:\r \r

  • Image editing operations (resize, crop, rotate, color adjustments)\r
  • Batch processing multiple images\r
  • Adding watermarks (text or image)\r
  • Image format conversions\r
  • Extracting image metadata or EXIF data\r
  • Applying filters or effects\r
  • Creating thumbnails\r \r

Core Capabilities\r

\r

1. Image Editor (scripts/image_editor.py)\r

\r Edit single images with various operations:\r \r Usage:\r

python scripts/image_editor.py input.jpg output.jpg [options]\r
```\r
\r
**Options:**\r
- `--width WIDTH` / `--height HEIGHT`: Resize dimensions\r
- `--no-aspect`: Ignore aspect ratio when resizing\r
- `--crop X Y WIDTH HEIGHT`: Crop rectangle\r
- `--rotate DEGREES`: Rotate image\r
- `--flip {horizontal,vertical}`: Flip image\r
- `--brightness FACTOR`: Adjust brightness (0.0-2.0)\r
- `--contrast FACTOR`: Adjust contrast (0.0-2.0)\r
- `--color FACTOR`: Adjust color saturation (0.0-2.0)\r
- `--sharpness FACTOR`: Adjust sharpness (0.0-2.0)\r
- `--filter {blur,contour,detail,edge_enhance,emboss,sharpen,smooth}`: Apply filter\r
- `--format FORMAT`: Output format (JPEG, PNG, etc.)\r
- `--quality QUALITY`: JPEG quality (1-100)\r
\r
**Examples:**\r
```bash\r
# Resize maintaining aspect ratio\r
python scripts/image_editor.py photo.jpg resized.jpg --width 800\r
\r
# Multiple operations\r
python scripts/image_editor.py input.jpg output.jpg \\r
    --crop 100 100 800 600 \\r
    --rotate 90 \\r
    --brightness 1.2 \\r
    --sharpen 1.5\r
```\r
\r
### 2. Batch Processor (`scripts/batch_processor.py`)\r
\r
Process multiple images in parallel:\r
\r
**Usage:**\r
```bash\r
python scripts/batch_processor.py input_dir output_dir [options]\r
```\r
\r
**Options:**\r
- `--pattern PATTERN`: File pattern (e.g., *.jpg)\r
- `--resize WIDTH HEIGHT`: Resize all images\r
- `--thumbnail MAX_W MAX_H`: Create thumbnails (maintains aspect)\r
- `--grayscale`: Convert to grayscale\r
- `--brightness FACTOR`: Adjust brightness\r
- `--format FORMAT`: Convert format\r
- `--quality QUALITY`: JPEG quality\r
- `--workers N`: Number of parallel workers (default: 4)\r
\r
**Examples:**\r
```bash\r
# Create thumbnails\r
python scripts/batch_processor.py ./photos ./thumbs --thumbnail 300 300\r
\r
# Batch convert and resize\r
python scripts/batch_processor.py ./raw ./processed \\r
    --resize 1920 1080 \\r
    --format JPEG \\r
    --quality 90\r
```\r
\r
### 3. Watermark Tool (`scripts/watermark.py`)\r
\r
Add text or image watermarks:\r
\r
**Usage:**\r
```bash\r
python scripts/watermark.py input.jpg output.jpg --text "TEXT" [options]\r
python scripts/watermark.py input.jpg output.jpg --image logo.png [options]\r
```\r
\r
**Common Options:**\r
- `--position {top-left,top-right,bottom-left,bottom-right,center}`: Position\r
- `--opacity 0-255`: Transparency level\r
- `--margin PIXELS`: Margin from edge\r
\r
**Text Options:**\r
- `--font-size SIZE`: Font size\r
- `--color COLOR`: Text color (white/black/red/etc)\r
\r
**Image Options:**\r
- `--scale RATIO`: Watermark scale (0.0-1.0)\r
\r
**Examples:**\r
```bash\r
# Text watermark\r
python scripts/watermark.py photo.jpg marked.jpg \\r
    --text "© 2026 Company" \\r
    --position bottom-right \\r
    --opacity 128\r
\r
# Logo watermark\r
python scripts/watermark.py image.jpg output.jpg \\r
    --image logo.png \\r
    --scale 0.2 \\r
    --position top-left\r
```\r
\r
### 4. Image Info (`scripts/image_info.py`)\r
\r
Extract image metadata and properties:\r
\r
**Usage:**\r
```bash\r
python scripts/image_info.py image.jpg [options]\r
```\r
\r
**Options:**\r
- `--format {text,json}`: Output format\r
- `--output FILE`: Save to file\r
\r
**Provides:**\r
- File information (size, path)\r
- Image properties (dimensions, format, mode)\r
- Color information (bands, palette)\r
- EXIF data (if available)\r
- Metadata\r
\r
**Example:**\r
```bash\r
# Display info\r
python scripts/image_info.py photo.jpg\r
\r
# Save as JSON\r
python scripts/image_info.py photo.jpg -o info.json --format json\r
```\r
\r
## Reference Documentation\r
\r
### `references/common_operations.md`\r
\r
Comprehensive Pillow reference covering:\r
- Opening and saving images\r
- Resizing and cropping\r
- Rotation and flipping\r
- Color adjustments and enhancements\r
- Filters and effects\r
- Drawing on images\r
- Image composition\r
- Working with channels\r
- EXIF data handling\r
- Performance tips\r
\r
**When to use:** When Claude needs specific Pillow syntax or operation patterns.\r
\r
### `references/best_practices.md`\r
\r
Best practices guide covering:\r
- Format selection (JPEG vs PNG vs WebP)\r
- Resizing strategies\r
- Color mode conversion\r
- Memory management\r
- Watermarking strategies\r
- Filter application\r
- Optimization techniques\r
- Error handling patterns\r
- Common workflows\r
\r
**When to use:** When designing image processing workflows or optimizing performance.\r
\r
## Workflow Guidelines\r
\r
### Step 1: Analyze Requirements\r
- What format is the input image?\r
- What operations are needed?\r
- Is it a single image or batch?\r
- Are there quality requirements?\r
\r
### Step 2: Choose the Right Tool\r
- Single image edit → `image_editor.py`\r
- Multiple images → `batch_processor.py`\r
- Add watermark → `watermark.py`\r
- Need info → `image_info.py`\r
\r
### Step 3: Plan Operations\r
- Apply operations in logical order\r
- Consider quality vs file size tradeoffs\r
- Validate input requirements\r
\r
### Step 4: Execute and Validate\r
- Run the script with appropriate options\r
- Check output quality\r
- Verify file sizes and formats\r
\r
## Common Patterns\r
\r
### Pattern 1: Web Image Optimization\r
```bash\r
# Resize and optimize for web\r
python scripts/image_editor.py large.jpg web.jpg \\r
    --width 1200 \\r
    --quality 85 \\r
    --format JPEG\r
```\r
\r
### Pattern 2: Create Image Gallery\r
```bash\r
# Generate thumbnails\r
python scripts/batch_processor.py ./originals ./gallery \\r
    --thumbnail 400 400 \\r
    --format JPEG \\r
    --quality 90\r
```\r
\r
### Pattern 3: Brand Images with Watermark\r
```bash\r
# Add company logo\r
python scripts/watermark.py product.jpg branded.jpg \\r
    --image company_logo.png \\r
    --position bottom-right \\r
    --scale 0.15 \\r
    --opacity 180\r
```\r
\r
### Pattern 4: Batch Format Conversion\r
```bash\r
# Convert PNG to JPEG\r
python scripts/batch_processor.py ./pngs ./jpegs \\r
    --format JPEG \\r
    --quality 95\r
```\r
\r
## Dependencies\r
\r
```bash\r
pip install Pillow\r
```\r
\r
## Tips for Effective Use\r
\r
1. **Preserve originals**: Never overwrite source images\r
2. **Use appropriate formats**: JPEG for photos, PNG for graphics\r
3. **Optimize quality**: Balance quality and file size\r
4. **Batch operations**: Use batch processor for multiple images\r
5. **Check references**: Consult reference docs for advanced operations\r
6. **Validate inputs**: Check image format and size before processing\r
7. **Test first**: Try operations on one image before batch processing\r
\r
## Limitations\r
\r
- Limited to 2D image processing (no video)\r
- Some EXIF data may not be preserved in all formats\r
- Font availability may vary by system\r
- Very large images may require significant memory\r
- Advanced photo editing (layers, masks) requires specialized tools\r
\r
## Troubleshooting\r
\r
**Import errors**: Ensure Pillow is installed (`pip install Pillow`)\r
**Font not found**: Watermark script falls back to default font\r
**Memory errors**: Process large images in smaller batches\r
**Format errors**: Check input image format compatibility\r
**RGBA to JPEG**: Script automatically handles RGBA→RGB conversion\r
\r
For detailed operations and troubleshooting, always refer to `references/common_operations.md` and `references/best_practices.md`.\r
安全使用建议
This package appears to be a straightforward Pillow-based image processing toolset: it edits and analyzes images and writes output files. Before installing or running, confirm you trust the skill owner (no homepage provided), run the scripts in a safe/test folder (to avoid accidental overwrite), and install dependencies in a virtual environment (pip install -r requirements.txt). Note that requirements.txt includes openpyxl although the code doesn't use it — harmless but unexpected. If you'll process sensitive images, review the scripts yourself to ensure they don't transmit files or call external services (none do here).
功能分析
Type: OpenClaw Skill Name: image-edit-skill Version: 1.0.0 The skill bundle provides a legitimate and well-documented set of image processing tools using the Pillow library. The Python scripts (image_editor.py, batch_processor.py, watermark.py, and image_info.py) implement standard image manipulation, metadata extraction, and batch processing logic without any signs of malicious behavior, data exfiltration, or obfuscation. The SKILL.md instructions correctly guide the AI agent on tool usage, and the presence of an unused dependency (openpyxl) in requirements.txt appears to be a harmless oversight.
能力评估
Purpose & Capability
Name/description (Pillow-based image editing, batch processing, watermarking, info extraction) matches the included scripts and documentation. The provided scripts implement the listed features (image_editor, batch_processor, watermark, image_info).
Instruction Scope
SKILL.md instructs running the local Python scripts with file-path arguments and documents options; it does not ask the agent to read unrelated system files, access environment variables, or send data to external endpoints.
Install Mechanism
There is no install spec (instruction-only skill). Code files are included but no external installers or downloads are invoked by the skill itself, which minimizes install-time risk.
Credentials
The skill requests no environment variables or credentials. Minor note: requirements.txt lists 'openpyxl' though I found no code using it — likely harmless but unnecessary.
Persistence & Privilege
always is false and the skill does not request persistent system-wide configuration or modify other skills. Agent-autonomous invocation is allowed (platform default) but the skill's behavior is limited to local file processing when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-edit-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-edit-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the Pillow image processing skill. - Provides scripts for editing single images, batch processing, watermarking, and extracting image information using Pillow (PIL). - Supports operations like resizing, cropping, rotating, brightness/contrast/color/sharpness adjustment, and applying filters. - Enables batch processing with parallel execution and format conversion. - Watermark tool supports both text and image watermarks, with configurable position and opacity. - Includes reference documentation with best practices, syntax, and workflow guidelines for effective image processing. - Details troubleshooting tips and limitations for working with Pillow.
元数据
Slug image-edit-skill
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Image Edit Skill 是什么?

Expert Pillow (PIL) skill for image processing, manipulation, and analysis. Use this skill for image editing, batch processing, watermarking, format conversi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 264 次。

如何安装 Image Edit Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-edit-skill」即可一键安装,无需额外配置。

Image Edit Skill 是免费的吗?

是的,Image Edit Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Image Edit Skill 支持哪些平台?

Image Edit Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Image Edit Skill?

由 Ryan(@yangruihan)开发并维护,当前版本 v1.0.0。

💬 留言讨论