optimize-assets

Convert PNG/JPG images to AVIF and MP4 videos to WebM with AV1 encoding.

Updated Feb 14, 2026
One-click install
npx skills add https://github.com/nisshi-dev/nisshi-dev-survey --skill optimize-assets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-assets
Source: https://github.com/nisshi-dev/nisshi-dev-survey/tree/main/.claude/skills/optimize-assets
Command: npx skills add https://github.com/nisshi-dev/nisshi-dev-survey --skill optimize-assets

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill reduces project load times and improves performance by compressing and optimizing image and video assets, making your project more efficient.

Core Features & Use Cases

  • Image Optimization: Converts PNG/JPG images to AVIF format, resizing them to a maximum width of 1920px.
  • Video Optimization: Transforms MP4 videos into WebM format using the AV1 codec, resizing them to a maximum height of 1080px.
  • Use Case: Optimize all images and videos in the docs/images directory to prepare them for web deployment, ensuring faster loading times for users.

Quick Start

Optimize all assets in the project by running the optimize-assets skill with the 'all' argument.

Frequently Asked Questions about optimize-assets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert PNG and JPG images to AVIF for web deployment?

To convert PNG and JPG images to AVIF, the skill resizes them to a max width of 1920px and compresses them, preserving originals with a .original extension. It also updates references in markdown and code files to reflect the new formats.

What is the best way to convert MP4 videos to WebM with AV1 encoding?

Converting MP4 videos to WebM with AV1 encoding is handled by resizing them to a maximum height of 1080px. The process preserves your original MP4 files by appending a .original extension, ensuring web-optimized output without data loss.

Does optimizing assets update file references in markdown and code automatically?

Yes, optimizing assets automatically updates references in markdown and code files. When images and videos are converted to AVIF and WebM formats, the tool scans your project to modify and align the corresponding file paths.

Can I optimize all images and videos in a specific directory at once?

Yes, you can optimize all images and videos in a specific directory at once. By running the skill with the 'all' argument, it processes all matching assets in your project, such as within a docs/images directory, preparing them for web deployment.

Are original files kept when compressing images and videos for web performance?

Original files are preserved when compressing images and videos for web performance. The tool appends a .original extension to your source PNG, JPG, and MP4 files before creating the optimized AVIF and WebM versions.

What dimensions does asset optimization apply when resizing images and videos?

Asset optimization applies a maximum width of 1920px for images and a maximum height of 1080px for videos. These dimension constraints ensure your media files are properly sized for fast loading on modern web displays.