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/secondsky/claude-skills/do-optimizegit clone --depth 1 https://github.com/secondsky/claude-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/secondsky/claude-skills/do-optimize)<a href="https://agentmods.dev/commands/secondsky/claude-skills/do-optimize"><img src="https://agentmods.dev/badge/commands/secondsky/claude-skills/do-optimize.svg" alt="Measured on agentmods" height="20"></a>What 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.00032 | $0.04137 |
| Opus 5 | $0.00016 | $0.02069 |
| Sonnet 5 | $0.00006 | $0.00827 |
| Haiku 4.5 | $0.00003 | $0.00414 |
Grade A, and why
cloudflare-durable-objects: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 — 647 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/do-optimize - Performance Optimization Assistant
Interactive assistant that analyzes your Durable Objects code and provides targeted performance optimizations.
Overview
This command:
- Analyzes existing DO implementations
- Identifies performance bottlenecks
- Provides specific optimization recommendations
- Generates optimized code
- Measures potential performance improvements
Step 1: Identify Optimization Area
Use AskUserQuestion tool:
Question 1: Performance Issue
header: "Issue Type" question: "What performance issue are you experiencing?" multiSelect: false options:
- label: "Slow cold starts / initialization" description: "DO takes too long to start up or respond to first request"
- label: "Slow query performance" description: "SQL queries are taking too long"
- label: "High memory usage" description: "DO is using too much memory or hitting limits"
- label: "WebSocket latency" description: "WebSocket messages have high latency or dropped connections"
- label: "Alarm execution issues" description: "Alarms are slow, failing, or not executing"
- label: "General optimization" description: "Want to improve overall performance"
Question 2: Current Scale
header: "Scale" question: "What is your current scale?" multiSelect: false options:
- label: "Development / Testing" description: "Local testing, small dataset"
- label: "Small production (<1K DOs)" description: "Early production, limited users"
- label: "Medium production (1K-100K DOs)" description: "Growing user base"
- label: "Large production (>100K DOs)" description: "High traffic, many active instances"
Question 3: Optimization Priority
header: "Priority" question: "What is most important to optimize?" multiSelect: false options:
- label: "Latency (response time)" description: "Reduce time to first response"
- label: "Throughput (requests/second)" description: "Handle more concurrent requests"
- label: "Cost (compute time)" description: "Reduce CPU time and costs"
- label: "Memory efficiency" description: "Reduce memory usage"
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 · 647 lines · 32 tokens per session scan A fa78830504fc
cloudflare-durable-objects:optimize is a command published in the GitHub repository secondsky/claude-skills (214 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 4,137 once invoked, about $0.0002 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-09-03.
Other commands, from other repositories
correlate
Find related failures through pattern matching.
diff
Compare two command outputs with intelligent diff.
open
Open/retrieve an offloaded output by ID or shortcut.
search
Search through offloaded outputs with hard caps.
stats
Show FewWord session statistics with rich output and token savings.
timeline
Visual timeline of command outputs in current session.