
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.
- Installs
- 104
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/ant-design/x --skill x-markdown- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads x-markdown automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
🎯 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
- 🚀 Quick Start Decision Guide
- 🛠 Recommended Workflow
- 🚨 Development Rules
- 🤝 Skill Collaboration
- 🔗 Reference Resources
📦 Package Boundaries
| Layer | Package | Responsibility |
|---|---|---|
| UI layer | @ant-design/x | Chat UI, bubble lists, sender, rich interaction components |
| Data layer | @ant-design/x-sdk | Providers, requests, streaming data flow, state management |
| Render layer | @ant-design/x-markdown | Markdown parsing, streaming rendering, plugins, themes, custom renderers |
⚠️
x-markdownis not a chat-state tool. Use it to render content after@ant-design/xand@ant-design/x-sdkhave already produced the message data.
🚀 Quick Start Decision Guide
| If you need to... | Read first | Typical outcome |
|---|---|---|
| Render Markdown with the smallest setup | CORE.md | XMarkdown renders trusted content with basic styling |
| Render LLM streaming chunks | STREAMING.md | Correct hasNextChunk, placeholders, tail indicator, loading states |
| Replace tags with business components | EXTENSIONS.md | Stable components map for custom tags and code blocks |
| Add plugins or theme overrides | EXTENSIONS.md | Plugin imports, theme class wiring, minimal CSS overrides |
| Check prop details and defaults | API.md | Full prop table for XMarkdown and streaming options |
🛠 Recommended Workflow
- Start with CORE.md and get a plain render working first.
- Add STREAMING.md only when the content arrives chunk-by-chunk.
- Add EXTENSIONS.md when you need custom tags, plugins, syntax blocks, or themes.
- 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
componentsobject. Do not create new inline component mappings on every render. - Use
streaming.hasNextChunk = falseon the final chunk, otherwise incomplete placeholders will not flush into final content. - Treat raw HTML carefully. Prefer
escapeRawHtmlwhen raw HTML should stay visible as text. - If raw HTML must be rendered, keep
dompurifyConfigexplicit and minimal. - Keep theme overrides small. Start from
x-markdown-lightorx-markdown-darkand override only the variables you need. - If a custom component depends on complete syntax, branch on
streamStatus === 'done'.
🤝 Skill Collaboration
| Scenario | Recommended skill combination | Why |
|---|---|---|
| Rich assistant replies in chat | x-chat-provider → x-request → use-x-chat → x-markdown | Provider and request handle data flow, x-markdown handles final rendering |
| Built-in provider with Markdown replies | x-request → use-x-chat → x-markdown | Keep request config and rendering concerns separate |
| Standalone Markdown page or docs viewer | x-markdown only | No chat data flow needed |
Boundary Rules
- Use
x-chat-providerwhen adapting an API shape. - Use
x-requestwhen configuring transport, auth, retries, or streaming separators. - Use
use-x-chatwhen managing chat state in React. - Use
x-markdownwhen 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-markdowndocs
Official Docs
FAQ
What does the x-markdown skill do?
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.
How do I install x-markdown?
Run npx skills add https://github.com/ant-design/x --skill x-markdown in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/x-markdown/ (personal) or .claude/skills/x-markdown/ (project).
Which AI agents can use x-markdown?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is x-markdown safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains x-markdown?
It is published by ant-design in ant-design/x. It has 104 recorded installs.
More from ant-design/x
x-components
ant-design/x
Use when building AI chat UIs with @ant-design/x components — covers Bubble, Sender, Conversations, Prompts, ThoughtChain, Actions, Welcome, Attachments, Sources, Suggestion, Think, FileCard, CodeHighlighter, Mermaid, Folder, XProvider, and Notification.
x-request
ant-design/x
Focus on explaining the practical configuration and usage of XRequest, providing accurate configuration instructions based on official documentation
x-chat-provider
ant-design/x
Focus on implementing custom Chat Provider, helping to adapt any streaming interface to Ant Design X standard format
x-card
ant-design/x
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.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.