ctx2img

ctx2img is a skill for Claude Code, Codex from Koukyosyumei/h5i-ctx2img. It costs 103 tokens per session (976 once invoked), scanned A, original, Apache-2.0.

A repository map that turns code and other text into a compact visual index, showing which areas are large, relevant, connected, or risky. Exact source text can be retrieved using stable file and symbol references.

In plain words
What is it for?
Use it to map a repository for a task, find the most relevant files and modules, trace dependencies, and flag areas involving networks, commands, secrets, or code evaluation.
Why use it?
It helps an agent understand a large codebase while using fewer context tokens, then locate the exact code it needs to inspect.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to map a repository for a task, find the most relevant files and modules, trace dependencies, and flag areas involving networks, commands, secrets, or code evaluation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/koukyosyumei/h5i-ctx2img/ctx2img
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.

Any agent
npx skills add Koukyosyumei/h5i-ctx2img --skill ctx2img
Clone the repo
git clone --depth 1 https://github.com/Koukyosyumei/h5i-ctx2img

Made for: Claude Code, Codex.

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 ctx2img

README.md
[![agentmods](https://agentmods.dev/badge/skills/koukyosyumei/h5i-ctx2img/ctx2img/github.svg)](https://agentmods.dev/skills/koukyosyumei/h5i-ctx2img/ctx2img)
Your own site
<a href="https://agentmods.dev/skills/koukyosyumei/h5i-ctx2img/ctx2img"><img src="https://agentmods.dev/badge/skills/koukyosyumei/h5i-ctx2img/ctx2img/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 ctx2img

Your own site · 80×15
<a href="https://agentmods.dev/skills/koukyosyumei/h5i-ctx2img/ctx2img"><img src="https://agentmods.dev/badge/skills/koukyosyumei/h5i-ctx2img/ctx2img.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 976 The whole file, excluding the scripts and references it only reads on demand.
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.00103 $0.00976
Opus 5 $0.00051 $0.00488
Sonnet 5 $0.00021 $0.00195
Haiku 4.5 $0.00010 $0.00098

Measured 12d ago against content hash e4921363f9a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ctx2img 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 12d 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.

skills/ctx2img/SKILL.md · 80 lines

How it starts

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

ctx2img — Repository Atlas

ctx2img compiles the repository into a query-conditioned map: an image where position = module topology, cell area = code size, elevation (▲1–▲5) = relevance to your current task, hatched red = trust hazards, arrows = dependencies. Every region/file/symbol carries a stable handle (R3, F103, S12) that resolves back to exact source. The image is an index, never the source of truth — exact code always comes from ctx2img read as text.

Workflow

  1. Index the repo against your task (auto-builds on first run):

    ctx2img paint . --budget 2000 -q "<one line describing your task>"
    

    stdout is the legend (region roster with handles + elevation). If it prints an # atlas: <path> line, Read that PNG file now — the image carries the geography the legend can't. On small repos it may print a text-only roster instead (representation: text) — that alone is a complete map; no image to read.

  2. Pick the summit. Start from the highest-elevation regions (▲5/▲4) and their top files. ⚠net/exec/secrets/eval tags mark files that touch the outside world — relevant for anything security-adjacent.

  3. Focus where the task points — paint just that module or file:

    ctx2img paint src/auth -q "<task>"   # one module's FULL SOURCE as image tiles
    ctx2img paint src/auth/session.rs    # a single file as dense pages
    

    Subdirectory paints share the whole repo's handles and relevance, so the tiles line up with the atlas you already saw.

  4. Get exact source as text (never trust pixels for code):

    ctx2img read F103                  # whole file, numbered
    ctx2img read S12                   # just that symbol's line range
    ctx2img read F103 --lines 40:120
    ctx2img read --find "session"      # search paths+symbols, answers in handles
    
  5. Compress any bulky text (a long doc, tool output, a spec — or a whole directory) before ingesting it:

Read the full file on GitHub · 80 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. 12d ago First seen · 80 lines · 103 tokens per session scan A e4921363f9a8

Subscribe to this mod's changes

ctx2img is a skill published in the GitHub repository Koukyosyumei/h5i-ctx2img (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 103 tokens to every session and 976 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.