Go Code Review Checklist Compatibility: uses examples that require Go 1.21+. Resource Routing - - Use when formatting review output with Must Fix, Should Fix, and Nits sections. - - Run before manual review to collect gofmt, go vet, and golangci-lint results. - - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior. Review Procedure Use when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping. 1. Run and to catch mechanical issues first 2. Read the diff file-b…

\\t'/\\\\t}\"\n s=\"${s//

Go Code Review Checklist Compatibility: uses examples that require Go 1.21+. Resource Routing - - Use when formatting review output with Must Fix, Should Fix, and Nits sections. - - Run before manual review to collect gofmt, go vet, and golangci-lint results. - - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior. Review Procedure Use when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping. 1. Run and to catch mechanical issues first 2. Read the diff file-b…

\\r'/}\"\n s=\"${s//

Go Code Review Checklist Compatibility: uses examples that require Go 1.21+. Resource Routing - - Use when formatting review output with Must Fix, Should Fix, and Nits sections. - - Run before manual review to collect gofmt, go vet, and golangci-lint results. - - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior. Review Procedure Use when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping. 1. Run and to catch mechanical issues first 2. Read the diff file-b…

\\n'/\\\\n}\"\n printf '%s' \"$s\"\n}\n\nJSON_OUTPUT=false\nFORCE=false\nLIMIT=0\nTARGET=\"\"\n\nwhile [[ $# -gt 0 ]]; do\n case \"$1\" in\n -h|--help) usage; exit 0 ;;\n -v|--version) echo \"$SCRIPT_NAME v$VERSION\"; exit 0 ;;\n --json) JSON_OUTPUT=true; shift ;;\n --force) FORCE=true; shift ;;\n --limit)\n if [[ $# -lt 2 ]]; then\n echo \"error: --limit requires a number\" >&2\n exit 2\n fi\n LIMIT=\"$2\"\n shift 2\n ;;\n -*) echo \"error: unknown option: $1\" >&2; usage >&2; exit 2 ;;\n *) TARGET=\"$1\"; shift ;;\n esac\ndone\n\nTARGET=\"${TARGET:-./...}\"\n\nif ! [[ \"$LIMIT\" =~ ^[0-9]+$ ]]; then\n echo \"error: --limit must be a non-negative integer, got: $LIMIT\" >&2\n exit 2\nfi\n\nif ! command -v go &>/dev/null; then\n echo \"error: go is not installed or not in PATH\" >&2\n exit 2\nfi\n\nif ! command -v gofmt &>/dev/null; then\n echo \"error: gofmt is not installed or not in PATH\" >&2\n exit 2\nfi\n\nGOFMT_STATUS=\"pass\"\nGOFMT_FINDINGS=()\nGOFMT_DIR=\"${TARGET%%/...}\"\nGOFMT_DIR=\"${GOFMT_DIR:-.}\"\nUNFORMATTED=$(gofmt -l \"$GOFMT_DIR\" 2>&1) || true\nif [[ -n \"$UNFORMATTED\" ]]; then\n GOFMT_STATUS=\"fail\"\n while IFS= read -r f; do\n [[ -n \"$f\" ]] && GOFMT_FINDINGS+=(\"$f\")\n done \u003c\u003c\u003c \"$UNFORMATTED\"\nfi\n\nGOVET_STATUS=\"pass\"\nGOVET_OUTPUT=\"\"\nif ! GOVET_OUTPUT=$(go vet \"$TARGET\" 2>&1); then\n GOVET_STATUS=\"fail\"\nfi\n\nLINT_STATUS=\"skip\"\nLINT_OUTPUT=\"\"\nif command -v golangci-lint &>/dev/null; then\n LINT_STATUS=\"pass\"\n if ! LINT_OUTPUT=$(golangci-lint run \"$TARGET\" 2>&1); then\n LINT_STATUS=\"fail\"\n fi\nelif ! $FORCE; then\n echo \"error: golangci-lint not installed (use --force to skip)\" >&2\n exit 2\nfi\n\nFAILED=0\n[[ \"$GOFMT_STATUS\" == \"fail\" ]] && FAILED=1\n[[ \"$GOVET_STATUS\" == \"fail\" ]] && FAILED=1\n[[ \"$LINT_STATUS\" == \"fail\" ]] && FAILED=1\n\nif $JSON_OUTPUT; then\n GOFMT_TRUNCATED=false\n GOFMT_DISPLAY=(\"${GOFMT_FINDINGS[@]+\"${GOFMT_FINDINGS[@]}\"}\")\n if [[ $LIMIT -gt 0 && ${#GOFMT_DISPLAY[@]} -gt $LIMIT ]]; then\n GOFMT_DISPLAY=(\"${GOFMT_FINDINGS[@]:0:$LIMIT}\")\n GOFMT_TRUNCATED=true\n fi\n\n GOFMT_JSON=\"[\"\n first=true\n for f in \"${GOFMT_DISPLAY[@]+\"${GOFMT_DISPLAY[@]}\"}\"; do\n $first || GOFMT_JSON+=\",\"\n first=false\n GOFMT_JSON+=\"\\\"$(json_escape \"$f\")\\\"\"\n done\n GOFMT_JSON+=\"]\"\n\n GOVET_TRUNCATED=false\n GOVET_DISPLAY=\"$GOVET_OUTPUT\"\n if [[ $LIMIT -gt 0 && -n \"$GOVET_OUTPUT\" ]]; then\n GOVET_ARR=()\n while IFS= read -r line; do\n GOVET_ARR+=(\"$line\")\n done \u003c\u003c\u003c \"$GOVET_OUTPUT\"\n if [[ ${#GOVET_ARR[@]} -gt $LIMIT ]]; then\n GOVET_DISPLAY=\"\"\n for (( i=0; i\u003cLIMIT; i++ )); do\n [[ -n \"$GOVET_DISPLAY\" ]] && GOVET_DISPLAY+=

