migrate-goldmark-app-v1-to-v2
What it does
It plans and carries out the changes needed for goldmark v2, starting with a plan you approve and ending with tests. It is for Go developers who use goldmark in an application.
When to use it
- ✓When your Go application uses goldmark v1 and you want to move to v2.
- ✓When you need to see the breaking changes between goldmark v1 and v2.
- ✓When you want a migration plan confirmed before code changes start.
Skill link
https://github.com/yuin/goldmark/blob/v2/.agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Help me move my Go app from goldmark v1 to v2, and check the plan with me before changing any code.”
5 new skills a week. 1 minute to read.
How it works
The agent writes a migration plan for you to confirm, updates the code, adjusts the tests, and runs them against goldmark v2. It uses reference notes on the breaking changes.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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-v2skill 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
goldmark.Markdown alternatives
- In v2,
goldmark.Markdownis removed. Therefore, you need to replace it with one of the following two patterns:- Pattern 1: Use
parser.Parserandrenderer.Rendererto create your owngoldmark.Markdownalternative.- Example:
// 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 } }
- Example:
- Pattern 2: Use
parser.Parserandrenderer.Rendererseparately.- Example:
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)
- Example:
- Pattern 1: Use
- Extensions MUST NOT be shared among multiple parsers/renderers. Create them with the
New*constructors (e.g.extension.NewTableParser()) for each parser/renderer instead of using the deprecated default instances (e.g.extension.TableParser).
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.BytesandValue.Strmethods withValue.Valuemethod. - Otherwise, you should replace
Value.BytesandValue.Strmethods withValue.Valuemethod.
- If your application relies on the resolved values of AST nodes, you should replace
- You need to check if your application relies on the 'raw' values of AST nodes.
- In v2, to make the AST more semantic, some breaking changes have occurred.
FAQ
Does the agent start changing code right away?
No. The skill requires you to confirm the migration plan and say how to test it first.
What helps it know the v2 changes?
Reference documents on the breaking changes in v2 and on CommonMark key points.
Is there a separate skill for extensions?
Yes. The migration of a goldmark extension has its own skill.
Details
Original description by the author
Migrate your application from goldmark v1 to v2.
repo: yuin/goldmark
Popularity
- GitHub stars
- 5.1k
- Ranking position
- #15050
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.