Community画像github.com

adrian147258/md-to-cards

Transform raw text, notes, articles, or Markdown into high-aesthetic, multi-theme shareable social media cards as a self-contained HTML studio with live theme/ratio switching, print-to-PDF, and 3x HiDPI PNG export. Use when the user wants to make Xiaohongshu cards, WeChat Moments share images, knowledge cards, quote cards, or convert notes/Markdown into shareable visual cards.

md-to-cards とは?

md-to-cards is a Claude Code agent skill that transform raw text, notes, articles, or Markdown into high-aesthetic, multi-theme shareable social media cards as a self-contained HTML studio with live theme/ratio switching, print-to-PDF, and 3x HiDPI PNG export. Use when the user wants to make Xiaohongshu cards, WeChat Moments share images, knowledge cards, quote cards, or convert notes/Markdown into shareable visual cards.

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/adrian147258/kkskill/tree/HEAD/md-to-cards

Installed? Explore more 画像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Markdown to Share Cards

Turn raw notes, articles, or Markdown into a polished, offline-ready HTML card studio using render_cards.py (Python 3.8+ standard library only).


Workflow

Step 1: Clarify Platform, Theme & Density

Identify or infer from the user's request:

  • Aspect Ratio: 3:4 (小红书 / 朋友圈竖图, default), 1:1 (方形), 16:9 (横屏 / 封面), or long (长图).
  • Theme (17 built-in themes):
    • Classic: editorial (极简杂志风, default), paper (暖色手账风), obsidian (暗黑极客风), matcha (清新抹茶风), swiss (瑞士海报风)
    • Modern UI & Layout: glassmorphism (玻璃拟态), bento (便当盒布局), neumorphism (新拟态), split (分屏构成风)
    • Expressive & Editorial: brutalism (粗野主义), neobrutalism (新粗野主义), y2k (Y2K千禧未来主义), collage (拼贴风), handdrawn (手绘插画风), memphis (孟菲斯风), monochrome-photo (黑白摄影排版风), botanical (自然生态风)

If the user provides a long article or rough notes, read design-guide.md before writing the card Markdown so every slide has balanced whitespace and zero overflow.

Step 2: Structure Content into Card Markdown

Create or refine a .md file with:

  • YAML frontmatter (title, subtitle, author, tag, theme, ratio, footer)
  • Standalone --- lines separating cards
  • Rich Markdown elements (## headings, concise lists, ==highlight==, > [!TIP] / > [!NOTE] / > [!WARN], code blocks, tables)
  • Optional card directives (<!-- type: quote -->, <!-- type: ending -->) for visual rhythm

See sample-post.md for a complete reference layout.

Step 3: Render the HTML Card Studio

Run the zero-dependency renderer:

python scripts/render_cards.py "<input.md>" -o "<output.html>" --theme editorial --ratio 3:4

Step 4: Verify & Guide the User

Confirm <output.html> was generated and report the card count, theme, and ratio. Let the user know they can open <output.html> directly in any browser to:

  • Switch between all 17 themes and 4 ratios live in the top toolbar (including quick ← 上一套 / 下一套 → cycling)
  • Toggle 网格预览 / 单张聚焦 (with keyboard ← / →)
  • Click 导出 PNG (single card) or 全部导出 PNG for 3× HiDPI images, or 打印 / 导出 PDF

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

関連スキル