migrate-goldmark-app-v1-to-v2
यह क्या करती है
यह goldmark v2 के लिए ज़रूरी बदलावों की योजना बनाती है और उन्हें लागू करती है: पहले ऐसी योजना जिसे आप मंज़ूर करें, और अंत में टेस्ट। यह उन Go डेवलपर्स के लिए है जो अपने ऐप में goldmark इस्तेमाल करते हैं।
कब इस्तेमाल करें
- ✓जब आपकी Go ऐप goldmark v1 इस्तेमाल करती है और आप v2 पर जाना चाहते हैं।
- ✓जब आपको goldmark v1 और v2 के बीच टूटने वाले बदलाव (breaking changes) देखने हैं।
- ✓जब आप कोड बदलने से पहले माइग्रेशन योजना की पुष्टि चाहते हैं।
Skill का लिंक
https://github.com/yuin/goldmark/blob/v2/.agent-plugins/migrate-goldmark-v1-to-v2/skills/migrate-goldmark-app-v1-to-v2/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी Go ऐप को goldmark v1 से v2 पर ले जाने में मदद कीजिए, और कोड बदलने से पहले योजना मुझसे जाँच लीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आपका एजेंट आपकी पुष्टि के लिए माइग्रेशन योजना लिखता है, कोड अपडेट करता है, टेस्ट ठीक करता है, और goldmark v2 पर उन्हें चलाता है। वह टूटने वाले बदलावों के संदर्भ नोट्स का इस्तेमाल करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.
अक्सर पूछे जाने वाले सवाल
क्या एजेंट तुरंत कोड बदलना शुरू कर देता है?
नहीं। स्किल के लिए ज़रूरी है कि पहले आप माइग्रेशन योजना की पुष्टि करें और बताएँ कि उसे कैसे टेस्ट करना है।
v2 के बदलावों की जानकारी किससे मिलती है?
v2 के टूटने वाले बदलावों और CommonMark की मुख्य बातों पर संदर्भ दस्तावेज़ों से।
क्या extensions के लिए अलग स्किल है?
हाँ। goldmark extension के माइग्रेशन के लिए अलग स्किल है।
जानकारी
लोकप्रियता
- GitHub स्टार
- 5.1k
- रैंकिंग में स्थान
- #15050
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।