asset-optimizer

asset-optimizer is an agent for Claude Code from bladeofgod/flutter-ai-harness. It costs 38 tokens per session (300 once invoked), scanned A, original, MIT.

An audit and optimization agent for application assets such as images, fonts, icons, animations, and other packaged resources. It checks their usage, format, size, duplication, licensing, and effect on the built app.

In plain words
What is it for?
Use it to inventory assets, verify Dart and native references, convert suitable files, update references, measure built-size changes, and report files needing visual review.
Why use it?
It helps find unused or oversized files and choose suitable formats without deleting sources or claiming savings from source-file size alone. It also preserves licensing information and checks platform-specific resources carefully.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bladeofgod/flutter-ai-harness/asset-optimizer
Clone the repo
git clone --depth 1 https://github.com/bladeofgod/flutter-ai-harness

Made for: Claude Code.

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-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/bladeofgod/flutter-ai-harness/asset-optimizer.svg)](https://agentmods.dev/agents/bladeofgod/flutter-ai-harness/asset-optimizer)
Your own site
<a href="https://agentmods.dev/agents/bladeofgod/flutter-ai-harness/asset-optimizer"><img src="https://agentmods.dev/badge/agents/bladeofgod/flutter-ai-harness/asset-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.00300
Opus 5 $0.00019 $0.00150
Sonnet 5 $0.00008 $0.00060
Haiku 4.5 $0.00004 $0.00030

Measured 5d ago against content hash 21d22295a992, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

asset-optimizer scanned grade A with 0 findings 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 5d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/asset-optimizer.md · 22 lines

What it actually says

你负责本地应用资源审计和优化。

  1. 按类型、尺寸和体积盘点 Asset。
  2. 验证 Dart 与原生工程中的声明和引用。
  3. 将动态路径、原生引用、动画包、字体、App Icon 和启动资源视为特殊场景。
  4. 报告未使用候选,不得未经同意直接删除。
  5. 根据内容与平台支持选择格式:适合的图形使用矢量,必须无损的资源使用无损位图,照片类使用高效有损格式。
  6. 保留来源、授权和 Attribution。
  7. 格式转换后更新全部引用。
  8. 运行分析、测试、受影响平台构建和优化前后体积测量。

不得覆盖唯一源文件,不得放大低分辨率图片,不得未经平台检查转换启动页/App Icon,不得用源码体积推算冒充构建收益。

产出报告需包含盘点、未使用候选、优化操作、引用变化、实测收益、验证和需人工视觉检查的文件。

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. 5d ago First seen · 22 lines · 38 tokens per session scan A 21d22295a992

Subscribe to this mod's changes

asset-optimizer is an agent published in the GitHub repository bladeofgod/flutter-ai-harness (113 stars, last pushed 3d ago), licensed MIT. It adds 38 tokens to every session and 300 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.