Use when a worksheet or grader run needs a visible crop of a source figure, diagram, graph, table, photo, or diagram-option block.
Use this skill to turn source-page visuals into worksheet-visible image assets.
For handwritten grading, use this skill for source visuals that the learner must see to understand the task, their answer, or the feedback. A linked original/source PDF instruction is a fallback, not the default, and should be used only when the source pixels are unavailable or a clean crop is not feasible after a real bounded attempt. A failed pdf_to_images call without required pageNumbers is not a bounded attempt; retry it with explicit page numbers.
grader/output/assets/... for grader runs,sheet/output/assets/... for draft-sheet runs.For each target visual, keep an explicit image-cutting-step N/8 note in the crop plan or crop-validation draft. Do not run more than 8 image-cutting steps for one target visual without calling and switching strategy or reporting the blocker.
review_run_progress_with_fresh_agentextract_pdf_images is available, run it once for the relevant page range before manual cropping. Use it as a deterministic first pass for embedded raster figures, maps, charts, photos, or apparatus images; ignore tiny repeated strips/noise and validate useful outputs before linking them.pdf_to_images output and crop from that page image, not from thumbnails or screenshots. Use this path for vector diagrams, layout-sensitive figures, or extracted images that lack needed labels/context. For long PDFs, pass 1-based pageNumbers from the extracted reference headings or grep context, for example pageNumbers: [2, 3, 11]; if the tool reports missing pageNumbers, immediately retry with the chosen pages.draw_grid_overlay and call propose_crop_bbox_with_fresh_agent instead of repeatedly inspecting page images in the main agent context.view_image during grader-publish runs; it is intentionally unavailable there. Use extraction tools plus fresh-context visual helpers for proposals and validation so image inspection does not pollute the grading context.crop_image using bboxPixels.validate_crop_with_fresh_agent when available, or another fresh-context visual helper in local/debug flows.trim_image only after the crop is complete and only to remove safe whitespace.validate_crop_with_fresh_agent when that tool is available. Always pass:
expectedContent: the exact visual content that must be visible in the crop,duplicatedTextToExclude: prompt/caption/table text that is rendered separately and should not be required inside the crop; use none only when no surrounding duplicated text needs exclusion..png outputs from pad_image or trim_image.Use a fresh-context visual helper whenever a crop is high-risk: ambiguous figure bounds, dense labels/axes/table cells, option-diagram MCQs, or any target that is still uncertain after one manual correction pass.
The helper may propose or review candidate rectangles, but the published asset must still be one validated rectangular crop.
Use review_run_progress_with_fresh_agent whenever the crop loop has repeated the same failure, hit an image-edit budget warning, or reached the 8-step cap for one target visual. The reviewer is for process diagnosis only; it must not grade, assemble worksheet JSON, or replace final crop validation.
Figure N / Table N captions that the worksheet already renders as text.left and top are inclusive; right and bottom are exclusive.{
"cropBase": "badCrop",
"bbox": { "left": 0, "top": 0, "right": 100, "bottom": 100 },
"reasoning": "brief edge-by-edge explanation",
"risks": []
}
validate_crop_with_fresh_agent reports clipped content, missing labels, wrong association, broad full-page fallback, recognizable neighbouring content outside the target visual, or any medium/high severity issue, fix the crop and validate again before publishing.crop_image or trim_image changes a linked worksheet asset after crop validation, validation is stale. Rerun the fresh validation and rewrite the crop-validation record.pad_image only after a crop has already passed fresh validation and only to add a clean white border. Never use padding to fix missing content, clipping, unrelated text, or a failed crop review.pad_image, trim_image, or a recrop creates a new output file, the worksheet image link, crop-validation record, and any subsequent fresh validation call must all use that exact new path. Do not change .png paths to .jpg, do not invent parallel filenames, and do not link a file path that was not produced by a tool.propose_crop_bbox_with_fresh_agent or extract_pdf_diagrams before spending more turns on hand-tuned crop boxes.propose_crop_bbox_with_fresh_agent, extract_pdf_images, or extract_pdf_diagrams for the source page and target label instead of continuing hand-tuned crop boxes. If you already tried the relevant alternatives, call review_run_progress_with_fresh_agent.review_run_progress_with_fresh_agent. Use existing validated crops only; do not publish failed, noisy, or full-page fallback crops.crop_image to create a local PNG overview or relevant crop under the output assets directory, then inspect that generated image through a fresh-context visual helper before publishing.Figure N reference, or saying the figure was not needed because the student left it blank. Source-faithful sheets must preserve the source visual reference for every source subquestion where the original paper uses that visual to answer the question.Use Figure N in the linked original PDF. Do not exclude a source question, remove its marks, or call it ungradable solely because a public PDF omits a figure/map/photo or because an insert is missing.group.prompt when the visual is before the first subpart or shared by all subparts,Figure N caption text adjacent to the Figure N crop, and Table N caption text adjacent to the Table N table.Figure N above / Table N above.[](grader/output/assets/q1-figure-1.jpg) or [](grader/output/assets/q1-figure-1-border.png) when the final tool output is PNG.Figure N that matters must have a nearby image link unless the validation record explains why embedding was impossible, and every visible Table N that is text/numeric must have a nearby Markdown table.For each final linked crop, write a validation note with:
fresh-context subagent checked: yes,pass/fail: pass|fail,Use the reviewMarkdown returned by validate_crop_with_fresh_agent as the basis for these records. If the reviewer returned pass/fail: pass, keep that as the authoritative result and record small duplicated caption/prompt fragments or harmless extra context as minor notes, not unresolved failures. Do not publish linked crop assets without this per-image validation record.