asset-optimization

asset-optimization is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 29 tokens per session (2,460 once invoked), scanned A, original, Apache-2.0.

A workflow for making game files smaller and faster to load, covering images, 3D models, and sound. It includes checking file sizes, compressing and converting files, then checking their quality.

In plain words
What is it for?
Use it to find the biggest assets, convert them for different platforms, add texture mipmaps, process many files at once, and measure size and memory savings.
Why use it?
Large game files use more storage and memory and can slow loading. This helps reduce that cost while checking that the result still looks and sounds acceptable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is find ./Assets/Textures -type f \( -name "*.png" -o -name "*.tga" \) -exec ls -lh {} \; | sort -k5 -hr | head -20.

Good fit Use it to find the biggest assets, convert them for different platforms, add texture mipmaps, process many files at once, and measure size and memory savings.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/medy-gribkov/arcana
agentmods
npx agentmods add skills/medy-gribkov/arcana/asset-optimization

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin asset-optimization/plugin install asset-optimization after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for asset-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/asset-optimization/github.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/asset-optimization)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/asset-optimization"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/asset-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for asset-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/asset-optimization"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/asset-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,460 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.02460
Opus 5 $0.00015 $0.01230
Sonnet 5 $0.00006 $0.00492
Haiku 4.5 $0.00003 $0.00246

Measured 8d ago against content hash 8745f5c53db7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

asset-optimization scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/asset_optimizer.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(cmd, check=True, capture_output=True)
skills/asset-optimization/SKILL.md · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Asset Optimization

Workflow Overview

Asset optimization follows this 4-step pattern:

  1. Audit - Identify largest assets, measure load times
  2. Compress - Apply platform-specific compression
  3. Convert - Transform to efficient runtime formats
  4. Validate - Verify quality and measure savings

Texture Optimization Workflow

Step 1: Audit Current Usage

# Find all textures and sort by size
find ./Assets/Textures -type f \( -name "*.png" -o -name "*.tga" \) -exec ls -lh {} \; | sort -k5 -hr | head -20

# Output total size
du -sh ./Assets/Textures

Step 2: Apply Compression

BAD - Uncompressed RGBA32:

Character_Diffuse.png: 2048x2048, RGBA32
Size: 16 MB
Memory: 16 MB at runtime

GOOD - Platform-optimized BC7:

Character_Diffuse.dds: 2048x2048, BC7
Size: 2 MB
Memory: 2 MB at runtime (8x savings)

Step 3: Batch Convert with texconv

# Windows - Convert all PNG to BC7 DDS with mipmaps
for file in ./source/*.png; do
    texconv -f BC7 -m 0 -o ./optimized/ "$file"
done

# Mobile - Convert to ASTC 6x6
for file in ./source/*.png; do
    astcenc -cl "$file" ./optimized/$(basename "$file" .png).astc 6x6 -medium
done

Step 4: Validate Quality

# Compare file sizes
du -sh ./source ./optimized

# Visual diff (requires ImageMagick)
compare -metric PSNR source.png optimized.png diff.png

WebP/AVIF Conversion for Web

WebP Conversion

# Single file - 80% quality, lossless alpha
cwebp -q 80 input.png -o output.webp

# Batch convert entire directory
find ./images -name "*.png" -exec bash -c 'cwebp -q 80 "$0" -o "${0%.png}.webp"' {} \;

# With fallback generation
for img in ./images/*.png; do
    cwebp -q 80 "$img" -o "${img%.png}.webp"
    # Keep original as fallback
done

Before/After Example:

hero-banner.png:  1.2 MB (PNG, lossless)
hero-banner.webp: 180 KB (WebP, 85% savings)

AVIF Conversion (Better Compression)

# Install avif encoder
npm install -g @squoosh/cli

# Convert with quality 60 (good balance)
squoosh-cli --avif '{"cqLevel":60}' input.png

# Batch process
find ./images -name "*.png" | xargs squoosh-cli --avif '{"cqLevel":60}'

Read the full file on GitHub · 343 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 343 lines · 29 tokens per session scan A 8745f5c53db7

Subscribe to this mod's changes

asset-optimization is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 2,460 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.