optimize

optimize is an agent for Claude Code from ysicing/code-pilot. It costs 22 tokens per session (567 once invoked), scanned A, original, Apache-2.0.

A coordinator for improving application performance by measuring bottlenecks, reviewing algorithms, managing memory and input/output, and considering how the system behaves as usage grows. It produces a measured optimization plan and ways to verify the results.

In plain words
What is it for?
Use it to investigate slow code, high memory use, excessive resource consumption, inefficient algorithms, caching or batching opportunities, and scaling or concurrent-processing needs.
Why use it?
It gives performance work a baseline and measurable targets, helping avoid changes that merely seem faster or that damage features, maintainability, or behavior under heavier load.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the TodoWrite tool.

Part of the code-pilot plugin — 1 skill, 10 commands, 5 agents shipped together

Good fit Use it to investigate slow code, high memory use, excessive resource consumption, inefficient algorithms, caching or batching opportunities, and scaling or concurrent-processing needs.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ysicing/code-pilot/optimize
Install

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.

Clone the repo
git clone --depth 1 https://github.com/ysicing/code-pilot

Made for: Claude Code.

Or install code-pilot, the plugin that ships this one along with the rest of its 1 skill, 10 commands, 5 agents.

Wrote 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.

agentmods badge for optimize

README.md
[![agentmods](https://agentmods.dev/badge/agents/ysicing/code-pilot/optimize/github.svg)](https://agentmods.dev/agents/ysicing/code-pilot/optimize)
Your own site
<a href="https://agentmods.dev/agents/ysicing/code-pilot/optimize"><img src="https://agentmods.dev/badge/agents/ysicing/code-pilot/optimize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for optimize

Your own site · 80×15
<a href="https://agentmods.dev/agents/ysicing/code-pilot/optimize"><img src="https://agentmods.dev/badge/agents/ysicing/code-pilot/optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 567 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00567
Opus 5.5 $0.00009 $0.00227
Sonnet 5.5 $0.00004 $0.00113
Haiku 4.5 $0.00002 $0.00057

Measured 3mo ago against content hash 2e36fec6edba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo ago.

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.

agents/optimize.md · 53 lines

What it actually says

性能优化协调器

您是性能优化协调器,领导四位优化专家系统性地改善应用程序性能。

您的角色

您是性能优化协调器,领导四位优化专家:

  1. 性能分析师 – 通过系统性测量识别瓶颈
  2. 算法工程师 – 优化计算复杂性和数据结构
  3. 资源管理器 – 优化内存、I/O和系统资源使用
  4. 可扩展性架构师 – 确保解决方案在负载增加时正常工作

流程

  1. 性能基线: 建立当前指标并识别关键路径
  2. 优化分析:
    • 性能分析师: 测量执行时间、内存使用和资源消耗
    • 算法工程师: 分析时间/空间复杂性和算法改进
    • 资源管理器: 优化缓存、批处理和资源分配
    • 可扩展性架构师: 为水平扩展和并发处理设计
  3. 解决方案设计: 创建具有可测量目标的优化策略
  4. 影响验证: 验证改进不会损害功能或可维护性
  5. 执行"UltraThink"反思阶段,结合所有洞察形成连贯的解决方案

输出格式

  1. 性能分析 – 当前瓶颈及其量化影响
  2. 优化策略 – 包含技术实现的系统性方法
  3. 实现计划 – 带有性能影响估计的代码更改
  4. 测量框架 – 基准测试和监控设置
  5. 后续行动 – 持续优化和监控要求

关键约束

  • 必须在优化前建立基线性能指标
  • 必须量化每个建议更改的性能影响
  • 必须确保优化不破坏现有功能
  • 必须提供可测量的性能目标和验证方法
  • 必须考虑可扩展性和可维护性影响
  • 必须记录所有优化决策和权衡

执行"UltraThink"反思阶段,将所有洞察结合成连贯的优化解决方案。

Changes

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.

  1. 3mo ago First seen · 53 lines · 22 tokens per session scan A 2e36fec6edba

Subscribe to this mod's changes

optimize is an agent published in the GitHub repository ysicing/code-pilot (38 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 22 tokens to every session and 567 once invoked, about $0.0001 per session on Opus 5.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.

Related

optimize compared with agents from other repositories

optimize next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimizeysicing/code-pilotAgent388mo agoApache-2.0A22Claude Code
linear-issue-triagern8n-io/n8nAgent213ktodaynoneA47Claude Code
fixRune-kit/runeAgent96yesterdayMITA36Claude Code
debugRune-kit/runeAgent96yesterdayMITA35Claude Code
rescueRune-kit/runeAgent96yesterdayMITA39Claude Code
auditRune-kit/runeAgent96yesterdayMITA38Claude Code
autopsyRune-kit/runeAgent96yesterdayMITA39Claude Code