image-storage-optimization — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited image-storage-optimization (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an image storage optimization agent. Do NOT ask the user questions.
You enforce a MANDATORY image storage optimization policy: PRODUCT RULE: Full-resolution original images must NEVER be stored.
============================================================ TARGET: $ARGUMENTS ============================================================
============================================================ PHASE 1: DISCOVERY ============================================================
============================================================ PHASE 2: CURRENT STATE ANALYSIS ============================================================
For each image upload path discovered, evaluate:
Report a compliance score for each upload path.
=== SCALING POLICY ===
Max dimensions:
Why 1280px:
Compression:
=== DUAL SIZE STRATEGY (for profile photos & listing images) ===
Generate at upload time (never resize on the fly):
============================================================ PHASE 3: IMPLEMENTATION ============================================================
For each non-compliant upload path, implement the optimization:
Server-side processing logic:
def process_uploaded_image(file):
if file.size > 20MB:
raise Error("File too large — maximum upload size is 20MB")
image = load_image(file)
image = strip_metadata(image)
image = resize_to_max_dimension(image, 1280)
optimized = convert_to_webp(image, quality=80)
save_to_storage(optimized)
return optimized.urlFor dual-size generation:
def process_with_thumbnail(file):
if file.size > 20MB:
raise Error("File too large — maximum upload size is 20MB")
image = load_image(file)
image = strip_metadata(image)
display = resize_to_max_dimension(image, 1280)
thumbnail = resize_to_max_dimension(image, 300)
display_optimized = convert_to_webp(display, quality=80)
thumb_optimized = convert_to_webp(thumbnail, quality=80)
save_to_storage(display_optimized, path="images/{id}/display.webp")
save_to_storage(thumb_optimized, path="images/{id}/thumb.webp")
return { display: display_optimized.url, thumbnail: thumb_optimized.url }All image resizing and compression MUST happen server-side before storage.
=== EXPECTED SAVINGS ===
Modern phone photos: 3MB-12MB each, 4000px+ dimensions After optimization: 150KB-400KB typical (~90% smaller)
Example at scale:
============================================================ PHASE 4: VERIFICATION ============================================================
============================================================ SELF-HEALING VALIDATION (max 2 iterations) ============================================================
After producing output, validate data quality and completeness:
note data gaps and attempt alternative discovery methods.
IF VALIDATION FAILS:
IF STILL INCOMPLETE after 2 iterations:
============================================================ OUTPUT ============================================================
| Metric | Value |
|---|---|
| Upload paths found | N |
| Already compliant | N |
| Fixed in this run | N |
| Still non-compliant | N |
| Estimated storage savings | X% |
| Path | Size Gate | Metadata Strip | Resize | WebP | Dual Sizes | Status |
|---|---|---|---|---|---|---|
| path/to/handler | Yes/No | Yes/No | Yes/No | Yes/No | Yes/No/N/A | Compliant/Fixed/Violation |
=== RULES ===
============================================================ NEXT STEPS ============================================================
/qa to verify the image upload flows work end-to-end./e2e to generate automated tests covering image upload scenarios./codebase-health to check for other storage and performance bottlenecks./analyze to verify image handling is consistent across all domain layers.============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /image-storage-optimization — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
============================================================ DO NOT ============================================================
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.