declaration-practices
CommunityWrite cleaner, more idiomatic Go declarations.
Authormeriley
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you write more readable, maintainable, and error-free Go code by enforcing best practices for variable and constant declarations, import organization, and zero-value usage.
Core Features & Use Cases
- Import Organization: Ensures imports are grouped logically (standard, external, internal) and aliases are used judiciously.
- Declaration Styles: Guides on when to use short (
:=) vs. explicit (var) declarations, and how to group related constants and variables. - Zero Value Awareness: Explains Go's zero values and how to leverage them effectively, including the distinction between nil and empty slices.
- Scope Minimization: Promotes declaring variables close to their point of use to reduce cognitive load and potential errors.
Quick Start
Review the current Go file for declaration and import best practices.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: declaration-practices Download link: https://github.com/meriley/claude-code-skills/archive/main.zip#declaration-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.