Use when reviewing Go code or checking code against community style standards. Also use proactively before submitting a Go PR or when reviewing any Go code changes, even if the user doesn't explicitly request a style review. Does not cover language-specific syntax — delegates to specialized skills.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Use when reviewing Go code or checking code against community style standards. Also use proactively before submitting a Go PR or when reviewing any Go code changes, even if the user doesn't explicitly request a style review. Does not cover language-specific syntax — delegates to specialized skills.
license
Apache-2.0
compatibility
Web server example in references uses slog (Go 1.21+)
metadata
{"sources":"Go Wiki CodeReviewComments, Uber Style Guide"}
allowed-tools
Bash(bash:*)
Go Code Review Checklist
Review Procedure
Use assets/review-template.md when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping.
Run gofmt -d . and go vet ./... to catch mechanical issues first
Read the diff file-by-file; for each file, check the categories below in order
Flag issues with specific line references and the rule name
After reviewing all files, re-read flagged items to verify they're genuine issues
Summarize findings grouped by severity (must-fix, should-fix, nit)
Validation: After completing the review, re-read the diff once more to verify every flagged issue is real. Remove any finding you cannot justify with a specific line reference.
Formatting
gofmt: Code is formatted with gofmt or goimports → go-linting
Documentation
Comment sentences: Comments are full sentences starting with the name being described, ending with a period → go-documentation
Doc comments: All exported names have doc comments; non-trivial unexported declarations too → go-documentation
Package comments: Package comment appears adjacent to package clause with no blank line → go-documentation
Named result parameters: Only used when they clarify meaning (e.g., multiple same-type returns), not just to enable naked returns → go-documentation
Error Handling
Handle errors: No discarded errors with _; handle, return, or (exceptionally) panic → go-error-handling
Error strings: Lowercase, no punctuation (unless starting with proper noun/acronym) → go-error-handling
In-band errors: No magic values (-1, "", nil); use multiple returns with error or ok bool → go-error-handling
Indent error flow: Handle errors first and return; keep normal path at minimal indentation → go-error-handling
Naming
MixedCaps: Use MixedCaps or mixedCaps, never underscores; unexported is maxLength not MAX_LENGTH → go-naming
Or manually: gofmt -l <path> && go vet ./... && golangci-lint run ./...
Fix any issues before proceeding to the checklist above. For linter setup and configuration, see go-linting.
Integrative Example
Read references/WEB-SERVER.md when building a production HTTP server and want to verify your code applies concurrency, error handling, context, documentation, and naming conventions together.
Related Skills
Style foundations: See go-style-core when resolving formatting debates or applying the clarity > simplicity > concision priority
Linting setup: See go-linting when configuring golangci-lint or adding automated checks to CI
Error strategy: See go-error-handling when reviewing error wrapping, sentinel errors, or the handle-once pattern
Naming conventions: See go-naming when evaluating identifier names, receiver names, or package-symbol stuttering
Testing patterns: See go-testing when reviewing test code for table-driven structure, failure messages, or helper usage
Concurrency safety: See go-concurrency when reviewing goroutine lifetimes, channel usage, or mutex placement
Logging practices: See go-logging when reviewing log usage, structured logging, or slog configuration