Optimize
Scan your sessions for waste patterns and get ready-to-paste fixes.

Usage
codeburn optimize # last 30 days (default)
codeburn optimize -p today # today only
codeburn optimize -p week # last 7 days
codeburn optimize --provider claudeOr press o in the dashboard when a finding count appears. Press b to return.
What It Detects
Coaching Notes
Alongside the ranked findings, optimize surfaces up to three workflow coaching notes drawn from session history: a high rate of user corrections, an unusually long median time to first edit, and files repeatedly reworked across sessions.
Applying Fixes
Config-class findings (an environment variable, a shell config change, a mv to archive an unused item) can be applied directly instead of copy-pasted:
codeburn optimize --apply # interactively apply config-class fixes
codeburn optimize --apply --yes # apply every appliable fix without prompting
codeburn optimize --apply --dry-run # print the plan without changing anything
codeburn optimize --apply --only id1,id2 # restrict to specific finding idsEvery applied fix is backed up and journaled. Review what was applied with codeburn act list, and roll any of it back with codeburn act undo.
Health Grade
Findings are ranked by urgency (impact weighted against observed waste) and rolled up into an A to F setup health grade. Repeat runs classify each finding as new, improving, or resolved against a 48-hour recent window.
Fix Actions
Each finding includes a ready-to-paste fix:
- A
CLAUDE.mdline to add - An environment variable to set
- A
mvcommand to archive unused items - A shell config change
