with one click
xiaohongshu-card-layout
// 将 Markdown 文档、长文、备忘录、脚本或结构化正文排版成小红书 3:4 图文卡片。适合“把这篇 md 做成小红书卡片”“排版成图文卡片”“生成小红书轮播图”等请求。
// 将 Markdown 文档、长文、备忘录、脚本或结构化正文排版成小红书 3:4 图文卡片。适合“把这篇 md 做成小红书卡片”“排版成图文卡片”“生成小红书轮播图”等请求。
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | xiaohongshu-card-layout |
| description | 将 Markdown 文档、长文、备忘录、脚本或结构化正文排版成小红书 3:4 图文卡片。适合“把这篇 md 做成小红书卡片”“排版成图文卡片”“生成小红书轮播图”等请求。 |
| allowed-tools | Read, Write, Bash |
Follow shared NexTide rules in:
nextide-sharedUse this skill when the user wants to:
Do not use this skill for:
xiaohongshu-note-collectorxiaohongshu-infographic-generatorCapability id:
xhs.card.layout
CLI contract:
npm run nextide -- capability run xhs.card.layout \
--input .nextide/input/xhs-card-layout.json \
--output .nextide/output/xhs-card-layout-result.json \
--mode wait
Write a real JSON file:
{
"markdown": "# 标题\n\n正文...",
"title": "可选标题",
"templateId": "minimal",
"includeCover": true,
"maxPages": 8,
"persist": false
}
Field rules:
markdown is required.title is optional; if omitted, NexTide extracts a title.templateId can be omitted unless the user specifies a style.maxPages should usually be 6-10.persist=false by default for agent tests unless the user wants it saved to NexTide projects.Read or receive the Markdown content.
If the content is not already Markdown, convert it lightly without changing wording.
Decide card constraints before running:
maxPages: default 6-8 for普通内容,10+ only if user accepts longer carousel.includeCover: true unless user explicitly says no cover.templateId: only set when user specifies a style; otherwise use capability default.Create .nextide/input/xhs-card-layout.json.
Run the capability command.
Export the full artifact bundle:
RUN_ID=$(node -e "const r=require('./.nextide/output/xhs-card-layout-result.json'); console.log(r.run && r.run.runId)")
npm run nextide -- run artifacts "$RUN_ID" \
--output-dir .nextide/output/$RUN_ID \
--download \
--gallery \
--datatable
Read in this order:
.nextide/output/$RUN_ID/summary.json.nextide/output/$RUN_ID/manifest.json.nextide/output/$RUN_ID/gallery.html / preview.html.nextide/output/$RUN_ID/datatable.jsonReturn rich preview blocks if supported, then local image paths, then remote fallback URLs.
Expected successful result shape:
{
"run": {
"status": "succeeded",
"result": {
"data": {
"taskId": "",
"title": "...",
"templateId": "...",
"images": ["https://..."]
}
},
"artifacts": [
{ "type": "image", "url": "https://...", "name": "xhs-card-1.png" }
]
}
}
Return:
summary.recommendedResponse.message if summary.json existshtml-preview block for preview.html or gallery.html when supporteddatatable block for datatable.json when usefulexplanation next actions if the run failedGood final response shape:
已完成:<summary message>
```html-preview
{"src":"/absolute/path/to/preview.html","title":"小红书卡片预览"}
```
文件:
- /absolute/path/to/xhs-card-1.png
- /absolute/path/to/xhs-card-2.png
下一步你可以:
1. 生成小红书标题
2. 生成发布正文
maxPages increase before truncating.xhs.card.layout0.2.0xhsavailableinternal_apifalselownexTideApiKeynonenonenonexiaohongshu, layout, markdown, cardsDescription:
将 Markdown 文档排版并渲染为小红书 3:4 卡片图片。
Examples:
Markdown 生成小红书卡片
{
"title": "AI 工具清单",
"markdown": "# AI 工具清单\n\n- Claude\n- NexTide",
"includeCover": true,
"maxPages": 6
}
Input fields:
markdown (string, required):要排版的 Markdown 正文。title (string):卡片标题。为空时自动从 Markdown 提取。templateId (string):卡片模板 ID。 默认:"minimal"includeCover (boolean):是否生成封面页。 默认:truemaxPages (number):最多生成页数。 默认:8persist (boolean):是否保存为创作任务。 默认:falseOutput fields:
taskId (string):保存任务 ID;persist=false 时为空。title (string):渲染标题。templateId (string):实际使用模板。images (string[]):生成的卡片图片 URL。CLI:
nextide capability run xhs.card.layout \
--input .nextide/input/xhs.card.layout.json \
--output .nextide/output/xhs.card.layout-result.json \
--mode wait
If the result contains artifacts, export them:
RUN_ID=$(node -e "const r=require('./.nextide/output/xhs.card.layout-result.json'); console.log(r.run && r.run.runId)")
nextide run artifacts "$RUN_ID" \
--output-dir .nextide/output/$RUN_ID \
--download \
--gallery \
--datatable
Then read summary.json first, followed by manifest.json.
available, fail fast and explain what is missing.--wait when the user wants a finished result in the same turn.nextide run artifacts <run-id> --output-dir .nextide/output/<run-id> --download --gallery --datatable and read summary.json then manifest.json.nextide run follow <run-id> --output-dir .nextide/output/<run-id> --timeout 1800 --interval 5.summary.recommendedResponse.message, preview.html, datatable.json, and local artifact paths over pasting huge raw JSON.explanation, convert it into a clear user-facing failure message with next actions.