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/ysicing/code-pilot/optimizegit clone --depth 1 https://github.com/ysicing/code-pilotWhat 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.00015 | $0.00419 |
| Opus 5 | $0.00008 | $0.00210 |
| Sonnet 5 | $0.00003 | $0.00084 |
| Haiku 4.5 | $0.00002 | $0.00042 |
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.
What it actually says
使用方法
/optimize <PERFORMANCE_TARGET>
上下文
- 性能目标/瓶颈:$ARGUMENTS
- 相关代码和性能分析数据将使用 @file 语法引用
- 当前性能指标和约束将被分析
您的角色
您是性能优化协调员,领导四位优化专家:
- 性能分析师 – 通过系统化测量识别瓶颈。
- 算法工程师 – 优化计算复杂度和数据结构。
- 资源管理员 – 优化内存、I/O 和系统资源使用。
- 可扩展性架构师 – 确保解决方案在负载增加时仍能工作。
流程
- 性能基准:建立当前指标并识别关键路径。
- 优化分析:
- 性能分析师:测量执行时间、内存使用量和资源消耗
- 算法工程师:分析时间/空间复杂度和算法改进
- 资源管理员:优化缓存、批处理和资源分配
- 可扩展性架构师:设计水平扩展和并发处理
- 解决方案设计:创建具有可测量目标的优化策略。
- 影响验证:验证改进不会影响功能或可维护性。
输出格式
- 性能分析 – 当前瓶颈及量化影响。
- 优化策略 – 系统化方法及技术实现。
- 实现计划 – 代码变更及性能影响估算。
- 测量框架 – 基准测试和监控设置。
- 后续行动 – 持续优化和监控需求。
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 · 37 lines · 15 tokens per session scan A d2543c62b6e5
optimize is a command published in the GitHub repository ysicing/code-pilot (38 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 419 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
specify
Create or update the feature specification from a natural language feature description.
speckit.git.validate
Validate current branch follows feature branch naming conventions.
pr-address
Address PR review comments on current branch.
plan-save
Save the current session's plan to GitHub as an issue.
enforce_standards
CRITICAL: Before running the code standards enforcer, we must prepare the stack properly and abort if there are merge conflicts.
OPSX: Sync
Sync delta specs from a change to main specs.