Agent skill

Goldmark v1 to v2 Migration

by yuin in yuin/goldmark

Plans and carries out the migration of a Go application from goldmark v1 to v2, with a written plan, human sign-off, updated tests and documentation.

MITAuto-check: notesDevelopment

Install Goldmark v1 to v2 Migration

skills CLI
$ npx skills add yuin/goldmark --skill migrate-goldmark-app-v1-to-v2 -a claude-code

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

GitHub CLI
$ gh skill install yuin/goldmark migrate-goldmark-app-v1-to-v2 --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/yuin/goldmark.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2 .claude/skills/migrate-goldmark-app-v1-to-v2 && 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
migrate-goldmark-app-v1-to-v2
GitHub stars
5.1k
Token cost
~1.2k tokens
SKILL.md length
561 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Plans and carries out the migration of a Go application from goldmark v1 to v2, with a written plan, human sign-off, updated tests and documentation.

  • Upgrading a Go application that uses goldmark v1 to v2
  • SKILL.md covers Description, Knowledges and Migration steps
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Checking whether third-party goldmark extensions have v2 releases

What it does

The migration is plan-first. After reading the breaking-changes and extension-writing references, the agent writes `./features/goldmark-migration-plan.md`, must get your approval of that plan, and must ask how you want the application tested afterward before changing any code. It then executes the plan, updates the tests, runs them and fixes problems until things pass, and finally updates the documentation.

Extensions need separate handling: extensions you wrote can be moved with the companion `/migrate-goldmark-extension-v1-to-v2` skill, while third-party extensions must offer a v2-compatible release or the migration stops. The key-points section starts with the removal of `goldmark.Markdown` in v2, which has to be replaced by one of two patterns. The skill relies on reference notes on CommonMark key points and the v2 breaking changes.

When your agent uses it

  • Upgrading a Go application that uses goldmark v1 to v2
  • Checking whether third-party goldmark extensions have v2 releases
  • Replacing removed goldmark.Markdown usage

Example prompts

  • “Migrate this app from goldmark v1 to v2 and write the plan first for my approval.”
  • “Find every use of goldmark.Markdown in this repo and propose its v2 replacement.”
  • “Check whether the goldmark extensions we depend on support v2 before we start.”

Requirements

  • A Go project that depends on goldmark v1
  • Pre-approved tools (allowed-tools): Bash, Read

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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

Goldmark v1 to v2 Migration loads about 1.2k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 561 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

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 yuin/goldmark at commit cbf81e9, republished under its MIT licence (© yuin). 561 words, ~1,195 tokens.

