image-analyzer-mcp: Instructions file for Codex

AGENTS.md

image-analyzer-mcp AGENTS.md is an instructions file for Codex, OpenCode from AlierQ/image-analyzer-mcp. It costs 873 tokens per session, scanned A, original, MIT.

An AGENTS.md instruction file explaining when agents should use image-analyzer-mcp. It covers image analysis and image comparison for models that cannot inspect images themselves.

In plain words
What is it for?
Use it to decide when to analyze an image, compare a reference with an implementation, and prioritize visual fixes.
Why use it?
It prevents unnecessary tool calls and gives agents a defined procedure when the main model cannot read an image.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex.

This is AlierQ/image-analyzer-mcp's own configuration. It tells Codex and OpenCode how to work on image-analyzer-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything image-analyzer-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AlierQ/image-analyzer-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AlierQ/image-analyzer-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/AlierQ/image-analyzer-mcp

Made for: Codex, OpenCode.

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 image-analyzer-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/alierq/image-analyzer-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/alierq/image-analyzer-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/alierq/image-analyzer-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/alierq/image-analyzer-mcp/agents-md/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 image-analyzer-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/alierq/image-analyzer-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/alierq/image-analyzer-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 873 This file is loaded in full into every session.
When invoked 873 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00873 $0.00873
Opus 5.5 $0.00349 $0.00349
Sonnet 5.5 $0.00175 $0.00175
Haiku 4.5 $0.00087 $0.00087

Measured 2mo ago against content hash 9a5c3db3764b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

image-analyzer-mcp AGENTS.md 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 2mo 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.md · 59 lines

What it actually says

图片分析使用规则

使用前提(先判断,再调用)

本工具不是“只要粘贴图片就调用”的通用工具。只有当当前主模型不支持图片输入时,才使用本工具:

  1. 当前主模型支持图片输入(例如 Codex 内置的 ChatGPT 视觉模型):直接由主模型分析图片,不要调用 analyze_image / compare_images / analyze_clipboard_image。
  2. 当前主模型不支持图片输入(例如通过 CC Switch 切换到 DeepSeek 等不支持多模态图片输入的文本模型,图片在会话中显示为 [Unsupported Image]):才调用本工具。

判断方法:先确认当前会话主模型是否支持视觉/图片输入。支持就直接分析;只有不支持(或图片显示为 [Unsupported Image])时才调用本工具,不要因为用户粘贴了图片就无条件调用。

什么时候必须调用 analyze_image

只有确认主模型不支持图片输入后,当任务中出现以下情况时,自动调用 analyze_image,不要凭文字描述猜测:

  • 用户引用 .png、.jpg、.jpeg、.webp 截图或设计图
  • 任务包含 screenshot、mockup、wireframe、design、Figma 导出图等视觉参考
  • 需要根据图片实现页面、组件或复刻设计细节
  • 需要确认颜色、间距、字体、布局、组件结构

调用方式:

analyze_image(path="图片路径", prompt="需要重点分析的内容,可选")

工具会返回结构化 JSON,包含 layout、sections、components、colors、typography、spacing_system、issues、conversion_to_code 等字段。实现时应直接使用这些字段。

什么时候必须调用 compare_images

只有确认主模型不支持图片输入后,当任务是“按参考图修改当前实现”或“验证还原度”时,自动调用:

compare_images(
  referencePath="参考图路径",
  currentPath="当前实现截图路径",
  prompt="需要重点对比的部分,可选"
)

然后按返回的 differences 和 fix_plan 处理:

  1. 先修复 high 严重度和 P0 优先级的问题
  2. 再处理 medium / P1
  3. 最后处理 low / P2
  4. 修复完成后重新截屏并再次调用 compare_images 验证

硬性规则

  • 调用前先确认当前主模型是否支持图片输入:支持则由主模型直接分析,不要调用本工具
  • 只有主模型不支持图片输入(例如通过 CC Switch 切换到 DeepSeek 等文本模型)时,才调用本工具;不要因为用户粘贴了图片就无条件调用
  • 不要用文字描述猜测图片里的颜色、间距、布局和组件细节
  • 不要告诉用户“请先手动运行视觉分析”,直接调用工具
  • 相对路径可以直接传给工具,服务端会按 VISION_BASE_DIR 或进程目录解析
  • 如果用户粘贴或复制了图片(即使界面提示“此模型不支持图片输入”),不要回复“看不到图片”;优先调用 analyze_clipboard_image,如果消息里有图片文件路径则调用 analyze_image(path)
  • 视觉模型只作为识图工具,它们返回的 JSON 只是分析素材;最终解释、回答、判断和代码决策必须由主模型(例如 DeepSeek)完成,不要直接把视觉模型的原始输出当作最终回答
  • 如果工具返回 error 字段,先修复配置错误(API key、base URL、模型),再继续任务
  • 如果模型没有返回可用 JSON,按 raw_output 内容谨慎处理,并考虑重试一次
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. 2mo ago First seen · 59 lines · 873 tokens per session scan A 9a5c3db3764b

Subscribe to this mod's changes

image-analyzer-mcp AGENTS.md is an instructions file published in the GitHub repository AlierQ/image-analyzer-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 873 tokens to every session, about $0.0035 per session on Opus 5.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.

Related

image-analyzer-mcp AGENTS.md compared with instructions from other repositories

image-analyzer-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image-analyzer-mcp AGENTS.mdAlierQ/image-analyzer-mcpInstructions file02mo agoMITA873Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot