ingesting-images

ingesting-images is a skill for Claude Code from chrisgagne/grounded-forge. It costs 44 tokens per session (1,699 once invoked), scanned A, original, MIT.

An image-classification step for a source that has already been added to a document collection. It separates useful images such as diagrams and charts from decorative images such as covers and logos.

In plain words
What is it for?
Use it to record substantive images for later reference and remove decorative images from the collection.
Why use it?
It completes the image review without repeating the source’s text processing and keeps the collection’s image index accurate.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the grounded-forge plugin — 12 skills, 2 agents, 1 hook shipped together

Good fit Use it to record substantive images for later reference and remove decorative images from the collection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chrisgagne/grounded-forge/ingesting-images
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 chrisgagne/grounded-forge --skill ingesting-images
Clone the repo
git clone --depth 1 https://github.com/chrisgagne/grounded-forge

Made for: Claude Code.

Or install grounded-forge, the plugin that ships this one along with the rest of its 12 skills, 2 agents, 1 hook.

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 ingesting-images

README.md
[![agentmods](https://agentmods.dev/badge/skills/chrisgagne/grounded-forge/ingesting-images.svg)](https://agentmods.dev/skills/chrisgagne/grounded-forge/ingesting-images)
Your own site
<a href="https://agentmods.dev/skills/chrisgagne/grounded-forge/ingesting-images"><img src="https://agentmods.dev/badge/skills/chrisgagne/grounded-forge/ingesting-images.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,699 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.00044 $0.01699
Opus 5 $0.00022 $0.00849
Sonnet 5 $0.00009 $0.00340
Haiku 4.5 $0.00004 $0.00170

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

Security

Grade A, and why

ingesting-images 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 7d 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.

.claude/skills/ingesting-images/SKILL.md · 69 lines

How it starts

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

Ingesting Images

Visual image classification for a source whose text-axis ingestion is already complete. Produces SUBSTANTIVE entries appended to corpus.commons/{corpus}/sources/converted/IMAGE-INDEX.yaml, deletes DECORATIVE files, updates the source's Pass H verification log count.

Completes the image axis when ingesting-resources ran text-only (or image classification was abandoned mid-run from context budget).

When to use

  • The source's IMAGE-INDEX.yaml entries are stub-format or labelled PARTIAL and you want full coverage.
  • A source was ingested text-only originally and you want to add the image axis now.
  • A source's images were re-extracted (e.g., after a substantive PDF revision) and need re-classification.

When not to use

  • Full source ingestion: use ingesting-resources.
  • Searching the corpus for an existing source: use matching-references.
  • Routine reading of an existing classified source: read corpus.commons/{corpus}/sources/converted/IMAGE-INDEX.yaml directly.

Prerequisites

  • The source's deep reference exists at corpus.commons/{corpus}/references/{prefix}-{slug}-deep.md.
  • Either (a) the source PDF / EPUB exists at corpus.commons/{corpus}/sources/original/{slug}.{ext} (so images can be re-extracted), or (b) the image directory at corpus.commons/{corpus}/sources/converted/{md-slug}-images/ already contains extracted files.

Procedure

  1. Resolve scope. If the argument is a single slug, classify that source. If all, scan IMAGE-INDEX.yaml for entries whose comments include PARTIAL or Description not yet authored, and process each affected source in turn.
  2. Ensure images extracted. If {md-slug}-images/ is empty or missing, run python3 scripts/extract-images.py corpus.commons/{corpus}/sources/original/{slug}.{ext} to populate.
  3. Read existing index entries for the source from the corpus's IMAGE-INDEX.yaml to know what's already classified. Do not duplicate entries already present.
  4. Split into waves. For sources over ~100 images, group the file list into waves of 64 (8 batches × 8 files conceptually). One wave = one read-only Sonnet dispatch + one splice + one commit. This bounds context per dispatch, gives a clean recovery point if a session is interrupted, and lets the operator pause between waves without losing state.
  5. Dispatch one read-only Sonnet agent per wave. The agent gets the Read tool only: no Bash, no Edit, no Write. Brief it with: (a) the full list of file paths for this wave, (b) the SUBSTANTIVE / DECORATIVE criteria, (c) the exact YAML-line format for substantive entries, (d) the hard rule that data tables / exercise data sets / source documents are substantive (do not flag as decorative just because they lack diagrams), (e) instruction to read each file and report, never fabricate from filename. The single-agent-of-64 pattern is materially more context-efficient than fanning out 8 parallel agents of 8.
  6. Stage the wave's YAML in /tmp. Write the agent's substantive entries to /tmp/{slug}-wave{N}.yaml. This keeps the in-progress wave out of git and recoverable if validation fails.
  7. Delete decoratives file-by-file. The auto-mode classifier blocks bulk-glob rm of pre-existing files. Chain individual rm commands with && (one per file). Then verify the new disk count.
  8. Splice the staging YAML into IMAGE-INDEX.yaml. Use sed -i.bak to update the PARTIAL header (entries / decoratives deleted / unclassified remaining), then cat /tmp/{slug}-wave{N}.yaml >> IMAGE-INDEX.yaml. Validate with python3 -c "import yaml; yaml.safe_load(open(...))": fails fast on any malformed entry.
  9. Commit each wave. Convention: image-ingestion: {slug} wave {N} — N kept, M deleted [corpus-data] with a body summarising the chapter / topic coverage. Per-wave commits are the recovery point; if a later wave goes sideways, the wave-N commit is intact.
  10. On the final wave, switch PARTIAL → FINAL in the header, with the reconciliation line indexed + deleted = original-extraction-count. Update the planning log entry from PARTIAL to the consolidated final summary.
  11. Append one consolidated line per source to _planning/image-ingestion-log.md (or whichever the operator names). Per-wave entries belong in commit messages, not the log. Drift between log header and actual index entries is a known drift hazard: verify the index count with python3 -c "import yaml; d=yaml.safe_load(open(...)); print(len([e for e in d if e.get('file','').startswith('{slug}-images/')]))" before writing FINAL counts.
  12. Update Pass H at corpus.commons/{corpus}/references/_audit/_ingest_pass_H_{prefix}-{slug}_verification.md with the refreshed image-classification counts (substantive / decorative).
  13. Verify and report: total images processed, substantive count, decorative count, decorative rate, anomalies, recovery actions needed (e.g., orphaned files on disk without index entries).

Read the full file on GitHub · 69 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. 7d ago First seen · 69 lines · 44 tokens per session scan A 5a3d37c3aa3f

Subscribe to this mod's changes

ingesting-images is a skill published in the GitHub repository chrisgagne/grounded-forge (7 stars, last pushed 17d ago), licensed MIT. It adds 44 tokens to every session and 1,699 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-31.