TJ111m

Mimas — AI skill for Claude Code

AI community

Local proxy that stops images inside tool_result blocks from being billed as text (Anthropic Messages API).

How to install Mimas

This entry records only its repository, not the path inside it, so there is no exact command to give. Open TJ111m/Mimas and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Mimas does

Local proxy that stops images inside tool_result blocks from being billed as text (Anthropic Messages API). AI-installable: tell your agent "install Mimas" — it downloads, installs, autostarts, repoints your provider baseUrl to http://127.0.0.1:8817 and verifies the fix. Agents: AI-INSTALL.md. Humans: README.md.

Alternatives in AI

  • Coralline — 🪸 Powerlevel10k-inspired statusline for Claude Code — paste one prompt and your AI interviews you, then insta 541 ★
  • Setup Watch Skill — One-shot setup for Watch Skill — installs the engine, bootstraps ffmpeg/yt-dlp, registers the MCP server in ev 315 ★
  • Scipilot Writing Skill — SciPilot family: academic writing and polishing co-pilot, with a machine-checked writing-quality evidence chai 220 ★

README

Mimas

A tiny local proxy that stops images inside `tool_result` blocks from being billed as text.

Named after **Mimas**, a moon of Saturn.

**Using an AI agent?** Point it at [AI-INSTALL.md](AI-INSTALL.md). That file is written as literal instructions for an assistant: verify the bug, download and checksum the binary, write the config, repoint the provider, and confirm the rewrite is actually in the request path.


The bug

When an agent (ZCode, Claude Code, or anything else speaking the Anthropic Messages API) reads an image with its `Read` tool, it sends the image in the canonical Anthropic shape:

{
  "role": "user",
  "content": [
    {
      "type": "tool_result",
      "tool_use_id": "toolu_01...",
      "content": [
        { "type": "image", "source": { "type": "base64", "media_type": "image/png", "data": "..." } }
      ]
    }
  ]
}

That is correct and is exactly what Anthropic documents.

Some Anthropic-compatible relays, however, **stringify `tool_result.content` before forwarding**. The base64 payload then arrives upstream as *text*, so the model tokenizes it as text instead of decoding it as an image.

Two things break at once:

  1. Cost. The base64 string is tokenized. A 1.1 MB PNG becomes ~1,000,000 input tokens instead of ~1,200.
  2. Correctness. The model never sees the image. Asked "what colour is this picture?", it answers nothing at all.

Measured against a relay with this behaviour

Same image, three positions in the request body:

Where the image block sits input_tokens Model sees it?
Top-level user content block 1,155 yes
Inside tool_result.content (array) 1,047,059 no
Inside tool_result.content (stringified) 1,047,057 no

About **900×** more expensive, and blind.


What Mimas does

Mimas sits on `127.0.0.1` between your agent and the relay and rewrites the request so the image blocks travel as **sibling content bloc