matdev83/golang-curated-agent-skills/golang-modernize
Claude Code and agent skill by matdev83/golang-curated-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Plan and apply evidence-based Go modernization for language, standard-library, test, and tooling changes. Use when upgrading a module toward Go 1.26, replacing deprecated APIs, adopting new library helpers, or reviewing modernization risk.
Install
npx vskill@latest install matdev83/golang-curated-agent-skills/golang-modernizeSKILL.md
The same SKILL.md was published earlier as matdev83/golang-curated-agent-skills/golang-modernize.
Modernize Go deliberately
Modernization is a compatibility change, not a style sweep. Start from the module’s declared Go version, supported platforms, public API promises, and a measured workload.
Workflow
- Read
go.mod, toolchain files, build tags, CI, and release/support policy. Confirm the installed toolchain and whether the change may alter language or standard-library semantics. - Establish focused tests, benchmarks, and compatibility checks before editing. Search callers and generated code; do not mechanically replace names across text.
- Prefer standard-library APIs whose availability matches the module’s
goline. Rungo fixor a targeted analyzer only after reviewing the diff; inspect each automated rewrite. - Migrate in coherent, reviewable groups. Keep behavior, error identity, wire output, ordering, and allocation/latency assumptions under test.
- Run
gofmt, focused tests,go vet, and package/build checks. For performance changes, compare representative benchmark distributions withbenchstat.
Useful Go 1.26-era opportunities
Check whether slices, maps, cmp, min/max, range-over-integer, any, improved iterators, testing.T.Context, testing/synctest, b.Loop, and testing artifact support simplify code in the actual target module. Confirm the exact API in the installed toolchain before using it. Do not label older features as new: httputil.ReverseProxy.Rewrite has existed since Go 1.20, and context.WithoutCancel since Go 1.21.
Use math/rand/v2 only after considering deterministic seeds, output compatibility, and the public behavior of the old generator. Use os.Root (where the module’s supported Go version permits) for directory-scoped file operations instead of inventing path-prefix security checks.
PGO and toolchain changes
PGO profiles must come from the production-like binary and representative workload. Build the exact program with the profile, compare a baseline and optimized build under the same conditions, and keep the profile with the source/build process that produced it. Do not promise a fixed percentage gain and do not produce a generic profile from an unrelated benchmark.
Treat compiler, linter, dependency, and CI upgrades as supply-chain changes: review release notes, checksums, compatibility, and reproducibility. A modernization is complete only when tests and supported-platform builds pass and any behavior change is explicitly accepted. See tooling and measurement and version notes.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/golang-modernize/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/matdev83/golang-curated-agent-skills/golang-modernize)