Agent Skills › authgear/authgear-server › update-go-version

update-go-version

GitHub

用于统一更新仓库中所有 Go 模块及构建文件的工具链版本。通过批量修改配置文件、刷新 Nix 哈希、执行依赖整理和构建验证,确保版本一致性并防止漂移。

.claude/skills/update-go-version/SKILL.md authgear/authgear-server

Trigger Scenarios

需要升级或降级项目中的 Go 语言版本 发现仓库中存在不一致的 Go 版本引用

Install

npx skills add authgear/authgear-server --skill update-go-version -g -y
More Options

Non-standard path

npx skills add https://github.com/authgear/authgear-server/tree/main/.claude/skills/update-go-version -g -y

Use without installing

npx skills use authgear/authgear-server@update-go-version

指定 Agent (Claude Code)

npx skills add authgear/authgear-server --skill update-go-version -a claude-code -g -y

安装 repo 全部 skill

npx skills add authgear/authgear-server --all -g -y

预览 repo 内 skill

npx skills add authgear/authgear-server --list

SKILL.md

Frontmatter
{
    "name": "update-go-version",
    "description": "Update the Go toolchain version across the repo.",
    "argument-hint": "<new Go version>"
}

Use this skill when the Go version changes.

Files to update

  • flake.nix
  • .tool-versions
  • go.mod
  • custombuild/go.mod
  • e2e/go.mod
  • k6/go.mod
  • packagetracker/go.mod.tpl
  • custombuild/cmd/authgearx/Dockerfile
  • custombuild/cmd/portalx/Dockerfile
  • cmd/portal/Dockerfile
  • cmd/authgear/Dockerfile
  • once/partial.dockerfile

Workflow

  1. Update the version in every file above.
  2. Use nix store prefetch-file to refresh the hash in flake.nix.
  3. Run make go-mod-tidy.
  4. Run make once/Dockerfile.
  5. Grep the repo for the old version to catch any file missing from the list above, and update or consciously skip each hit: grep -rnF '<old version>' --exclude-dir=node_modules --exclude-dir=.git --exclude=package-lock.json --exclude=go.sum . Also grep for other 1.26.x patch versions (docs, .codebox.conf, skills) that may have drifted earlier.
  6. Verify the repo still builds if the version bump changed tool behavior.

Notes

  • Keep the version updates consistent across all Go modules.
  • Do not leave one module on the old version; that creates hard-to-debug drift.

Version History

  • d01518f Current 2026-11-02 20:45

    新增步骤:使用 grep 搜索旧版本号以捕获遗漏文件;修复 custombuild Dockerfile 路径;增加对文档和其他配置中陈旧版本的检查。

  • 2dd6d88 2026-07-24 16:30

Same Skill Collection

.claude/skills/add-go-test/SKILL.md
.claude/skills/add-portal-admin-api-mutation/SKILL.md
.claude/skills/add-portal-admin-api-query/SKILL.md
.claude/skills/add-portal-screen/SKILL.md
.claude/skills/api-design/SKILL.md
.claude/skills/bootstrap-local-dev/SKILL.md
.claude/skills/dep-audit/SKILL.md
.claude/skills/generate-schemas-and-gentype/SKILL.md
.claude/skills/new-siteadmin-api/SKILL.md
.claude/skills/review-pr/SKILL.md
.claude/skills/update-configs/SKILL.md
.claude/skills/update-deps/SKILL.md
.claude/skills/update-email-templates/SKILL.md
.claude/skills/update-feature-config/SKILL.md
.claude/skills/update-important-modules/SKILL.md
.claude/skills/update-portal-ui/SKILL.md
.claude/skills/update-vettedpositions/SKILL.md
.claude/skills/write-e2e-test/SKILL.md
.claude/skills/write-implementation-plan/SKILL.md
.claude/skills/portal-admin-api-graphql/SKILL.md

Metadata

Files
0
Version
d01518f
Hash
5a7ea094
Indexed
2026-07-24 16:30

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-10 06:16
浙ICP备14020137号-1