migrate-goldmark-app-v1-to-v2
Was er macht
Dieser Skill plant und setzt die nötigen Änderungen für goldmark v2 um, beginnend mit einem Plan, den du freigibst, und endend mit Tests. Er ist für Go-Entwickler gedacht, die goldmark in einer Anwendung nutzen.
Wann du ihn nutzt
- ✓Wenn deine Go-Anwendung goldmark v1 nutzt und du auf v2 umsteigen willst.
- ✓Wenn du die inkompatiblen Änderungen zwischen goldmark v1 und v2 sehen musst.
- ✓Wenn du einen Migrationsplan bestätigt haben willst, bevor Codeänderungen beginnen.
Link zum Skill
https://github.com/yuin/goldmark/blob/v2/.agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Hilf mir, meine Go-App von goldmark v1 auf v2 umzustellen, und stimme den Plan mit mir ab, bevor du Code änderst.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent schreibt einen Migrationsplan, den du bestätigst, passt den Code an, aktualisiert die Tests und führt sie gegen goldmark v2 aus. Dafür nutzt er Referenznotizen zu den inkompatiblen Änderungen.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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.
Häufige Fragen
Fängt der Agent sofort an, Code zu ändern?
Nein. Der Skill verlangt, dass du zuerst den Migrationsplan bestätigst und sagst, wie getestet werden soll.
Was hilft ihm, die Änderungen in v2 zu kennen?
Referenzdokumente zu den inkompatiblen Änderungen in v2 und zu den wichtigsten Punkten von CommonMark.
Gibt es einen eigenen Skill für Erweiterungen?
Ja. Die Umstellung einer goldmark-Erweiterung hat einen eigenen Skill.
Details
Beliebtheit
- GitHub-Sterne
- 5.1k
- Platz im Ranking
- #15050
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.