AGENTS.md@packages/omo-opencode/src/hooks/read-image-resizerA
AGENTS.md@packages/omo-opencode/src/hooks/read-image-resizer from code-yeongyu/oh-my-openagent is an AGENTS.md file: the standing instructions coding agents read in that repo.
mdr add code-yeongyu/oh-my-openagent/packages/omo-opencode/src/hooks/read-image-resizer/AGENTS.md@git:20260817.3dd8826Pins git:20260817.3dd8826 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- AGENTS.md file
- Repository
- code-yeongyu/oh-my-openagent
- Path
packages/omo-opencode/src/hooks/read-image-resizer/AGENTS.md- Versions recorded
- 1
- Latest version
- git:20260817.3dd8826, committed Aug 17, 2026
- Size
- 3,350 bytes
- Repository stars
- 70,763
- License
- a license file GitHub does not identify
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# src/hooks/read-image-resizer/ (Read Image Resizer) **Generated:** 2026-08-17 ## OVERVIEW Tool Guard tier hook. Runs after `read` when the session model is `anthropic` and the output carries image attachments. Downscales images that exceed Anthropic's long-edge limit, removes ones it can't resize, and appends a `[Image Resize Info]` / `[Image Info]` appendix with dimensions plus token estimates. ## STRUCTURE | File | Purpose | |------|---------| | `hook.ts` | `createReadImageResizerHook()`: filters `read` outputs, extracts image attachments, drives resize per attachment, mutates `attachment.url` in place, appends the info appendix | | `image-resizer.ts` | `calculateTargetDimensions` (long-edge cap) + `resizeImage` via dynamically imported `sharp`; quality step-down 80/60/40 for jpeg/webp over the 5MB cap; falls back to pure JS on missing sharp | | `image-dimensions.ts` | Signature-based width/height parsing from the first 32KB of base64 (PNG IHDR, GIF8 header, JPEG SOF scan, WebP VP8/VP8L/VP8X) | | `png-fallback-resizer.ts` | Pure-JS PNG resize when sharp is unavailable: decode → nearest-neighbor → re-encode. PNG only, 8-bit depth only | …
Read the whole file at its exact version.
How to install
mdr add code-yeongyu/oh-my-openagent/packages/omo-opencode/src/hooks/read-image-resizer/AGENTS.md@sha256:d674baf79a576e82The line at the top of this page pins the label git:20260817.3dd8826, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_nhtjs7hblnffb6xa)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Aug 17, 2026.
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (3350 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
code-yeongyu/oh-my-openagent · 70,763 stars · license a license file GitHub does not identify · pushed 2026-11-07 · branch dev
API
GET https://markdownregistry.com/api/v1/artifacts/art_nhtjs7hblnffb6xa GET https://markdownregistry.com/api/v1/resolve?ref=code-yeongyu/oh-my-openagent/packages/omo-opencode/src/hooks/read-image-resizer/AGENTS.md GET https://markdownregistry.com/api/v1/blob/d674baf79a576e824e74f2f43f8dabd5078c31c6f5f1501dcdf9ccde7b20c866
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.