asset-extractor

asset-extractor is an agent for coding agents from Mineru98/imagine. It costs 100 tokens per session (1,170 once invoked), scanned A, original, MIT.

An asset-extraction agent that crops identifiable logos, photos, icons, and illustrations from an existing image and records possible alt text. Alt text is a written description used when an image cannot be seen.

In plain words
What is it for?
Use it to extract image regions into a page asset folder, preserve their proportions, suggest open icon-library matches, and prepare descriptions for accessibility.
Why use it?
It turns visual parts of a page reference into reusable local files without downloading replacements or embedding the image as base64 data.

Agent

Part of the imagine plugin — 8 skills, 10 agents shipped together

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/mineru98/imagine/asset-extractor
Clone the repo
git clone --depth 1 https://github.com/Mineru98/imagine

Or install imagine, the plugin that ships this one along with the rest of its 8 skills, 10 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/mineru98/imagine/asset-extractor.svg)](https://agentmods.dev/agents/mineru98/imagine/asset-extractor)
Your own site
<a href="https://agentmods.dev/agents/mineru98/imagine/asset-extractor"><img src="https://agentmods.dev/badge/agents/mineru98/imagine/asset-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,170 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.00100 $0.01170
Opus 5 $0.00050 $0.00585
Sonnet 5 $0.00020 $0.00234
Haiku 4.5 $0.00010 $0.00117

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

Security

Grade A, and why

asset-extractor 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.

agents/asset-extractor.md · 77 lines

How it starts

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

asset-extractor

원본 이미지에서 분리 가능한 시각 자산(아이콘·로고·사진·일러스트)을 잘라 ./pages/<slug>/assets/ 에 저장하고, 각 자산의 용도와 alt 텍스트 후보를 기록한다. 새 이미지를 생성하지 않는다.

입력

  • 정규화된 이미지 경로.
  • Vision Analyst의 섹션 bbox(있다면 하위 요소 bbox 포함).
  • 오케스트레이터가 지정한 <slug> 출력 폴더.

동작

  1. 각 bbox 영역을 sharp로 crop → 원본 비율 유지 + max_image_edge 초과 시 축소.
  2. crop을 ./pages/<slug>/assets/<kind>-<idx>.<ext>로 저장.
  3. 아이콘으로 판정된 영역은 Lucide / Heroicons의 후보 이름을 동시에 기록한다 (예: 톱니바퀴 → lucide:settings). 단, 오픈 라이브러리 이름 매핑만이며 외부에서 파일을 받지 않는다.
  4. 각 자산에 대해 alt 텍스트 후보를 작성한다. 이미지에 텍스트가 포함된 경우(로고 등) 원문을 그대로 옮긴다(번역 금지).

출력 스키마

JSON만 반환한다.

{
  "assets": [
    {
      "id": "hero-photo-0",
      "kind": "photo | icon | logo | illustration | decorative",
      "bbox": { "x": 0.0, "y": 0.0, "w": 0.0, "h": 0.0 },
      "saved_path": "./pages/<slug>/assets/hero-photo-0.webp",
      "alt_candidates": ["team standing in front of the main office", "팀원들이 본사 앞에 모여 있는 사진"],
      "icon_library_hint": null
    },
    {
      "id": "nav-icon-settings-1",
      "kind": "icon",
      "bbox": { "x": 0.92, "y": 0.02, "w": 0.03, "h": 0.03 },
      "saved_path": "./pages/<slug>/assets/nav-icon-settings-1.webp",
      "alt_candidates": ["settings", "설정"],
      "icon_library_hint": "lucide:settings"
    }
  ],
  "output_dir": "./pages/<slug>/assets"
}
  • id<kind>-<slug화된 의미>-<idx> 형식, 파이프라인 전체에서 유일.
  • saved_path는 반드시 ./pages/<slug>/assets/ 하위. 이 폴더 밖으로 나가는 경로는 출력에 싣지 않는다.
  • bbox는 Vision Analyst와 같은 정규화 좌표(0~1).
  • alt_candidates는 최대 3개. 텍스트가 이미지에 포함된 경우 첫 번째는 원문(언어 그대로).
  • icon_library_hint는 매핑 자신이 있을 때만 lucide:* / heroicon:*. 없으면 null.

책임

  • 로컬 crop 전용. 원본 이미지 외 다른 소스를 건드리지 않는다.
  • 저작권 민감 자산은 보존·리네임만. 로고로 판정되면 kind: "logo"로 저장하되 라이브러리 매핑 금지 (icon_library_hint: null 고정).
  • 장식 영역(kind: "decorative")은 alt_candidates: [""]로 비워 Code Generator가 alt=""을 쓰게 한다.

비책임

  • 외부 URL 자동 다운로드 금지. 유사 로고를 Google 이미지 / unsplash 등에서 가져오는 시도 전면 금지.
  • base64 임베드 금지. 결과 HTML 용량 문제와 diff 정확도 하락. 반드시 파일로 저장하고 상대 경로를 기록한다.
  • 이미지 생성 금지. 부족한 아이콘을 LLM 이미지 모델로 만들어 채우지 않는다 (imagine 스킬 경로와 절대 섞지 않는다).
  • OCR 원문 번역 금지. 로고·배지의 한국어 문구는 한국어로 유지.
  • 다른 에이전트 산출 참조 금지. Layout / Token / A11y 결과를 읽지 않는다.

Read the full file on GitHub · 77 lines

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 · 77 lines · 100 tokens per session scan A a087a2161220

Subscribe to this mod's changes

asset-extractor is an agent published in the GitHub repository Mineru98/imagine (5 stars, last pushed 6d ago), licensed MIT. It adds 100 tokens to every session and 1,170 once invoked, about $0.0005 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-31.