ze-find-alloc

Scan Go sources for allocation-heavy patterns in Ze wire-encoding paths and report prioritized findings.

50|2|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/ze-software/ze --skill ze-find-alloc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ze-find-alloc
Source: https://github.com/ze-software/ze/tree/main/.codex/skills/ze-find-alloc
Command: npx skills add https://github.com/ze-software/ze --skill ze-find-alloc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Ze allocator audit identifies and reduces avoidable allocations in Ze wire-encoding paths, helping improve runtime performance and GC efficiency.

Core Features & Use Cases

  • Scan production Go sources for allocation-heavy patterns such as Pack() []byte, Encode*() []byte, make([]byte, ...), inline byte-slice builders, and append-driven wire construction.
  • Classify findings by impact (hot path, attribute, NLRI, capability, API builder, plugin path, utility) and produce per-file reports with current WriteTo coverage and migration targets.
  • Generate prioritized migration targets to guide refactors and performance improvements in the Ze codebase.

Quick Start

Run an audit against the Ze repository to identify allocation-heavy encoding patterns and prioritize safe migration targets.

Frequently Asked Questions about ze-find-alloc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Go source code for memory allocations in wire-encoding paths?

Auditing Go wire-encoding paths for memory allocations involves scanning production sources for patterns like Pack() []byte, make([]byte, ...), and append-driven construction to identify and classify avoidable runtime allocations.

What causes high garbage collection overhead in Go network protocol encoding?

High garbage collection overhead in Go network protocol encoding is caused by allocation-heavy patterns such as Pack() []byte, inline byte-slice builders, and Encode*() []byte functions that generate avoidable runtime allocations on hot paths.

How do I identify and prioritize refactoring targets for Go byte-slice builders?

To identify and prioritize refactoring targets for Go byte-slice builders, classify allocation findings by impact across hot paths, attributes, and NLRI assembly, generating a prioritized report of high-value migration targets.

Can I scan NLRI assembly and utility paths for make([]byte) allocation patterns?

You can scan NLRI assembly and related utility paths for make([]byte) allocation patterns, as the audit specifically targets these encoding paths to enforce detection and produce per-file coverage gap reports.

Does the allocation audit report include WriteTo coverage gaps for Go encoding functions?

The allocation audit report includes current WriteTo coverage gaps for Go encoding functions, providing per-file findings and prioritized migration targets to guide refactors and minimize runtime allocations.