본문으로 건너뛰기
cccskills
무료GitHub에 공개

x-markdown

Use when building or reviewing Markdown rendering with @ant-design/x-markdown, including streaming Markdown, custom component mapping, plugins, themes, and chat-oriented rich content.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(5)

  • SKILL.md5.3 KB
  • reference/API.md3.3 KB
  • reference/CORE.md1.8 KB
  • reference/EXTENSIONS.md2.0 KB
  • reference/STREAMING.md1.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

🎯 Skill Positioning

This skill focuses on one job: render Markdown correctly and predictably with @ant-design/x-markdown.

It covers:

  • Basic rendering and package boundaries
  • LLM streaming output and incomplete syntax handling
  • Custom component mapping for rich chat or data-display blocks
  • Plugins, themes, and safe rendering defaults

Table of Contents

📦 Package Boundaries

LayerPackageResponsibility
UI layer@ant-design/xChat UI, bubble lists, sender, rich interaction components
Data layer@ant-design/x-sdkProviders, requests, streaming data flow, state management
Render layer@ant-design/x-markdownMarkdown parsing, streaming rendering, plugins, themes, custom renderers

⚠️ x-markdown is not a chat-state tool. Use it to render content after @ant-design/x and @ant-design/x-sdk have already produced the message data.

🚀 Quick Start Decision Guide

If you need to...Read firstTypical outcome
Render Markdown with the smallest setupCORE.mdXMarkdown renders trusted content with basic styling
Render LLM streaming chunksSTREAMING.mdCorrect hasNextChunk, placeholders, tail indicator, loading states
Replace tags with business componentsEXTENSIONS.mdStable components map for custom tags and code blocks
Add plugins or theme overridesEXTENSIONS.mdPlugin imports, theme class wiring, minimal CSS overrides
Check prop details and defaultsAPI.mdFull prop table for XMarkdown and streaming options

🛠 Recommended Workflow

  1. Start with CORE.md and get a plain render working first.
  2. Add STREAMING.md only when the content arrives chunk-by-chunk.
  3. Add EXTENSIONS.md when you need custom tags, plugins, syntax blocks, or themes.
  4. Use API.md to confirm prop names and defaults instead of guessing.

Minimal Setup Reminder

import { XMarkdown } from '@ant-design/x-markdown';

export default () => <XMarkdown content="# Hello" />;

🚨 Development Rules

  • Prefer a stable components object. Do not create new inline component mappings on every render.
  • Use streaming.hasNextChunk = false on the final chunk, otherwise incomplete placeholders will not flush into final content.
  • Treat raw HTML carefully. Prefer escapeRawHtml when raw HTML should stay visible as text.
  • If raw HTML must be rendered, keep dompurifyConfig explicit and minimal.
  • Keep theme overrides small. Start from x-markdown-light or x-markdown-dark and override only the variables you need.
  • If a custom component depends on complete syntax, branch on streamStatus === 'done'.

🤝 Skill Collaboration

ScenarioRecommended skill combinationWhy
Rich assistant replies in chatx-chat-provider → x-request → use-x-chat → x-markdownProvider and request handle data flow, x-markdown handles final rendering
Built-in provider with Markdown repliesx-request → use-x-chat → x-markdownKeep request config and rendering concerns separate
Standalone Markdown page or docs viewerx-markdown onlyNo chat data flow needed

Boundary Rules

  • Use x-chat-provider when adapting an API shape.
  • Use x-request when configuring transport, auth, retries, or streaming separators.
  • Use use-x-chat when managing chat state in React.
  • Use x-markdown when the content itself needs Markdown parsing, streaming recovery, or rich component rendering.

🔗 Reference Resources

  • CORE.md - Package boundaries, install/setup, safe defaults, common render patterns
  • STREAMING.md - Chunked rendering, incomplete syntax recovery, loading vs done behavior
  • EXTENSIONS.md - Components, plugins, themes, custom tag guidance
  • API.md - Generated API reference from the official x-markdown docs

Official Docs

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

专注讲解如何使用 useXChat Hook,包括自定义 Provider 的集成、消息管理、错误处理、多会话管理等

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ant-design/x4.8천2026년 10월 12일 업데이트

Focus on explaining how to use the useXChat Hook, including custom Provider integration, message management, error handling, multi-conversation management, and more

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ant-design/x4.8천2026년 10월 12일 업데이트

x-card

무료

Use when building AI-driven UIs with @ant-design/x-card — covers XCard.Box, XCard.Card, A2UI v0.9 commands, data binding, catalogs, actions, and streaming patterns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ant-design/x4.8천2026년 10월 12일 업데이트

x-card

무료

当需要用 @ant-design/x-card 让 AI Agent 动态渲染富交互 UI 时使用——涵盖 XCard.Box、XCard.Card、A2UI v0.9 命令、数据绑定、Catalog、Actions 和流式渲染模式。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ant-design/x4.8천2026년 10월 12일 업데이트

Focus on implementing custom Chat Provider, helping to adapt any streaming interface to Ant Design X standard format

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ant-design/x4.8천2026년 10월 12일 업데이트

专注于自定义 Chat Provider 的实现,帮助将任意流式接口适配为 Ant Design X 标准格式

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ant-design/x4.8천2026년 10월 12일 업데이트

ant-design의 스킬 모두 보기

이 스킬의 문제 신고