Download SKILL.mdSave it as .claude/skills/migrate-goldmark-app-v1-to-v2/SKILL.md (or your agent's skills folder).
name
migrate-goldmark-app-v1-to-v2
description
Migrate your application from goldmark v1 to v2.
allowed-tools
Bash, Read
context
fork

migrate-goldmark-app-v1-to-v2

Description

This skill helps you migrate a goldmark (https://github.com/yuin/goldmark) extension from version 1 to version 2. It provides guidance on the changes needed to update your project to be compatible with the new version of goldmark.

Knowledges

  • CommonMark key points : List of key points of CommonMark spec that you should be aware of when implementing a goldmark extension.
  • Breaking changes in v2 : List of breaking changes in goldmark v2 that you should be aware of when migrating your extension from v1 to v2.

Migration steps

Overview of the migration process
  • Create a migration plan for the application.
  • MUST ask human to confirm that the migration plan is acceptable before proceeding with the migration.
  • MUST ask human to how to test the application after migration before proceeding with the migration.
    • e.g. : "How do you want to test the application after migration? Do you have any test cases or examples that you want to use for testing?"
  • Execute the migration plan to update the application code to be compatible with goldmark v2.
  • Update the test cases to ensure that the application works as expected with goldmark v2.
  • Test the application with goldmark v2 to ensure that it works as expected. If there are any issues, fix them and re-test until the application works as expected.
  • Update the documentation to reflect any changes made during the migration process.
Create a migration plan
Task
  • Make sure you have read and understood the Breaking changes in v2 document.
  • Make sure you have read and understood the How to create an extension document.
  • You create a ./features/goldmark-migration-plan.md file that contains a migration plan for the extension.
Extension
  • If the application contains own extensions, you can use /migrate-goldmark-extension-v1-to-v2 skill to migrate the extensions.
  • If the application contains third-party extensions, you need to check if the extensions provide v2 compatible version. - If not, STOP the migration.
Key points to consider when migrating your application
Show full SKILL.md (244 more words)Show less
goldmark.Markdown alternatives
  • In v2, goldmark.Markdown is removed. Therefore, you need to replace it with one of the following two patterns:
    • Pattern 1: Use parser.Parser and renderer.Renderer to create your own goldmark.Markdown alternative.
      • Example:
        go
        // MarkdownToStringFunc is a function type that converts markdown to HTML.
        type MarkdownToStringFunc func(source string) (string, error)
        
        // NewMarkdownToStringFunc returns a MarkdownToStringFunc that uses the given parser and renderer.
        func NewMarkdownToStringFunc(p parser.Parser, r html.Renderer) MarkdownToStringFunc {
            return func(source string) (string, error) {
                var buf bytes.Buffer
                b := util.StringToReadOnlyBytes(source)
                doc := p.Parse(b)
                if err := r.Render(&buf, b, doc); err != nil {
                    return "", err
                }
                return buf.String(), nil
            }
        }
    • Pattern 2: Use parser.Parser and renderer.Renderer separately.
      • Example:
        go
        var buf bytes.Buffer
        p := parser.New(parser.WithAttribute(), parser.WithExtensions(extension.StrikethroughParser))
        r := html.New(html.WithXHTML(), html.WithUnsafe(), html.WithExtensions(extension.StrikethroughHTMLRenderer))
        doc := p.Parse(b)
        err := r.Render(&buf, b, doc)
AST
  • In v1, AST values are mostly 'raw' values; entities references and \ escapes are not resolved. In v2, AST values are resolved values.
    • You need to check if your application relies on the 'raw' values of AST nodes.
      • If your application relies on the resolved values of AST nodes, you should replace Value.Bytes and Value.Str methods with Value.Value method.
      • Otherwise, you should replace Value.Bytes and Value.Str methods with Value.Value method.
  • In v2, to make the AST more semantic, some breaking changes have occurred.
Parsing
  • To customize the ID generation, you need to use parser.IDGenerator instead of parser.IDs.
Rendering
  • In v2, renderer.Renderer has renderer.Context; if the application mimics context for rendering, it should be updated to use renderer.Context.

© yuin, 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 .agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2 of yuin/goldmark.

Open the folder on GitHubat commit cbf81e9

Compare with similar skills

Goldmark v1 to v2 Migration 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.

Goldmark v1 to v2 Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Goldmark v1 to v2 Migration this skillyuin/goldmark5.1k—~1.2kAutomated safety check: NotesMIT
CLIProxy Core Synccaidaoli/ccLoad419—~1.5kAutomated safety check: PassMIT
Golang Modernizeaiskillstore/marketplace4331 repos~3.3kAutomated safety check: PassMIT
Writing gotest Testsmvrahden/go-test128—~3.1kAutomated safety check: PassMIT
Security UpdatesSmilyOrg/photofield608—~808Automated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0

Similar skills

  • CLIProxy Core Sync

    caidaoli/ccLoad

    Syncs or audits ccLoad's CLIProxyAPI protocol-conversion core and registered provider adapters against one pinned upstream commit, then verifies the result.

    419 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Golang Modernize

    aiskillstore/marketplace

    Modernize Golang code to use recent language features, standard library improvements, and idiomatic patterns.

    433 GitHub starsUsed in 1 repo~3.3k tokens
    DevelopmentAuto-check passed
  • Writing gotest Tests

    mvrahden/go-test

    Guides writing, fixing and migrating tests in Go repositories that use the gotest suite framework, including version differences and CI setup.

    128 GitHub stars~3.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Security Updates

    SmilyOrg/photofield

    Check and apply security updates across the photofield project (api/Go, ui/npm, docs/npm, e2e/npm).

    608 GitHub stars~808 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • 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.

    42k 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.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed

More from yuin/goldmark

  • Guides migrating a goldmark Markdown extension from v1 to v2, with a confirmed plan, breaking-changes reference and extension-pattern guide.

    5.1k GitHub stars~2k tokensUpdated 10 days ago
    Auto-check: notes

Works with

Categories

Questions about Goldmark v1 to v2 Migration

What does Goldmark v1 to v2 Migration do?

Plans and carries out the migration of a Go application from goldmark v1 to v2, with a written plan, human sign-off, updated tests and documentation. The migration is plan-first.md`, must get your approval of that plan, and must ask how you want the application tested afterward before changing any code.

When should I use Goldmark v1 to v2 Migration?

Goldmark v1 to v2 Migration fits situations like: upgrading a Go application that uses goldmark v1 to v2; checking whether third-party goldmark extensions have v2 releases; replacing removed goldmark.Markdown usage.

How do I install Goldmark v1 to v2 Migration in Claude Code?

Run `npx skills add yuin/goldmark --skill migrate-goldmark-app-v1-to-v2 -a claude-code`. Or copy the skill folder (.agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2 in yuin/goldmark) into .claude/skills/migrate-goldmark-app-v1-to-v2 in your project. Claude Code loads it when a task matches its description.

How do I install Goldmark v1 to v2 Migration in Codex?

Run `npx skills add yuin/goldmark --skill migrate-goldmark-app-v1-to-v2 -a codex`. Or copy the skill folder (.agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2 in yuin/goldmark) into .agents/skills/migrate-goldmark-app-v1-to-v2 in your project. Codex loads it when a task matches its description.

Can I use Goldmark v1 to v2 Migration 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 yuin/goldmark --skill migrate-goldmark-app-v1-to-v2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate-goldmark-app-v1-to-v2, .gemini/skills/migrate-goldmark-app-v1-to-v2, .github/skills/migrate-goldmark-app-v1-to-v2 and .opencode/skills/migrate-goldmark-app-v1-to-v2 in your project.

What does Goldmark v1 to v2 Migration need to run?

SKILL.md names no scripts, command-line tools or credentials: Goldmark v1 to v2 Migration is instructions for the agent only. Our summary lists: A Go project that depends on goldmark v1. Its frontmatter pre-approves these tools: Bash, Read.

Does Goldmark v1 to v2 Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Goldmark v1 to v2 Migration safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Goldmark v1 to v2 Migration use?

Goldmark v1 to v2 Migration 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 Goldmark v1 to v2 Migration use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Goldmark v1 to v2 Migration?

Skills that share tags, products or a category with Goldmark v1 to v2 Migration: CLIProxy Core Sync (caidaoli/ccLoad, 419 stars), Golang Modernize (aiskillstore/marketplace, 433 stars), Writing gotest Tests (mvrahden/go-test, 128 stars) and Security Updates (SmilyOrg/photofield, 608 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Goldmark v1 to v2 Migration?

yuin (a GitHub user) maintains it in yuin/goldmark, which has 5,056 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 1, 2026.

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