---
name: "sharp-high-performance-image-process"
description: "Resize, compress, convert, and crop images at massive throughput using libvips-backed Sharp."
metadata:
  author: "Lovell Fuller"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "resize image with sharp"
  - "convert to webp sharp"
  - "generate blur placeholder sharp"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Sharp High-Speed Image Processing & WebP/AVIF Conversion

Processes images with Sharp: resizing with aspect ratio preservation (fit: 'cover', 'inside'), converting JPEG/PNG to modern WebP and AVIF formats, extracting metadata, generating blur placeholders, and streaming pipelines.

## When to Invoke
Invoke this skill whenever you need to:
- resize image with sharp
- convert to webp sharp
- generate blur placeholder sharp

## Execution SOP & Rules
1. Process image: await sharp(inputBuffer).resize(800, 600, { fit: 'cover' }).webp({ quality: 80 }).toFile('output.webp').
2. Stream processing: createReadStream.pipe(sharp().resize(400)).pipe(createWriteStream).
3. Extract metadata: const metadata = await sharp(imageBuffer).metadata();.
4. Ensure memory release by allowing Node garbage collection to clear large buffer objects.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
