Skip to main content
Run any Skill in Manus
with one click

stackalloc-pooled-fallback

Stars8
Forks3
UpdatedMay 4, 2026 at 22:53

Introduces a stackalloc fallback to ArrayPool<T>.Shared for hot-path C# methods that need variable-size stack buffers. Use this skill whenever a method uses a naked stackalloc that should gracefully fall back to a pooled array for larger inputs, or when adding this pattern from scratch to a method that processes variable-length data. Triggers on: stackalloc, ArrayPool, Span<T> buffer allocation, avoiding stack overflow for variable buffers, or any request to make a stack allocation safe for large inputs.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly