migrate-goldmark-app-v1-to-v2
하는 일
goldmark v2에 필요한 변경을 계획하고 실행합니다. 여러분이 승인한 계획으로 시작해 테스트로 마무리합니다. 애플리케이션에서 goldmark를 쓰는 Go 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Go 애플리케이션이 goldmark v1을 쓰고 있고 v2로 옮기고 싶을 때.
- ✓goldmark v1과 v2 사이에서 호환성을 깨는 변경이 무엇인지 확인해야 할 때.
- ✓코드 변경을 시작하기 전에 마이그레이션 계획을 확정하고 싶을 때.
스킬 링크
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에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 Go 앱을 goldmark v1에서 v2로 옮겨 주세요. 코드를 바꾸기 전에 계획을 저와 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 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 핵심 내용을 다룬 참고 문서를 사용합니다.
확장 기능용 스킬은 따로 있나요?
네. goldmark 확장 기능의 마이그레이션은 별도의 스킬이 있습니다.
상세 정보
인기도
- GitHub 스타
- 5.1k
- 순위
- #15050
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.