Skip to content

Commit f0b7184

Browse files
committed
Improve allocation skill assessment criteria
🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
1 parent d10661f commit f0b7184

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • .claude/skills/find-allocation-opportunities

.claude/skills/find-allocation-opportunities/SKILL.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ at the top of that file for exclusion rules (`Vendors/`, `Generated/`, `test/`).
7979
### Step 4: Assess and report
8080

8181
For each finding, determine:
82-
- Is this actually on a hot path? (Check callers if unclear)
82+
- **Does this actually cause a heap allocation?** Only report findings that produce heap
83+
allocations (object/array/string/delegate/boxing). Do not report redundant calls, style
84+
issues, or other inefficiencies that don't allocate — those are out of scope for this skill.
85+
- Is this on a hot path or eager initialization path? (Check callers if unclear)
86+
Hot-path allocations are highest priority. Eager initialization allocations matter too —
87+
they affect cold-start times. Prefer lazy initialization when possible. True one-shot
88+
cold-path allocations (error handling, rare config changes) are lowest priority.
8389
- Is there already an optimization in place? (e.g., the allocation might be behind an `IsEnabled` guard)
8490
- What's the concrete fix using an existing pattern from this codebase?
8591

0 commit comments

Comments
 (0)