Borrowing it
Nothing to install: this file belongs to AI-agents-incubator/n8n-pilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AI-agents-incubator/n8n-pilot/main/.claude/commands/optimize.mdgit clone --depth 1 https://github.com/AI-agents-incubator/n8n-pilotWrote 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/ai-agents-incubator/n8n-pilot/optimize)<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/optimize"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-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.
<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/optimize"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/optimize.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00008 | $0.00846 |
| Opus 5.5 | $0.00003 | $0.00338 |
| Sonnet 5.5 | $0.00002 | $0.00169 |
| Haiku 4.5 | $0.00001 | $0.00085 |
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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Помоги оптимизировать производительность указанного кода.
Области оптимизации:
1. React Performance
Проверь:
- Нет ли лишних ре-рендеров
- Используется ли мемоизация (
useMemo,useCallback) - Правильно ли используются keys в списках
- Можно ли использовать React.memo
- Нет ли создания объектов/функций в рендере
Оптимизации:
// ❌ Плохо
function Component() {
return <Child onClick={() => {}} data={{}} />
}
// ✅ Хорошо
const EMPTY_DATA = {}
function Component() {
const handleClick = useCallback(() => {}, [])
return <Child onClick={handleClick} data={EMPTY_DATA} />
}
2. Database Queries
Проверь:
- Запрашиваются только нужные поля
- Используются индексы
- Нет N+1 проблем
- Используется pagination
- Есть ли лимиты на выборку
Оптимизации:
// ❌ Плохо
const { data } = await supabase.from('chats').select('*')
// ✅ Хорошо
const { data } = await supabase
.from('chats')
.select('id, title, created_at')
.limit(20)
.order('created_at', { ascending: false })
3. Bundle Size
Проверь:
- Используются ли dynamic imports
- Нет ли лишних зависимостей
- Оптимизированы ли изображения
- Используется ли tree shaking
Оптимизации:
// ❌ Плохо
import HeavyLibrary from 'heavy-library'
// ✅ Хорошо
const HeavyLibrary = dynamic(() => import('heavy-library'), {
loading: () => <Spinner />
})
4. Caching
Проверь:
- Используется ли React cache
- Правильно ли работает revalidation
- Используется ли SWR/React Query
- Кэшируются ли статические данные
5. Network
Проверь:
- Объединены ли похожие запросы
- Используется ли параллельная загрузка
- Есть ли prefetching
- Оптимизирован ли размер ответов
6. Images & Media
Проверь:
- Используется ли next/image
- Правильные ли размеры изображений
- Используется ли lazy loading
- Форматы оптимизированы (WebP)
Процесс оптимизации:
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.
- 2mo ago First seen · 133 lines · 8 tokens per session scan A 8b26d33b6044
optimize is a command published in the GitHub repository AI-agents-incubator/n8n-pilot (30 stars, last pushed 29d ago), licensed MIT. It adds 8 tokens to every session and 846 once invoked, about $0.0000 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-09-04.
optimize compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| optimizeAI-agents-incubator/n8n-pilot | Command | 30 | 29d ago | MIT | A | 8 | Claude Code |
| codebase-reviewHoangNguyen0403/agent-skills-standard | Command | 583 | yesterday | MIT | A | 0 | Claude Code |
| verify-bugHoangNguyen0403/agent-skills-standard | Command | 583 | yesterday | MIT | A | 0 | Claude Code |
| cyber-triageHoangNguyen0403/agent-skills-standard | Command | 583 | yesterday | MIT | A | 0 | Claude Code |
| fix-bugsaeedkolivand/ai-job-hunter-app | Command | 63 | yesterday | Apache-2.0 | A | 16 | Claude Code |
| remote-debuggeraegntic/cldcde | Command | 11 | 2d ago | MIT | A | 25 | Claude Code |
| react-buildDekaPrayoga/AurixAgent | Command | 62 | 3mo ago | none | A | 59 | Claude Code |