Official agent skill

Go Codemod

by github in github/gh-aw

Implement and test Go codemods for the gh aw fix command. An agent skill from github/gh-aw.

OfficialMITAuto-check passedDevelopment

Install Go Codemod

skills CLI
$ npx skills add github/gh-aw --skill go-codemod -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/gh-aw go-codemod --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/gh-aw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/go-codemod .claude/skills/go-codemod && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
go-codemod
GitHub stars
5.3k
Token cost
~877 tokens
SKILL.md length
391 words
Files
1
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Implement and test Go codemods for the gh aw fix command. An agent skill from github/gh-aw.

  • Works in 3 steps: Review pkg/cli/fix_command.go to… → Review the codemod registry in… → Review helper utilities in…
  • Tasks that involve Code migrations
  • SKILL.md covers Understand the fix pipeline…, Implementation steps, Testing requirements and Registry/order tests, plus 2 more sections
  • Calls make, go and gh

What it does

Go Codemod is an agent skill from github/gh-aw, published by the product's own GitHub organization. Implement and test Go codemods for the gh aw fix command.

Its SKILL.md is about 880 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code migrations. The repository describes itself as: GitHub Agentic Workflows. The licence is MIT.

When your agent uses it

  • Tasks that involve Code migrations

Example prompts

  • “/go-codemod”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Review pkg/cli/fix_command.go to understand execution flow
  2. Review the codemod registry in pkg/cli/fix_codemods.go.
  3. Review helper utilities in pkg/cli/yaml_frontmatter_utils.go and reusable codemod helper constructors in pkg/cli/codemod_factory.go.

What it can do on your machine

Read from SKILL.md and the folder at commit eb63040. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • go
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Go Codemod loads about 877 tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 391 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~877

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/gh-aw at commit eb63040, republished under its MIT licence (© github). 391 words, ~877 tokens.

