一键导入
go-modern
Apply modern Go idioms that match the repo's Go version before writing or reviewing Go code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Apply modern Go idioms that match the repo's Go version before writing or reviewing Go code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Quality bug fixes (P1/P2). Full TDD cycle, branch from master via feature/, no production deploy.
Execute ONE executable leaf workstream with TDD, guard enforcement, and ws-verdict output
Deployment orchestration. Creates PR to master (after @oneshot) or merges for release.
System design with progressive disclosure, produces workstream files
Feature planning orchestrator (discovery -> idea -> ux -> design -> workstream tree)
Emergency P0 fixes. Fast-track production deployment with minimal changes. Branch from master, immediate deploy.
| name | go-modern |
| description | Apply modern Go idioms that match the repo's Go version before writing or reviewing Go code. |
Use this skill when editing or reviewing Go in sdp.
The repo targets modern Go. Prefer standard-library idioms that are already available in the checked-in Go version.
Before changing Go code:
go.mod or sdp-plugin/go.mod.slices.SortFunc over sort.Sliceslices.Contains over manual membership loopsmaps.Copy or maps.Clone over manual copy loopsstrings.Cut over strings.SplitN(..., 2) or strings.Index plus slicingstrings.CutPrefix and strings.CutSuffix over HasPrefix or HasSuffix plus trimmin(...) and max(...) over trivial compare-and-assign blocksany over interface{} for parameters, locals, and variadics when behavior does not changeUse these freely in polish PRs when tests stay green:
Cut, CutPrefix, SortFunc, Contains, Copy, Clone)interface{} to any updatesgolintDo not batch risky modernizations into a style PR:
exec.Command with exec.CommandContextomitempty to omitzerowg.Go, atomics, cancellation semantics) unless the feature already needs theminterface{} churn across public structs or serialized payloadsWhen reviewing Go changes, ask:
After modernization changes:
go build ./..., go test ./..., and go vet ./...golangci-lint run ./... where configuredgolangci-lint run --enable-only modernize --issues-exit-code 0 ./... for audit snapshots@build - implementation workflow@review - multi-agent reviewCONTRIBUTING.md - repository code styleDEVELOPMENT.md - local verification flow