Go Code Review Checklist Compatibility: uses examples that require Go 1.21+. Resource Routing - - Use when formatting review output with Must Fix, Should Fix, and Nits sections. - - Run before manual review to collect gofmt, go vet, and golangci-lint results. - - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior. Review Procedure Use when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping. 1. Run and to catch mechanical issues first 2. Read the diff file-b…

\\n'\n GOVET_DISPLAY+=\"${GOVET_ARR[$i]}\"\n done\n GOVET_TRUNCATED=true\n fi\n fi\n GOVET_ESC=\"$(json_escape \"$GOVET_DISPLAY\")\"\n\n LINT_TRUNCATED=false\n LINT_DISPLAY=\"$LINT_OUTPUT\"\n if [[ $LIMIT -gt 0 && -n \"$LINT_OUTPUT\" ]]; then\n LINT_ARR=()\n while IFS= read -r line; do\n LINT_ARR+=(\"$line\")\n done \u003c\u003c\u003c \"$LINT_OUTPUT\"\n if [[ ${#LINT_ARR[@]} -gt $LIMIT ]]; then\n LINT_DISPLAY=\"\"\n for (( i=0; i\u003cLIMIT; i++ )); do\n [[ -n \"$LINT_DISPLAY\" ]] && LINT_DISPLAY+=

Go Code Review Checklist Compatibility: uses examples that require Go 1.21+. Resource Routing - - Use when formatting review output with Must Fix, Should Fix, and Nits sections. - - Run before manual review to collect gofmt, go vet, and golangci-lint results. - - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior. Review Procedure Use when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping. 1. Run and to catch mechanical issues first 2. Read the diff file-b…

