sharp_skill

This skill optimizes image processing tasks by resizing, converting formats, and applying enhancements with a high-performance Node.js library.
  • TypeScript

72

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill aidotnet/moyucode --skill sharp

  • SKILL.md3.1 KB

Overview

This skill provides a high-performance Node.js image-processing tool powered by libvips for fast resizing, format conversion, and pixel manipulation. It supports JPEG, PNG, WebP, AVIF and TIFF with memory-efficient streaming and asynchronous APIs. Use it to build image pipelines for web, mobile, and server-side workflows that need speed and low resource usage.

How this skill works

The library reads images from files, buffers, or streams, applies a chain of transformations (resize, crop, rotate, blur, color adjustments, composite), and writes output in the requested format. It leverages libvips for multi-threaded, low-memory operations and exposes convenient methods for cloning pipelines, streaming large files, and producing buffers or files. You can compose operations synchronously in code and run many tasks in parallel via Promise.all or streaming pipelines.

When to use it

  • Generate responsive images and thumbnails for websites or CDNs
  • Convert images to modern formats (WebP, AVIF) to reduce bandwidth
  • Process large images efficiently using streams to avoid memory spikes
  • Add watermarks or overlays during image publishing workflows
  • Create on-the-fly image transformations in serverless or microservice environments

Best practices

  • Prefer streams for very large images to reduce memory usage
  • Clone pipeline instances before producing multiple variants to avoid side effects (use .clone())
  • Set explicit output quality/compression options for predictable file sizes
  • Resize before complex filters or composites to speed processing
  • Use Promise.all with care to limit concurrency and avoid overwhelming CPU/memory

Example use cases

  • Batch-generate thumbnails in several sizes for a gallery and save as optimized JPEGs
  • Convert uploaded user images to WebP/AVIF with fallbacks for browsers that lack support
  • Implement server-side image resizing endpoint that accepts width/height and returns streamed output
  • Add branded watermark to photos during publication by compositing a resized watermark in the corner
  • Build a background job that sharpens, color-corrects, and archives TIFF scans as compressed PNGs

FAQ

Yes. The API accepts streams; pipe an incoming request through the processing pipeline and then to a writable stream or response.

How do I avoid excessive memory usage when resizing many images?

Use streaming, limit concurrent jobs with a task queue, and resize early in the pipeline. Avoid creating large in-memory buffers for each job.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
sharp skill by aidotnet/moyucode | VeilStrat