Skip to content

feat(go): improve go-code-review skill#65

Draft
anderskev wants to merge 1 commit intomainfrom
feat/improve-go-code-review
Draft

feat(go): improve go-code-review skill#65
anderskev wants to merge 1 commit intomainfrom
feat/improve-go-code-review

Conversation

@anderskev
Copy link
Member

Summary

  • Rewrites the go-code-review SKILL.md with a proper review workflow (check go.mod version → scan full functions → verify), [FILE:LINE] output format, and Go-specific severity calibration
  • Adds modern Go coverage: errors.Join (1.20+), slog (1.21+), sync.OnceValue/sync.OnceFunc (1.21+), errgroup, generics anti-patterns, range-over-int (1.22+)
  • Adds version-aware context-sensitive rules (loop variable capture is pre-1.22 only, slog suggestion requires 1.21+)
  • Improves all 4 reference files with reasoning-based explanations over rigid rules

Test plan

  • Ran 3 eval prompts (bug-heavy handler, well-written worker, version-aware review) with and without skill
  • With-skill scored 18/18 (100%) vs without-skill 15/18 (83%) on assertions
  • Key skill wins: slog awareness (baseline never suggests it), false positive resistance (2 vs 7 issues on clean code), consistent output format
  • Skill costs ~69% more tokens due to reference loading but quality improvement justifies it

🤖 Generated with Claude Code

…severity

- Add review workflow (check go.mod version first, scan, verify)
- Add [FILE:LINE] output format and Go-specific severity calibration
- Add version-aware rules (loop capture pre-1.22, slog 1.21+)
- Add errors.Join, sync.OnceValue/OnceFunc, errgroup patterns
- Add generics section with type constraints and anti-patterns
- Add slog structured logging guidance
- Add range-over-int (Go 1.22+)
- Improve explanations with reasoning over rigid rules
- Expand valid patterns to reduce false positives

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant