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.
npx agentmods add rules/adobecom/da-express-milo/image-optimization-requirementsgit clone --depth 1 https://github.com/adobecom/da-express-miloWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02985 | $0.02985 |
| Opus 5 | $0.01492 | $0.01492 |
| Sonnet 5 | $0.00597 | $0.00597 |
| Haiku 4.5 | $0.00298 | $0.00298 |
Grade A, and why
image-optimization-requirements 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 3d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- image-optimization-requirements — 100% identical, 78 lines differ
How it starts
The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Image Optimization Performance Rules - Three-Phase Strategy
APPLY: EVERY QUERY - CRITICAL PERFORMANCE RULE
AEM Bandwidth Budget Management (CRITICAL)
Based on AEM's performance guidelines:
- 100kb total payload before LCP including all images, CSS, JS
- Single origin only before LCP (no CDN/external image connections)
- LCP target: 1560ms on mobile for Lighthouse 100 score
Phase E (Eager) - LCP Image Optimization (REQUIRED)
For first section hero/marquee images that are LCP candidates:
// ✅ REQUIRED for LCP candidate images (Phase E)
const optimizeLCPImage = (img, block) => {
const isFirstSection = block.closest('.section') === document.querySelector('.section');
const isFirstImage = img === block.querySelector('img');
if (isFirstSection && isFirstImage) {
// Phase E: Critical LCP optimization
img.removeAttribute('loading');
img.setAttribute('loading', 'eager');
img.setAttribute('fetchpriority', 'high');
// Calculate optimal size for bandwidth budget
const optimalWidth = getOptimalImageSize();
const aspectRatio = getImageAspectRatio(img);
img.setAttribute('width', optimalWidth);
img.setAttribute('height', Math.round(optimalWidth * aspectRatio));
// Preload only if within bandwidth budget
const estimatedSize = estimateImagePayload(img.src, optimalWidth);
if (payloadTracker.canLoadResource(estimatedSize)) {
preloadLCPImage(img.src, optimalWidth);
} else {
console.warn('LCP image exceeds bandwidth budget, consider optimization');
}
}
};
// ✅ REQUIRED - Bandwidth-aware image preloading
const preloadLCPImage = (src, width) => {
const link = document.createElement('link');
link.rel = 'preload';
link.as = 'image';
link.href = `${src}?width=${width}&format=webply&optimize=medium`;
link.fetchPriority = 'high';
document.head.appendChild(link);
};
Bandwidth Budget Calculation (REQUIRED)
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.
- 3d ago First seen · 370 lines · 2,985 tokens per session scan A f1b0e9cfc893
image-optimization-requirements is a cursor rule published in the GitHub repository adobecom/da-express-milo (6 stars, last pushed 3d ago), licensed Apache-2.0. It adds 2,985 tokens to every session, about $0.0149 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.