# Codebase Vision Report

> Render an entire codebase (local directory or remote Git URL) into the minimum number of dense PNG pages via gitoutput --images, read every page as images, and write a report answering a supplied prompt/question about the codebase. Use when the user wants a codebase analyzed, summarized, audited, or questioned via the image-packing pipeline instead of pulling raw text into context. Requires npx and network access to npm and the target repo.

- Skill: `anentrypoint/codebase-vision-report` (Agent Skill)
- Install (CLI): `npx skillmds@latest add anentrypoint/codebase-vision-report`
- Raw SKILL.md: https://api.skillmd.com/api/skills/anentrypoint/codebase-vision-report/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: anentrypoint (https://skillmd.com/u/anentrypoint)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/anentrypoint/codebase-vision-report

---


# codebase-vision-report

Analyzes a codebase by rendering it as dense images (via [gitoutput](https://github.com/AnEntrypoint/gitoutput)'s `--images` mode, which uses [mdpix](https://www.npmjs.com/package/mdpix)'s bitmap-atlas renderer), reading every rendered page, and producing a report grounded in what was actually read. For a text-only, non-image variant, see [`codebase-text-report`](../codebase-text-report/SKILL.md) — same workflow shape, reads gitoutput's default `.txt` chunks instead of rendering pages.

## Arguments

Invoke as `/codebase-vision-report <target> :: <prompt>`, or `Skill(skill="codebase-vision-report", args="<target> :: <prompt>")`.

- `target` — a local directory path or a remote Git URL (anything `gitoutput` accepts as its `source` argument).
- `prompt` — the question or report focus (e.g. "find security issues", "summarize the architecture", "does this codebase handle X correctly").

Split `args` on the first `::`. If no `::` is present, treat the whole string as `target` and use a default prompt: "Summarize this codebase's architecture and key components."

Optional trailing flags in `args` (space-separated, after the prompt or anywhere in `target`): `--image-profile <claude|gpt|gemini|grok>` (default `claude` — this skill runs inside Claude Code, so `claude` is almost always correct), `--exclude-pattern <glob>` / `--include-pattern <glob>` (repeatable, passed through to `gitoutput` to scope a large codebase).

## Step 1 — Generate images

Always invoke `gitoutput` at its densest defaults — `claude` profile and minification on — so the codebase packs into the fewest possible pages: never pass `--no-minify`, and only override `--image-profile` away from `claude` when the user explicitly names a different target model. Both are gitoutput's own defaults for `--images`, so simply omitting `--image-profile`/`--no-minify` already gets the minimum-page-count behavior; this is a deliberate choice, not an oversight, and following the command below exactly preserves it.

Run `gitoutput` via `npx` with `--images --json` so the result is machine-parseable, writing to a fresh output directory (use a timestamp or the target's basename plus a short random suffix to avoid colliding with a prior run of this skill in the same working directory — never reuse a bare default name across invocations):

```bash
npx github:AnEntrypoint/gitoutput "<target>" --images --json --output "./codebase-vision-<slug>-<suffix>" [--image-profile <profile>] [--exclude-pattern <p> ...] [--include-pattern <p> ...]
```

Capture stdout and parse it as JSON: `{outDir, pageFiles, factsheetFile, manifestFile, pageCount, truncated}`. A non-zero exit or a JSON body containing `error` means generation failed — report the error to the user directly, do not proceed to steps 2-3 on a failed generation.

If `pageCount` is `0` (empty/trivial target — nothing matched, or the target had no analyzable content), stop here and report "nothing to analyze" rather than attempting to read zero images or fabricating a report.

If `truncated` is `true`, the codebase exceeded the chosen profile's page budget and only the first `pageCount` pages are present — note this explicitly in the final report (e.g. "This analysis covers the first N pages of the codebase; it was truncated because the codebase exceeds the `<profile>` profile's page limit. Narrow the scope with `--include-pattern`/`--exclude-pattern` for full coverage."). Never present a truncated analysis as if it were complete.

## Step 2 — Batch-read every page

Read each path in `pageFiles`, in order, using the Read tool directly on the PNG path — no separate vision API call is needed; this skill runs inside a vision-capable Claude Code session and Read already renders images.

For large `pageCount` (roughly above 20-30 pages, since each page costs real context), read in batches: read a batch of pages, write a running note of what each batch covered (file names visible, key structures noticed) before moving to the next batch, so the full codebase is covered without holding every page's full detail in context simultaneously. Do not silently skip pages to stay small — if the codebase is large, read all of it in batches rather than sampling a subset and reporting as if it were the whole thing.

If `factsheetFile` is non-null, also Read it — it holds exact-value strings (hashes, UUIDs, URLs, numeric IDs) that vision models are prone to misreading from the rendered pages. Cross-reference any exact value the report cites against the factsheet rather than trusting what was read off a page image.

## Step 3 — Write the report

Synthesize a report that directly addresses `prompt`, grounded in what was actually read across all pages (and the factsheet for exact values) — never a generic description that could have been written without reading the pages. Structure:

- A one-paragraph direct answer to `prompt`.
- Supporting detail organized by the codebase's actual structure (as seen across the pages), citing specific files/functions/patterns observed.
- A truncation/coverage note if step 1 flagged `truncated: true`.
- Any exact values (hashes, IDs, URLs) cited must match the factsheet, not a page-read guess.

Write the report to a file (`<outDir>/report.md`, next to the generated images) and also present it directly in the response. Leave the generated `outDir` (images, factsheet, manifest, report) on disk for the user to re-inspect — do not delete it after the report is written.

