Migrates Go applications using the goldmark Markdown parser from v1 to v2, handling breaking changes and extension compatibility.
Ships in migrate-goldmark-v1-to-v2. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
/migrate-goldmark-extension-v1-to-v2 skill to migrate the extensions.goldmark.Markdown is removed. Therefore, you need to replace it with one of the following two patterns:
parser.Parser and renderer.Renderer to create your own goldmark.Markdown alternative.
// 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
}
}
parser.Parser and renderer.Renderer separately.
var buf bytes.Buffer
p := parser.New(parser.WithAttribute(), parser.WithExtensions(extension.NewStrikethroughParser()))
r := html.New(html.WithXHTML(), html.WithUnsafe(), html.WithExtensions(extension.NewStrikethroughHTMLRenderer()))
doc := p.Parse(b)
err := r.Render(&buf, b, doc)
New* constructors (e.g. extension.NewTableParser()) for each parser/renderer instead of using the deprecated default instances (e.g. extension.TableParser).\ escapes are not resolved. In v2, AST values are resolved values.
Value.Bytes and Value.Str methods with Value.Value method.Value.Bytes and Value.Str methods with Value.Value method.parser.IDGenerator instead of parser.IDs.renderer.Renderer has renderer.Context; if the application mimics context for rendering, it should be updated to use renderer.Context.What SKILL.md sets; muted values are Claude Code's defaults
/migrate-goldmark-v1-to-v2:migrate-goldmark-app-v1-to-v2from migrate-goldmark-v1-to-v2
npx claudepluginhub yuin/goldmark --plugin migrate-goldmark-v1-to-v22 skills in this plugin
Other plugins' skills for the same job