image-context-runtime

A workflow for handling image-generation and image-inspection jobs while keeping the actual image files in a separate local runtime. The main coding task receives job IDs, file references, hashes, dimensions, and short status details.

In plain words
What is it for?
Use it for repeated image generation, visual research, storyboards, design assets, or visual quality checks. It supports submitting a job, checking its status, and receiving a compact handoff when it finishes.
Why use it?
It keeps large image data and provider responses from filling the task's working context. It also prevents the same image request from being submitted repeatedly.

Skill for Claude CodeCodex

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 skills/shixinnt/codex-image-context-runtime/image-context-runtime
Any agent
npx skills add shixinnt/codex-image-context-runtime --skill image-context-runtime
Clone the repo
git clone --depth 1 https://github.com/shixinnt/codex-image-context-runtime

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 601 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.00045 $0.00601
Opus 5 $0.00023 $0.00300
Sonnet 5 $0.00009 $0.00120
Haiku 4.5 $0.00005 $0.00060

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

Security

Grade A, and why

image-context-runtime 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 2d 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.

plugins/codex-image-context-runtime/skills/image-context-runtime/SKILL.md · 52 lines

How it starts

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

Image Context Runtime

Use this workflow for repeated image generation, image inspection, storyboard work, design assets, visual research, or visual QA when returning raw media through the controlling task would add unnecessary context pressure.

Core boundary

  • Treat the local Runtime as the owner of image bytes and durable Job state.
  • Do not ask an MCP tool to return an image, data URL, base64 payload, or raw Provider response.
  • Keep the controlling task text-only unless the user explicitly asks Codex to open a particular image.
  • An explicit image open is a separate visual-context decision; this plugin does not make it free.
  • The default mock Provider is offline. A real Provider must be explicitly configured and may incur cost.

Generate an image

  1. Confirm one bounded prompt, output name, size, quality, and stable idempotency key.
  2. Call submit_image_generation.
  3. Keep the returned job_id.
  4. Poll with get_image_job; do not resubmit the same intent.
  5. When terminal, call get_image_handoff.
  6. Report the relative artifact ref, SHA-256, dimensions, and compact handoff.
  7. Do not load the generated image into the controlling task unless the user needs direct visual judgment.

Inspect an image

  1. Use a path under a configured workspace root. Never send inline media.
  2. Ask one bounded inspection question.
  3. Call submit_image_inspection with a stable idempotency key.
  4. Poll by Job ID.
  5. Retrieve the bounded inspection handoff.
  6. Make clear that the handoff is Provider analysis, not human approval.

Restart and recovery

  • Completed jobs remain queryable by Job ID after restart.
  • A queued pre-dispatch job may resume safely.
  • A job interrupted after Provider dispatch can enter needs_review.
  • Do not automatically redispatch an ambiguous paid request.
  • Use resume_image_job only after reviewing its diagnostic and acknowledging possible duplicate cost when the tool requires it.

Read the full file on GitHub · 52 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. 2d ago First seen · 52 lines · 45 tokens per session scan A 4f244322503d

Subscribe to this mod's changes

image-context-runtime is a skill published in the GitHub repository shixinnt/codex-image-context-runtime (100 stars, last pushed 18d ago), licensed Apache-2.0. It adds 45 tokens to every session and 601 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.

Related

Other skills, from other repositories

ima2

Use the ima2-gen CLI/server to generate, edit, inspect, and manage local AI image generation jobs.

lidge-jun/ima2-gen · 25 tokens

atet

Use Atet to create, generate, record, edit, and render visual media with a local CLI and coding agent. Trigger for AI image or video generation, screen, camera, microphone, or system-audio recording, non-destructive video editing, silence and filler-word removal, captions or subtitles, speaker framing, screen zooms…

hraness/atet · 118 tokens

codex-workspace-enhancer

Audit, install, adapt, or extend Codex Workspace Enhancer. Prefer the native Codex plugin and fullscreen MCP App for a port-free visual asset canvas; use the legacy sidebar/AssetBrowser adapters only for features the plugin does not yet provide. Use for native Codex widgets, visual workspace UI, image canvases, task…

papperrollinggery/codex-workspace-enhancer · 88 tokens

visual-workspace

Open and use the native Visual Workspace infinite canvas for the active Codex project. Use when the user asks for a canvas, moodboard, image board, asset browser, spatial image arrangement, or the Codex Workspace Enhancer UI.

papperrollinggery/codex-workspace-enhancer · 51 tokens

photo-decode

Photo Decode / PhotoDecode / 解图 (photo-decode) — Analyze an uploaded image, reconstruct its visual logic into a source-adaptive background-free flat composition, then derive a palette and independently reconstructed key visual elements. Use when the user asks to 解图, Photo Decode, PhotoDecode, photo-decode, decode an…

Cloudlake110/photo-decode · 110 tokens

digital-eguide

A two-spread digital e-guide preview — page 1 is a cover (display title, author, "What's inside" stats, table of contents teaser); page 2 is a spread (lesson body with pull-quote and a step list). Lifestyle / creator brand tone. Use when the brief asks for an "e-guide", "digital guide", "lookbook", "lead magnet"…

nexu-io/open-design · 103 tokens