What problem does it solve?
This Skill helps you design Go functions that are easier to read, safer to call, and more consistent across a codebase. It reduces common API mistakes like pointer-to-interface parameters, unclear boolean flags, and poorly formatted multi-line signatures.
Core Features & Use Cases
- Function ordering in files: Keeps types, constructors, exported methods, unexported helpers, and utilities in a predictable sequence.
- Signature and return-value design: Guides when to keep signatures on one line, how to wrap long parameter lists, and how to structure return values clearly.
- Call-site clarity: Recommends named options, typed parameters, and inline comments when naked booleans or integers would be confusing.
- Formatting and naming conventions: Enforces the
f suffix for printf-style helpers and encourages %q for safe string interpolation in errors and logs.
- Receiver and interface correctness: Helps avoid pointer-to-interface mistakes and choose consistent pointer or value receivers.
- Use case: A developer adding a new service method or constructor can follow the Skill to produce Go APIs that are idiomatic, vet-friendly, and easy to maintain.
Quick Start
Use the go-functions skill to review this Go file and rewrite its functions, signatures, and constructors to follow the repository’s function-design conventions.