Download SKILL.mdSave it as .claude/skills/go-codemod/SKILL.md (or your agent's skills folder).
name
go-codemod
description
Implement and test Go codemods for the gh aw fix command.

Go Codemod Implementation Guide

Use this skill when adding or updating codemods used by gh aw fix.

Understand the fix pipeline first

  1. Review pkg/cli/fix_command.go to 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
  2. Review the codemod registry in pkg/cli/fix_codemods.go.
  3. Review helper utilities in pkg/cli/yaml_frontmatter_utils.go and reusable codemod helper constructors in pkg/cli/codemod_factory.go.

Implementation steps

  1. Create a new codemod file in pkg/cli/ named codemod_<feature>.go.
  2. Add a package logger with logger.New("cli:codemod_<feature>").
  3. Implement get<Feature>Codemod() Codemod and populate all metadata fields:
    • ID (stable, unique)
    • Name (human-readable)
    • Description (clear migration behavior)
    • IntroducedIn (release version)
  4. In Apply:
    • check frontmatter preconditions first
    • return unchanged content and applied=false when migration is not needed
    • transform only frontmatter using applyFrontmatterLineTransform from pkg/cli/yaml_frontmatter_utils.go
    • preserve comments/formatting/markdown body
    • avoid lossy rewrites and avoid touching unrelated keys
  5. Prefer existing helpers before writing custom parsing logic:
    • findAndReplaceInLine
    • removeFieldFromBlock
    • removeParentBlockIfTrulyEmpty
    • newFieldRemovalCodemod
    • newMoveTopLevelKeyToOnBlockCodemod
  6. If the codemod depends on external data or side effects, inject dependencies through a ...WithDeps constructor so tests can mock behavior.
  7. Register the codemod in pkg/cli/fix_codemods.go within GetAllCodemods().
Show full SKILL.md (192 more words)Show less

Testing requirements

Create pkg/cli/codemod_<feature>_test.go and cover:

  1. Metadata correctness (ID, Name, Description, IntroducedIn, Apply != nil).
  2. Happy path migration with expected output.
  3. No-op behavior when deprecated input is absent.
  4. Idempotence behavior (already-migrated input remains unchanged).
  5. Preservation guarantees:
    • inline comments
    • indentation
    • markdown body after frontmatter
  6. Edge cases specific to the codemod (nested fields, mixed forms, ordering constraints, strict-mode checks, etc.).
  7. Dependency-injection behavior if ...WithDeps exists (success and fallback/error paths).

When complexity is high (expression rewriting, parser-like behavior), add fuzz tests in codemod_<feature>_fuzz_test.go using the pattern in pkg/cli/codemod_steps_run_secrets_env_fuzz_test.go.

Registry/order tests

After adding a codemod, update pkg/cli/fix_codemods_test.go:

  1. Expected codemod IDs list.
  2. Expected codemod order list.

Order matters because codemods run sequentially and later codemods observe prior transformations.

Validation commands

Run targeted checks first:

  1. go test -v ./pkg/cli -run Codemod -count=1
  2. go test -v ./pkg/cli -run Fix -count=1

Then run repository standards:

  1. make build
  2. make test-unit
  3. make lint

Quality bar

A codemod is ready only when it is:

  • deterministic
  • safe on repeated runs
  • conservative (no unrelated rewrites)
  • fully covered by tests for migration and no-op paths
  • registered and order-verified in fix codemod registry tests

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/go-codemod of github/gh-aw.

Open the folder on GitHubat commit eb63040

Compare with similar skills

Go Codemod next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Go Codemod compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Go Codemod this skillgithub/gh-aw5.3k—~877Automated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT
Deprecate R Functions and Argumentstidyverse/dplyr5.1k1 repos~1.2kAutomated safety check: PassCustom licence
Rust Path Typesopeninterpreter/openinterpreter69k2 repos~605Automated safety check: PassApache-2.0

Similar skills

  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks through deprecating an R function or argument in a package: lifecycle warning, silenced tests, a new snapshot test, documentation badge and NEWS entry.

    5.1k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Rust Path Types

    openinterpreter/openinterpreter

    Rules for choosing Rust types for filesystem paths in new Codex code, covering protocol types, internal use and model tool arguments.

    69k GitHub starsUsed in 2 repos~605 tokens
    DevelopmentAuto-check passed
  • Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.

    55k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed

More from github/gh-aw

All 52 skills in this repo
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.3k GitHub starsUsed in 23 repos~2.8k tokens
    Auto-check passed
  • Official

    Designs and verifies a deterministic grader that measures whether a GitHub Agentic Workflow run reached its real-world or repository outcome.

    5.3k GitHub stars~6.8k tokensUpdated today
    Auto-check passed
  • Official

    Scaffolds, edits, reloads and debugs a canvas extension that the GitHub Copilot CLI can open in its side panel.

    5.3k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Official

    Drives an open pull request to merge-ready from inside a GitHub Copilot cloud agent, resolving review threads and local checks concurrently, without merging or retriggering CI.

    5.3k GitHub stars~3.8k tokensUpdated today
    Auto-check: warnings
  • Official

    Bumps gh-aw's pinned gh-aw-firewall version, rebuilds generated artifacts, and flags upstream spec or schema changes that need follow-up work.

    5.3k GitHub stars~899 tokensUpdated today
    Auto-check passed
  • Official

    Guide to the console struct tag system in gh-aw: headers, titles, number and cost formats, omitempty, and how structs, slices and maps render in the terminal.

    5.3k GitHub stars~736 tokensUpdated today
    Auto-check passed

Categories

Questions about Go Codemod

What does Go Codemod do?

Implement and test Go codemods for the gh aw fix command. An agent skill from github/gh-aw. Go Codemod is an agent skill from github/gh-aw, published by the product's own GitHub organization. Implement and test Go codemods for the gh aw fix command.

When should I use Go Codemod?

Go Codemod fits situations like: tasks that involve Code migrations.

How do I install Go Codemod in Claude Code?

Run `npx skills add github/gh-aw --skill go-codemod -a claude-code`. Or copy the skill folder (.github/skills/go-codemod in github/gh-aw) into .claude/skills/go-codemod in your project. Claude Code loads it when a task matches its description.

How do I install Go Codemod in Codex?

Run `npx skills add github/gh-aw --skill go-codemod -a codex`. Or copy the skill folder (.github/skills/go-codemod in github/gh-aw) into .agents/skills/go-codemod in your project. Codex loads it when a task matches its description.

Can I use Go Codemod in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/gh-aw --skill go-codemod -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/go-codemod, .gemini/skills/go-codemod, .github/skills/go-codemod and .opencode/skills/go-codemod in your project.

What does Go Codemod need to run?

Going by SKILL.md and its folder, Go Codemod needs the command-line tools its instructions call (make, go and gh).

Does Go Codemod access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Go Codemod safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Go Codemod use?

Go Codemod is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Go Codemod use?

About 877 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Go Codemod?

Skills that share tags, products or a category with Go Codemod: Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars), ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars) and Deprecate R Functions and Arguments (tidyverse/dplyr, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Go Codemod?

github (a GitHub organization, an official publisher) maintains it in github/gh-aw, which has 5,350 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/gh-aw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.