\\n'\n LINT_DISPLAY+=\"${LINT_ARR[$i]}\"\n done\n LINT_TRUNCATED=true\n fi\n fi\n LINT_ESC=\"$(json_escape \"$LINT_DISPLAY\")\"\n\n GOFMT_TRUNC=\"\"\n $GOFMT_TRUNCATED && GOFMT_TRUNC=',\"truncated\":true'\n GOVET_TRUNC=\"\"\n $GOVET_TRUNCATED && GOVET_TRUNC=',\"truncated\":true'\n LINT_TRUNC=\"\"\n $LINT_TRUNCATED && LINT_TRUNC=',\"truncated\":true'\n\n cat \u003c\u003cEOF\n{\"gofmt\":{\"status\":\"$GOFMT_STATUS\",\"files\":$GOFMT_JSON$GOFMT_TRUNC},\"govet\":{\"status\":\"$GOVET_STATUS\",\"output\":\"$GOVET_ESC\"$GOVET_TRUNC},\"golangci_lint\":{\"status\":\"$LINT_STATUS\",\"output\":\"$LINT_ESC\"$LINT_TRUNC},\"passed\":$( [[ $FAILED -eq 0 ]] && echo true || echo false )}\nEOF\nelse\n echo \"=== gofmt ===\"\n if [[ \"$GOFMT_STATUS\" == \"fail\" ]]; then\n echo \"Unformatted files:\"\n GOFMT_COUNT=0\n for f in \"${GOFMT_FINDINGS[@]}\"; do\n GOFMT_COUNT=$((GOFMT_COUNT + 1))\n if [[ $LIMIT -gt 0 && $GOFMT_COUNT -gt $LIMIT ]]; then\n echo \" ... ($(( ${#GOFMT_FINDINGS[@]} - LIMIT )) more items truncated)\"\n break\n fi\n echo \" $f\"\n done\n else\n echo \"OK\"\n fi\n\n echo \"\"\n echo \"=== go vet ===\"\n if [[ \"$GOVET_STATUS\" == \"fail\" ]]; then\n if [[ $LIMIT -gt 0 ]]; then\n GOVET_ARR=()\n while IFS= read -r line; do\n GOVET_ARR+=(\"$line\")\n done \u003c\u003c\u003c \"$GOVET_OUTPUT\"\n for (( i=0; i\u003c${#GOVET_ARR[@]} && i\u003cLIMIT; i++ )); do\n echo \"${GOVET_ARR[$i]}\"\n done\n if [[ ${#GOVET_ARR[@]} -gt $LIMIT ]]; then\n echo \"... ($(( ${#GOVET_ARR[@]} - LIMIT )) more items truncated)\"\n fi\n else\n echo \"$GOVET_OUTPUT\"\n fi\n else\n echo \"OK\"\n fi\n\n echo \"\"\n echo \"=== golangci-lint ===\"\n if [[ \"$LINT_STATUS\" == \"skip\" ]]; then\n echo \"Skipped (not installed)\"\n elif [[ \"$LINT_STATUS\" == \"fail\" ]]; then\n if [[ $LIMIT -gt 0 ]]; then\n LINT_ARR=()\n while IFS= read -r line; do\n LINT_ARR+=(\"$line\")\n done \u003c\u003c\u003c \"$LINT_OUTPUT\"\n for (( i=0; i\u003c${#LINT_ARR[@]} && i\u003cLIMIT; i++ )); do\n echo \"${LINT_ARR[$i]}\"\n done\n if [[ ${#LINT_ARR[@]} -gt $LIMIT ]]; then\n echo \"... ($(( ${#LINT_ARR[@]} - LIMIT )) more items truncated)\"\n fi\n else\n echo \"$LINT_OUTPUT\"\n fi\n else\n echo \"OK\"\n fi\n\n echo \"\"\n if [[ $FAILED -eq 1 ]]; then\n echo \"Pre-review checks FAILED — fix issues before manual review.\"\n else\n echo \"All pre-review checks passed.\"\n fi\nfi\n\nexit $FAILED\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":7282,"content_sha256":"12835c86a493579d5ec27df664b47812345da18f383cdf2d236f0bc8f1b0f788"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Go Code Review Checklist","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Compatibility: ","type":"text"},{"text":"references/WEB-SERVER.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" uses ","type":"text"},{"text":"log/slog","type":"text","marks":[{"type":"code_inline"}]},{"text":" examples that require Go 1.21+.","type":"text"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Resource Routing","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"assets/review-template.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Use when formatting review output with Must Fix, Should Fix, and Nits sections.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"scripts/pre-review.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Run before manual review to collect gofmt, go vet, and golangci-lint results.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/WEB-SERVER.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Review Procedure","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"assets/review-template.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping.","type":"text"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"gofmt -d .","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"go vet ./...","type":"text","marks":[{"type":"code_inline"}]},{"text":" to catch mechanical issues first","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read the diff file-by-file; for each file, check the categories below in order","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Flag issues with specific line references and the rule name","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"After reviewing all files, re-read flagged items to verify they're genuine issues","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Summarize findings grouped by severity (must-fix, should-fix, nit)","type":"text"}]}]}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Validation","type":"text","marks":[{"type":"strong"}]},{"text":": 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.","type":"text"}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Formatting","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"gofmt","type":"text","marks":[{"type":"strong"}]},{"text":": Code is formatted with ","type":"text"},{"text":"gofmt","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"goimports","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-linting","type":"text","marks":[{"type":"link","attrs":{"href":"../go-linting/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Documentation","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Comment sentences","type":"text","marks":[{"type":"strong"}]},{"text":": Comments are full sentences starting with the name being described, ending with a period → ","type":"text"},{"text":"go-documentation","type":"text","marks":[{"type":"link","attrs":{"href":"../go-documentation/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Doc comments","type":"text","marks":[{"type":"strong"}]},{"text":": All exported names have doc comments; non-trivial unexported declarations too → ","type":"text"},{"text":"go-documentation","type":"text","marks":[{"type":"link","attrs":{"href":"../go-documentation/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Package comments","type":"text","marks":[{"type":"strong"}]},{"text":": Package comment appears adjacent to package clause with no blank line → ","type":"text"},{"text":"go-documentation","type":"text","marks":[{"type":"link","attrs":{"href":"../go-documentation/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Named result parameters","type":"text","marks":[{"type":"strong"}]},{"text":": Only used when they clarify meaning (e.g., multiple same-type returns), not just to enable naked returns → ","type":"text"},{"text":"go-documentation","type":"text","marks":[{"type":"link","attrs":{"href":"../go-documentation/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Error Handling","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Handle errors","type":"text","marks":[{"type":"strong"}]},{"text":": No discarded errors with ","type":"text"},{"text":"_","type":"text","marks":[{"type":"code_inline"}]},{"text":"; handle, return, or (exceptionally) panic → ","type":"text"},{"text":"go-error-handling","type":"text","marks":[{"type":"link","attrs":{"href":"../go-error-handling/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Error strings","type":"text","marks":[{"type":"strong"}]},{"text":": Lowercase, no punctuation (unless starting with proper noun/acronym) → ","type":"text"},{"text":"go-error-handling","type":"text","marks":[{"type":"link","attrs":{"href":"../go-error-handling/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"In-band errors","type":"text","marks":[{"type":"strong"}]},{"text":": No magic values (-1, \"\", nil); use multiple returns with error or ok bool → ","type":"text"},{"text":"go-error-handling","type":"text","marks":[{"type":"link","attrs":{"href":"../go-error-handling/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Indent error flow","type":"text","marks":[{"type":"strong"}]},{"text":": Handle errors first and return; keep normal path at minimal indentation → ","type":"text"},{"text":"go-error-handling","type":"text","marks":[{"type":"link","attrs":{"href":"../go-error-handling/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Naming","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"MixedCaps","type":"text","marks":[{"type":"strong"}]},{"text":": Use ","type":"text"},{"text":"MixedCaps","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"mixedCaps","type":"text","marks":[{"type":"code_inline"}]},{"text":", never underscores; unexported is ","type":"text"},{"text":"maxLength","type":"text","marks":[{"type":"code_inline"}]},{"text":" not ","type":"text"},{"text":"MAX_LENGTH","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-naming","type":"text","marks":[{"type":"link","attrs":{"href":"../go-naming/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Initialisms","type":"text","marks":[{"type":"strong"}]},{"text":": Keep consistent case: ","type":"text"},{"text":"URL","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"url","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"ID","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"id","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"HTTP","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"http","type":"text","marks":[{"type":"code_inline"}]},{"text":" (e.g., ","type":"text"},{"text":"ServeHTTP","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"xmlHTTPRequest","type":"text","marks":[{"type":"code_inline"}]},{"text":") → ","type":"text"},{"text":"go-naming","type":"text","marks":[{"type":"link","attrs":{"href":"../go-naming/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Variable names","type":"text","marks":[{"type":"strong"}]},{"text":": Short names for limited scope (","type":"text"},{"text":"i","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"r","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"c","type":"text","marks":[{"type":"code_inline"}]},{"text":"); longer names for wider scope → ","type":"text"},{"text":"go-naming","type":"text","marks":[{"type":"link","attrs":{"href":"../go-naming/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Receiver names","type":"text","marks":[{"type":"strong"}]},{"text":": One or two letter abbreviation of type (","type":"text"},{"text":"c","type":"text","marks":[{"type":"code_inline"}]},{"text":" for ","type":"text"},{"text":"Client","type":"text","marks":[{"type":"code_inline"}]},{"text":"); no ","type":"text"},{"text":"this","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"self","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"me","type":"text","marks":[{"type":"code_inline"}]},{"text":"; consistent across methods → ","type":"text"},{"text":"go-naming","type":"text","marks":[{"type":"link","attrs":{"href":"../go-naming/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Package names","type":"text","marks":[{"type":"strong"}]},{"text":": No stuttering (use ","type":"text"},{"text":"chubby.File","type":"text","marks":[{"type":"code_inline"}]},{"text":" not ","type":"text"},{"text":"chubby.ChubbyFile","type":"text","marks":[{"type":"code_inline"}]},{"text":"); avoid ","type":"text"},{"text":"util","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"common","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"misc","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-packages","type":"text","marks":[{"type":"link","attrs":{"href":"../go-packages/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Avoid built-in names","type":"text","marks":[{"type":"strong"}]},{"text":": Don't shadow ","type":"text"},{"text":"error","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"string","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"len","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"cap","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"append","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"copy","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"new","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"make","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-declarations","type":"text","marks":[{"type":"link","attrs":{"href":"../go-declarations/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Concurrency","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Goroutine lifetimes","type":"text","marks":[{"type":"strong"}]},{"text":": Clear when/whether goroutines exit; document if not obvious → ","type":"text"},{"text":"go-concurrency","type":"text","marks":[{"type":"link","attrs":{"href":"../go-concurrency/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Synchronous functions","type":"text","marks":[{"type":"strong"}]},{"text":": Prefer sync over async; let callers add concurrency if needed → ","type":"text"},{"text":"go-concurrency","type":"text","marks":[{"type":"link","attrs":{"href":"../go-concurrency/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Contexts","type":"text","marks":[{"type":"strong"}]},{"text":": First parameter; not in structs; no custom Context types; pass even if you think you don't need to → ","type":"text"},{"text":"go-context","type":"text","marks":[{"type":"link","attrs":{"href":"../go-context/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Interfaces","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Interface location","type":"text","marks":[{"type":"strong"}]},{"text":": Define in consumer package, not implementor; return concrete types from producers → ","type":"text"},{"text":"go-interfaces","type":"text","marks":[{"type":"link","attrs":{"href":"../go-interfaces/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"No premature interfaces","type":"text","marks":[{"type":"strong"}]},{"text":": Don't define before used; don't define \"for mocking\" on implementor side → ","type":"text"},{"text":"go-interfaces","type":"text","marks":[{"type":"link","attrs":{"href":"../go-interfaces/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Receiver type","type":"text","marks":[{"type":"strong"}]},{"text":": Use pointer if mutating, has sync fields, or is large; value for small immutable types; don't mix → ","type":"text"},{"text":"go-interfaces","type":"text","marks":[{"type":"link","attrs":{"href":"../go-interfaces/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Data Structures","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Empty slices","type":"text","marks":[{"type":"strong"}]},{"text":": Prefer ","type":"text"},{"text":"var t []string","type":"text","marks":[{"type":"code_inline"}]},{"text":" (nil) over ","type":"text"},{"text":"t := []string{}","type":"text","marks":[{"type":"code_inline"}]},{"text":" (non-nil zero-length) → ","type":"text"},{"text":"go-data-structures","type":"text","marks":[{"type":"link","attrs":{"href":"../go-data-structures/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Copying","type":"text","marks":[{"type":"strong"}]},{"text":": Be careful copying structs with pointer/slice fields; don't copy ","type":"text"},{"text":"*T","type":"text","marks":[{"type":"code_inline"}]},{"text":" methods' receivers by value → ","type":"text"},{"text":"go-data-structures","type":"text","marks":[{"type":"link","attrs":{"href":"../go-data-structures/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Security","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Crypto rand","type":"text","marks":[{"type":"strong"}]},{"text":": Use ","type":"text"},{"text":"crypto/rand","type":"text","marks":[{"type":"code_inline"}]},{"text":" for keys, not ","type":"text"},{"text":"math/rand","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-defensive","type":"text","marks":[{"type":"link","attrs":{"href":"../go-defensive/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Don't panic","type":"text","marks":[{"type":"strong"}]},{"text":": Use error returns for normal error handling; panic only for truly exceptional cases → ","type":"text"},{"text":"go-defensive","type":"text","marks":[{"type":"link","attrs":{"href":"../go-defensive/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Declarations and Initialization","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Group similar","type":"text","marks":[{"type":"strong"}]},{"text":": Related ","type":"text"},{"text":"var","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"const","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"type","type":"text","marks":[{"type":"code_inline"}]},{"text":" in parenthesized blocks; separate unrelated → ","type":"text"},{"text":"go-declarations","type":"text","marks":[{"type":"link","attrs":{"href":"../go-declarations/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"var vs :=","type":"text","marks":[{"type":"strong"}]},{"text":": Use ","type":"text"},{"text":"var","type":"text","marks":[{"type":"code_inline"}]},{"text":" for intentional zero values; ","type":"text"},{"text":":=","type":"text","marks":[{"type":"code_inline"}]},{"text":" for explicit assignments → ","type":"text"},{"text":"go-declarations","type":"text","marks":[{"type":"link","attrs":{"href":"../go-declarations/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Reduce scope","type":"text","marks":[{"type":"strong"}]},{"text":": Move declarations close to usage; use if-init to limit variable scope → ","type":"text"},{"text":"go-declarations","type":"text","marks":[{"type":"link","attrs":{"href":"../go-declarations/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Struct init","type":"text","marks":[{"type":"strong"}]},{"text":": Always use field names; omit zero fields; ","type":"text"},{"text":"var","type":"text","marks":[{"type":"code_inline"}]},{"text":" for zero structs → ","type":"text"},{"text":"go-declarations","type":"text","marks":[{"type":"link","attrs":{"href":"../go-declarations/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Use ","type":"text","marks":[{"type":"strong"}]},{"text":"any","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":": Prefer ","type":"text"},{"text":"any","type":"text","marks":[{"type":"code_inline"}]},{"text":" over ","type":"text"},{"text":"interface{}","type":"text","marks":[{"type":"code_inline"}]},{"text":" in new code → ","type":"text"},{"text":"go-declarations","type":"text","marks":[{"type":"link","attrs":{"href":"../go-declarations/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Functions","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"File ordering","type":"text","marks":[{"type":"strong"}]},{"text":": Types → constructors → exported methods → unexported → utilities → ","type":"text"},{"text":"go-functions","type":"text","marks":[{"type":"link","attrs":{"href":"../go-functions/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Signature formatting","type":"text","marks":[{"type":"strong"}]},{"text":": All args on own lines with trailing comma when wrapping → ","type":"text"},{"text":"go-functions","type":"text","marks":[{"type":"link","attrs":{"href":"../go-functions/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Naked parameters","type":"text","marks":[{"type":"strong"}]},{"text":": Add ","type":"text"},{"text":"/* name */","type":"text","marks":[{"type":"code_inline"}]},{"text":" comments for ambiguous bool/int args, or use custom types → ","type":"text"},{"text":"go-functions","type":"text","marks":[{"type":"link","attrs":{"href":"../go-functions/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Printf naming","type":"text","marks":[{"type":"strong"}]},{"text":": Functions accepting format strings end in ","type":"text"},{"text":"f","type":"text","marks":[{"type":"code_inline"}]},{"text":" for ","type":"text"},{"text":"go vet","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-functions","type":"text","marks":[{"type":"link","attrs":{"href":"../go-functions/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Style","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Line length","type":"text","marks":[{"type":"strong"}]},{"text":": No rigid limit, but avoid uncomfortably long lines; break by semantics, not arbitrary length → ","type":"text"},{"text":"go-style-core","type":"text","marks":[{"type":"link","attrs":{"href":"../go-style-core/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Naked returns","type":"text","marks":[{"type":"strong"}]},{"text":": Only in short functions; explicit returns in medium/large functions → ","type":"text"},{"text":"go-style-core","type":"text","marks":[{"type":"link","attrs":{"href":"../go-style-core/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Pass values","type":"text","marks":[{"type":"strong"}]},{"text":": Don't use pointers just to save bytes; pass ","type":"text"},{"text":"string","type":"text","marks":[{"type":"code_inline"}]},{"text":" not ","type":"text"},{"text":"*string","type":"text","marks":[{"type":"code_inline"}]},{"text":" for small fixed-size types → ","type":"text"},{"text":"go-performance","type":"text","marks":[{"type":"link","attrs":{"href":"../go-performance/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"String concatenation","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"+","type":"text","marks":[{"type":"code_inline"}]},{"text":" for simple; ","type":"text"},{"text":"fmt.Sprintf","type":"text","marks":[{"type":"code_inline"}]},{"text":" for formatting; ","type":"text"},{"text":"strings.Builder","type":"text","marks":[{"type":"code_inline"}]},{"text":" for loops → ","type":"text"},{"text":"go-performance","type":"text","marks":[{"type":"link","attrs":{"href":"../go-performance/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Logging","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Use slog","type":"text","marks":[{"type":"strong"}]},{"text":": New code uses ","type":"text"},{"text":"log/slog","type":"text","marks":[{"type":"code_inline"}]},{"text":", not ","type":"text"},{"text":"log","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"fmt.Println","type":"text","marks":[{"type":"code_inline"}]},{"text":" for operational logging → ","type":"text"},{"text":"go-logging","type":"text","marks":[{"type":"link","attrs":{"href":"../go-logging/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Structured fields","type":"text","marks":[{"type":"strong"}]},{"text":": Log messages use static strings with key-value attributes, not fmt.Sprintf → ","type":"text"},{"text":"go-logging","type":"text","marks":[{"type":"link","attrs":{"href":"../go-logging/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Appropriate levels","type":"text","marks":[{"type":"strong"}]},{"text":": Debug for developer tracing, Info for notable events, Warn for recoverable issues, Error for failures → ","type":"text"},{"text":"go-logging","type":"text","marks":[{"type":"link","attrs":{"href":"../go-logging/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"No secrets in logs","type":"text","marks":[{"type":"strong"}]},{"text":": PII, credentials, and tokens are never logged → ","type":"text"},{"text":"go-logging","type":"text","marks":[{"type":"link","attrs":{"href":"../go-logging/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Imports","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Import groups","type":"text","marks":[{"type":"strong"}]},{"text":": Standard library first, then blank line, then external packages → ","type":"text"},{"text":"go-packages","type":"text","marks":[{"type":"link","attrs":{"href":"../go-packages/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Import renaming","type":"text","marks":[{"type":"strong"}]},{"text":": Avoid unless collision; rename local/project-specific import on collision → ","type":"text"},{"text":"go-packages","type":"text","marks":[{"type":"link","attrs":{"href":"../go-packages/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Import blank","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"import _ \"pkg\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" only in main package or tests → ","type":"text"},{"text":"go-packages","type":"text","marks":[{"type":"link","attrs":{"href":"../go-packages/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Import dot","type":"text","marks":[{"type":"strong"}]},{"text":": Only for circular dependency workarounds in tests → ","type":"text"},{"text":"go-packages","type":"text","marks":[{"type":"link","attrs":{"href":"../go-packages/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Generics","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"When to use","type":"text","marks":[{"type":"strong"}]},{"text":": Only when multiple types share identical logic and interfaces don't suffice → ","type":"text"},{"text":"go-generics","type":"text","marks":[{"type":"link","attrs":{"href":"../go-generics/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Type aliases","type":"text","marks":[{"type":"strong"}]},{"text":": Use definitions for new types; aliases only for package migration → ","type":"text"},{"text":"go-generics","type":"text","marks":[{"type":"link","attrs":{"href":"../go-generics/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Testing","type":"text"}]},{"type":"checkbox_list","attrs":{"id":null},"content":[{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Examples","type":"text","marks":[{"type":"strong"}]},{"text":": Include runnable ","type":"text"},{"text":"Example","type":"text","marks":[{"type":"code_inline"}]},{"text":" functions or tests demonstrating usage → ","type":"text"},{"text":"go-documentation","type":"text","marks":[{"type":"link","attrs":{"href":"../go-documentation/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Useful test failures","type":"text","marks":[{"type":"strong"}]},{"text":": Messages include what was wrong, inputs, got, and want; order is ","type":"text"},{"text":"got != want","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"go-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../go-testing/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"TestMain","type":"text","marks":[{"type":"strong"}]},{"text":": Use only when all tests need common setup with teardown; prefer scoped helpers first → ","type":"text"},{"text":"go-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../go-testing/SKILL.md","title":null}}]}]}]},{"type":"checkbox_item","attrs":{"checked":false},"content":[{"type":"paragraph","content":[{"text":"Real transports","type":"text","marks":[{"type":"strong"}]},{"text":": Prefer ","type":"text"},{"text":"httptest.NewServer","type":"text","marks":[{"type":"code_inline"}]},{"text":" + real client over mocking HTTP → ","type":"text"},{"text":"go-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../go-testing/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Automated Checks","type":"text"}]},{"type":"paragraph","content":[{"text":"Run automated pre-review checks:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash scripts/pre-review.sh ./... # text output\nbash scripts/pre-review.sh --json ./... # structured JSON output","type":"text"}]},{"type":"paragraph","content":[{"text":"Or manually: ","type":"text"},{"text":"gofmt -l \u003cpath> && go vet ./... && golangci-lint run ./...","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"Fix any issues before proceeding to the checklist above. For linter setup and configuration, see ","type":"text"},{"text":"go-linting","type":"text","marks":[{"type":"link","attrs":{"href":"../go-linting/SKILL.md","title":null}}]},{"text":".","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Related Skills","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Style foundations","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-style-core","type":"text","marks":[{"type":"link","attrs":{"href":"../go-style-core/SKILL.md","title":null}}]},{"text":" when resolving formatting debates or applying the clarity > simplicity > concision priority","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Linting setup","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-linting","type":"text","marks":[{"type":"link","attrs":{"href":"../go-linting/SKILL.md","title":null}}]},{"text":" when configuring golangci-lint or adding automated checks to CI","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Error strategy","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-error-handling","type":"text","marks":[{"type":"link","attrs":{"href":"../go-error-handling/SKILL.md","title":null}}]},{"text":" when reviewing error wrapping, sentinel errors, or the handle-once pattern","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Naming conventions","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-naming","type":"text","marks":[{"type":"link","attrs":{"href":"../go-naming/SKILL.md","title":null}}]},{"text":" when evaluating identifier names, receiver names, or package-symbol stuttering","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Testing patterns","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../go-testing/SKILL.md","title":null}}]},{"text":" when reviewing test code for table-driven structure, failure messages, or helper usage","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Concurrency safety","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-concurrency","type":"text","marks":[{"type":"link","attrs":{"href":"../go-concurrency/SKILL.md","title":null}}]},{"text":" when reviewing goroutine lifetimes, channel usage, or mutex placement","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Logging practices","type":"text","marks":[{"type":"strong"}]},{"text":": See ","type":"text"},{"text":"go-logging","type":"text","marks":[{"type":"link","attrs":{"href":"../go-logging/SKILL.md","title":null}}]},{"text":" when reviewing log usage, structured logging, or slog configuration","type":"text"}]}]}]}]},"metadata":{"date":"2026-11-02","name":"go-code-review","author":"@skillopedia","source":{"stars":188,"repo_name":"golang-skills","origin_url":"https://github.com/cxuu/golang-skills/blob/HEAD/skills/go-code-review/SKILL.md","repo_owner":"cxuu","body_sha256":"8db6e39ad0575acc28993f853c42f697437c2b99108d852e9d6bc6ba0f902b76","cluster_key":"b18d4dbacab3f6f4a31a1ae1d33fdac7379dea82fab4d46d62aeeed103ac22ec","clean_bundle":{"format":"clean-skill-bundle-v1","source":"cxuu/golang-skills/skills/go-code-review/SKILL.md","text_bytes":11910,"source_commit":"91f0c2eef559a3168f9d3c38f5f99936d472b508","skills_sh_rank":9346,"attachment_count":3,"text_attachments":3,"attachment_storage":"skill_attachments","binary_attachments":0},"cluster_size":1,"skill_md_path":"skills/go-code-review/SKILL.md","import_metadata":{"date":"2026-11-02","author":"@skillopedia","version":"v1","category":"software-engineering","category_label":"Engineering"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"software-engineering","import_tag":"skills-sh-top20k-2026-11","description":"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.","allowed-tools":"Bash(bash:*)"}},"renderedAt":1793666406446}

Go Code Review Checklist Compatibility: uses examples that require Go 1.21+. Resource Routing - - Use when formatting review output with Must Fix, Should Fix, and Nits sections. - - Run before manual review to collect gofmt, go vet, and golangci-lint results. - - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior. Review Procedure Use when formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping. 1. Run and to catch mechanical issues first 2. Read the diff file-b…