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 commands/armanzeroeight/fastagent-plugins/optimize-imagegit clone --depth 1 https://github.com/armanzeroeight/fastagent-pluginsWhat 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.00014 | $0.01058 |
| Opus 5 | $0.00007 | $0.00529 |
| Sonnet 5 | $0.00003 | $0.00212 |
| Haiku 4.5 | $0.00001 | $0.00106 |
Grade A, and why
optimize-image 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize Image
Context
- Dockerfile location: !
find . -name "Dockerfile" -o -name "dockerfile" | head -5 - Current images: !
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" | head -10 - Docker version: !
docker --version
Your Task
Analyze the Dockerfile and provide comprehensive optimization recommendations.
Arguments
$1(optional): Path to Dockerfile (default:./Dockerfile)
Steps
-
Read and analyze Dockerfile:
cat Dockerfile -
Identify optimization opportunities:
Base Image:
- Is alpine or slim variant used?
- Is specific tag used (not
latest)? - Can distroless be used?
Multi-Stage Build:
- Is multi-stage build used?
- Are build dependencies separated from runtime?
- Can final image be smaller?
Layer Optimization:
- Are dependencies copied before code?
- Are RUN commands combined appropriately?
- Is .dockerignore present?
Security:
- Is non-root user used?
- Are secrets avoided in image?
- Are unnecessary packages removed?
Caching:
- Are layers ordered by change frequency?
- Are package manager caches cleared?
- Can build cache mounts be used?
-
Calculate current image size:
docker build -t temp-analysis . docker images temp-analysis --format "{{.Size}}" docker rmi temp-analysis -
Generate optimized Dockerfile:
Create
Dockerfile.optimizedwith improvements:- Minimal base image
- Multi-stage build (if applicable)
- Optimized layer order
- Security hardening
- Cache optimization
-
Provide comparison:
Before:
- Image size: X MB
- Layers: Y
- Security issues: Z
After (estimated):
- Image size: A MB (B% reduction)
- Layers: C
- Security improvements: D
-
Create optimization report:
# Dockerfile Optimization Report ## Current Analysis - Base image: node:18 (990MB) - Build type: Single-stage - Security: Running as root - Layers: 12 ## Recommendations ### High Priority 1. Use alpine base (node:18-alpine) - Savings: ~800MB - Impact: High 2. Implement multi-stage build - Savings: ~200MB - Impact: High 3. Run as non-root user - Security: Critical - Impact: High ### Medium Priority 4. Optimize layer caching - Build time: -50% - Impact: Medium 5. Add .dockerignore - Build time: -20% - Impact: Medium ### Low Priority 6. Combine RUN commands - Savings: ~10MB - Impact: Low ## Implementation See Dockerfile.optimized for complete implementation. ## Next Steps 1. Review Dockerfile.optimized 2. Test build: `docker build -f Dockerfile.optimized -t myapp:optimized .` 3. Compare sizes: `docker images myapp` 4. Test functionality 5. Replace Dockerfile when satisfied
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.
- yesterday First seen · 181 lines · 14 tokens per session scan A b631e5d894a4
optimize-image is a command published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 1,058 once invoked, about $0.0001 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-30.
Other commands, from other repositories
MIGRATE_DESIGN
Design doc for the migration tool PR. Author: Sol ([email protected]). Co-authored-by: wakesync.
tech-debt
Run bun run check:fix and then bunx knip and identify unused files and functions to refactor the project and simplify. Look at the deprecated features and confirm with the user to delete them. Look at the dependencies and remove the ones that are not needed based on knip results.
commit
Act as a senior software engineer to commit changes to the repository in non-interactive modes ONLY, using the following template.
aidd-churn
Rank files by hotspot score to identify prime candidates for refactoring before PR review.
doctor
Diagnose installation health. Check Node, CDP bridge, rn-fast-runner (iOS), rn-android-runner (Android), maestro-runner, simulators, Metro, CDP, injected helpers, ffmpeg, physical devices, plugin version, Vercel rules sync. Reports what's missing — does NOT modify your project.
workflow-router
Route to the appropriate spec-driven workflow command based on the user's intent.