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/hamr0/liteagents/optimizegit clone --depth 1 https://github.com/hamr0/liteagentsWhat 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.00008 | $0.00596 |
| Opus 5 | $0.00004 | $0.00298 |
| Sonnet 5 | $0.00002 | $0.00119 |
| Haiku 4.5 | $0.00001 | $0.00060 |
Grade A, and why
optimize 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 — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze $ARGUMENTS for performance.
Examine
- Time complexity (Big O)
- Space complexity
- I/O operations
- Database queries (N+1?)
- Unnecessary allocations
Output
Per bottleneck:
- Location (
file:line) - Cost — what's slow and by how much. Concrete ("N+1 over ~1k rows on every page load"), not vague ("could be faster").
- Optimization — specific change.
- Expected improvement — order-of-magnitude estimate.
- Trade-offs — readability / memory / consistency cost.
After the analysis — verify, then fix
Performance claims are easy to invent. Validate before acting.
Verify each bottleneck. Re-read the cited file:line in context.
Confirm the path is actually hot — look for at least one of:
- a profile / benchmark / log line showing call frequency or duration,
- the path sits on an obvious hot loop / per-request handler with real volume,
- the user provided evidence in the request.
Without one of those, the claim is uncertain — don't optimize on speculation. Mark each finding confirmed, false positive (with reason), or uncertain (needs profiling data).
Fix what's confirmed and unambiguous — minimal change, one obvious shape, no behavior change, no API change. Apply directly. After each edit, re-read the changed region and confirm it still computes the same answer (perf optimizations that quietly change semantics are the worst kind).
Stop and ask when (HITL gates — not all the time, only here):
- the bottleneck is uncertain after grounding (no profile / log and not obviously hot),
- the fix has multiple reasonable shapes (cache vs precompute vs batch vs paginate vs index) — present options with tradeoffs, not a chosen path,
- it changes public API / response shape / DB schema / caller contract,
- it trades correctness for speed (lossy approximation, weaker consistency, eventual-vs-strict) — even when "obviously" faster, or
- it touches concurrency primitives (locks, atomics, ordering) — easy to introduce races.
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 · 62 lines · 8 tokens per session scan A ec5ee88c1df2
optimize is a command published in the GitHub repository hamr0/liteagents (22 stars, last pushed 2d ago), licensed Apache-2.0. It adds 8 tokens to every session and 596 once invoked, about $0.0000 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
profile
Save, apply, and share multi-agent configuration profiles.
rollback
Restore a skill to its previous version. Requires a history entry — created automatically when you use rolecraft update or re-install over an existing skill.
rclone_convmv
Convert file and directory names in place.
init
Generate FILETREE.md from scratch. Confirms overwrite if it already exists. --self-only keeps every artifact out of git.
rclone_copy
Copy files from source to dest, skipping identical files.
uninstall
Uninstall filetree from this repo — un-wires CLAUDE.md/AGENTS.md, removes generated artifacts (confirmed per item), tears down self-only mode if enabled.