go-codemod
Installation
SKILL.md
Go Codemod Implementation Guide
Use this skill when adding or updating codemods used by gh aw fix.
Understand the fix pipeline first
- Review
pkg/cli/fix_command.goto understand execution flow:- codemods are loaded once via
GetAllCodemods() - each codemod is applied in registry order
- frontmatter is re-parsed before each codemod
- codemods must return
(newContent, applied, error)and be safe for no-op input
- codemods are loaded once via
- Review the codemod registry in
pkg/cli/fix_codemods.go. - Review helper utilities in
pkg/cli/yaml_frontmatter_utils.goand reusable codemod helper constructors inpkg/cli/codemod_factory.go.