/optimize

Ask for optimization suggestions on a source file, optionally focused on performance, memory, algorithm, or readability.

/optimize <file>

General optimization suggestions.

/optimize slow.py

/optimize <file> --type=<focus>

Focused optimization.

/optimize slow.py --type=performance
  • performance · memory · algorithm · readability

Examples

/optimize core/agent/loop.py
/optimize core/agent/loop.py --type=memory
/optimize scripts/ingest.py --type=algorithm

Workflow tip

Review the suggestions carefully. To apply changes automatically, follow up with a plain-text agent task naming the file and the accepted edits - or use /refactor with a clear goal.