
Sharp
- 30 installs
- 84 repo stars
- Updated January 28, 2026
- aidotnet/moyucode
sharp is a Claude Code skill that provides TypeScript recipes for the lovell/sharp Node.js library to resize, convert, and manipulate images.
About
sharp is a Claude Code skill that wraps the lovell/sharp Node.js image-processing library. It gives the agent ready TypeScript recipes to resize, convert format, crop, watermark, and generate thumbnails for JPEG, PNG, WebP, AVIF, and TIFF images. A developer uses it when adding image transformation to a Node backend or build pipeline.
- Wraps the lovell/sharp Node.js library for image processing
- Resize, convert, and manipulate JPEG, PNG, WebP, AVIF, and TIFF images
- Includes recipes for watermarks, thumbnails, and stream processing
Sharp by the numbers
- 30 all-time installs (skills.sh)
- Ranked #969 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
sharp capabilities & compatibility
- Capabilities
- image resize · format conversion · thumbnail generation · watermark
- Use cases
- image generation
- Pricing
- Free
What sharp says it does
High-performance image processing for resizing, converting, and manipulating images.
npm install sharp
`image`, `resize`, `convert`, `thumbnail`, `processing`
npx skills add https://github.com/aidotnet/moyucode --skill sharpAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 30 |
|---|---|
| repo stars | ★ 84 |
| Last updated | January 28, 2026 |
| Repository | aidotnet/moyucode ↗ |
What it does
Generate TypeScript code to resize, convert, watermark, and thumbnail images with the sharp library in a Node.js project.
Who is it for?
Adding image resize, format conversion, and thumbnail generation to a Node.js backend or build step.
When should I use this skill?
You need to resize, convert, watermark, or thumbnail images in a Node.js/TypeScript project.
What you get
Produces working sharp TypeScript code for resize, convert, crop, watermark, and thumbnail tasks.
- TypeScript image-processing code
- thumbnail generation function
- watermark compositing function
By the numbers
- Covers 5 image formats: JPEG, PNG, WebP, AVIF, TIFF
Files
Sharp Tool
Description
High-performance image processing for resizing, converting, and manipulating images.
Source
- Repository: lovell/sharp
- License: Apache-2.0
Installation
npm install sharpUsage Examples
Resize Image
import sharp from 'sharp';
// Resize to specific dimensions
await sharp('input.jpg')
.resize(800, 600)
.toFile('output.jpg');
// Resize with aspect ratio preserved
await sharp('input.jpg')
.resize(800, null) // Width 800, auto height
.toFile('output.jpg');
// Resize with fit options
await sharp('input.jpg')
.resize(800, 600, {
fit: 'cover', // cover, contain, fill, inside, outside
position: 'center' // center, top, right, bottom, left
})
.toFile('output.jpg');Convert Format
// Convert to WebP
await sharp('input.jpg')
.webp({ quality: 80 })
.toFile('output.webp');
// Convert to AVIF (modern format)
await sharp('input.jpg')
.avif({ quality: 60 })
.toFile('output.avif');
// Convert to PNG with transparency
await sharp('input.jpg')
.png({ compressionLevel: 9 })
.toFile('output.png');Image Manipulation
// Rotate and flip
await sharp('input.jpg')
.rotate(90)
.flip()
.toFile('output.jpg');
// Blur and sharpen
await sharp('input.jpg')
.blur(5)
.sharpen()
.toFile('output.jpg');
// Grayscale and tint
await sharp('input.jpg')
.grayscale()
.tint({ r: 255, g: 128, b: 0 })
.toFile('output.jpg');
// Crop
await sharp('input.jpg')
.extract({ left: 100, top: 100, width: 500, height: 300 })
.toFile('output.jpg');Add Watermark
async function addWatermark(input: string, watermark: string, output: string) {
const image = sharp(input);
const { width, height } = await image.metadata();
// Resize watermark
const watermarkBuffer = await sharp(watermark)
.resize(Math.round(width! * 0.2))
.toBuffer();
await image
.composite([{
input: watermarkBuffer,
gravity: 'southeast',
blend: 'over',
}])
.toFile(output);
}Generate Thumbnails
async function generateThumbnails(input: string, sizes: number[]) {
const image = sharp(input);
await Promise.all(sizes.map(size =>
image
.clone()
.resize(size, size, { fit: 'cover' })
.jpeg({ quality: 80 })
.toFile(`thumb-${size}.jpg`)
));
}
// Usage
await generateThumbnails('photo.jpg', [64, 128, 256, 512]);Stream Processing
import { createReadStream, createWriteStream } from 'fs';
// Process large images with streams
createReadStream('large-input.jpg')
.pipe(sharp().resize(1920, 1080).jpeg({ quality: 85 }))
.pipe(createWriteStream('output.jpg'));Tags
image, resize, convert, thumbnail, processing
Compatibility
- Codex: ✅
- Claude Code: ✅
Related skills
FAQ
Which image formats does the sharp skill support?
It covers JPEG, PNG, WebP, AVIF, and TIFF for resizing and conversion.
Does it handle thumbnails and watermarks?
Yes, the SKILL.md includes recipes to generate multiple thumbnail sizes and composite a watermark.