npx skillsauth add hayeah/dotfiles skills/golangInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Golang style guide.
Default project structure:
package <packageName>
cli/
cli/<packageName>/main.go
package mainUse the stdlib flag package. Do NOT pull in cobra, urfave/cli, kong, etc.
-foo-bar and --foo-bar — they're equivalent. Register flags with kebab-case names (foo-bar) and users get the --foo-bar style automatically.flag.NewFlagSet per subcommand and dispatch on os.Args[1].flag.BoolVar(&verbose, "verbose", false, "verbose output")
flag.BoolVar(&verbose, "v", false, "verbose output (shorthand)")
-abc for -a -b -c) are not supported by stdlib. Live without them.Use pelletier/go-toml/v2. Falls back to the field name when no tag is set, so structs stay clean. Use pointer fields to distinguish "unset" from zero. Pair with creasty/defaults for declarative defaults.
import (
"github.com/creasty/defaults"
"github.com/pelletier/go-toml/v2"
)
type Config struct {
Host string `default:"localhost"`
Port int `default:"8080"`
Timeout *int // nil = unset
}
var cfg Config
defaults.Set(&cfg)
toml.Unmarshal(data, &cfg)
Avoid BurntSushi/toml (requires toml: tags, zero-vs-unset ambiguous) and the TOML→JSON→Unmarshal trick (loses line-number errors).
Use google/wire for compile-time dependency injection. Quick reference:
wire # generate wire_gen.go in current package
wire gen ./... # generate for all packages
wire check ./... # validate without generating
wire.NewSet(...).wire.go with //go:build wireinject.wire_gen.go to version control.See wire.md for full setup, project structure, and patterns.
Code Style:
get* — e.g. User() not GetUser().tools
Web UI development — Vite+ toolchain setup and browser-based E2E testing workflow.
tools
Tooling and style guide for TypeScript projects.
development
Capture tmux pane content and export as text, HTML, SVG, PNG, or JPG. Use when you need a screenshot or text dump of a tmux pane for sharing, feeding to AI, or archiving terminal state.
testing
Copy-edit text. Fix grammar and/or tidy text into a concise listicle.