- Home
- Skills
- Copyleftdev
- Sk1llz
- Kennedy
kennedy_skill
- Python
3
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill copyleftdev/sk1llz --skill kennedy- SKILL.md6.8 KB
Overview
This skill writes Go code in the style of Bill Kennedy, emphasizing mechanical sympathy, data-oriented design, and deep runtime understanding. It produces idiomatic, performance-aware Go suitable for performance-critical systems and for teaching core Go fundamentals. The goal is correctness and readability first, then measurable performance improvements.
How this skill works
The skill inspects code and design choices to favor value semantics, contiguous memory layouts, and cache-friendly patterns. It applies concrete recommendations: prefer slices and struct-of-arrays for hot paths, avoid unnecessary pointers, optimize struct field order, and guide escape analysis. It also generates benchmarks and profiling suggestions so optimizations are driven by measurement.
When to use it
- When writing or reviewing performance-critical Go code or hot loops
- When teaching Go fundamentals with an emphasis on runtime behavior
- When redesigning data structures for better cache and memory usage
- When diagnosing unexpected allocations, escapes, or GC pressure
- When converting pointer-heavy designs to data-oriented layouts
Best practices
- Profile before optimizing; use go test -bench and -benchmem
- Prefer value semantics for small, immutable types; use pointers for resources
- Use contiguous data (slices) over scattered pointers for hot paths
- Design struct field order to minimize padding; verify with unsafe.Sizeof
- Avoid micro-optimizing without evidence; document measured gains
- Use struct-of-arrays for high-throughput numeric loops
Example use cases
- Rewriting a particle simulation to use struct-of-arrays for cache locality
- Refactoring request handling to reduce allocations and heap escapes
- Teaching escape analysis by converting heap-escaping patterns to stack-safe code
- Creating benchmarks to compare implementations and measure allocations
- Designing a goroutine pool that avoids unbounded goroutine creation
FAQ
No. It recommends value semantics by default and instructs when pointer semantics are appropriate, with a rule to be consistent for a given type.
Will it optimize code without measurements?
No. The skill emphasizes profiling first and produces benchmarks and profiling commands to validate any optimization.