Space wechat layout

From SpaceZephyr/creator-buddy · View interactive version

Space wechat layout is an AI agent skill from the GitHub repository SpaceZephyr/creator-buddy. 微信公众号排版。Use when the user asks to turn an article, Markdown draft, longform post, essay, newsletter, review, or Chinese article into a WeChat Official Account-ready HTML layout with local preview, selectable Claude/OpenAI/Google-inspired styles, and a button to copy rich HTML for pasting into the We

How to use this skill

Skill file

微信公众号排版

Create a local HTML preview page that renders a provided article as WeChat-compatible rich HTML and includes a “复制 HTML” button. Preserve the article's meaning and content; only make light structural adjustments for layout readability.

公众号配图适配

定位:这是公众号「整篇视觉/排版」这一路——用户给文章内容,你输出可直接贴进公众号编辑器的 HTML 排版(复制 HTML 一键搬运)。是本集合里配图 Skill 的搭档:space-chart-image / space-text-logic-diagram 出单张配图,本 Skill 出整篇排版。

输出:默认 HTML(本 Skill 主路径)。需要把某个区块(如头图/金句卡)导出成图片时,对该区块截图导出 PNG,或交给 Codex/workbuddy 内置出图模型重绘。

内容不改写:只做排版层面的轻调整,保留全部事实、顺序、引用、结论。

Workflow

  1. Collect the article
  1. Ask for style
  1. Prepare the content
  1. Build the local preview
  1. Copy behavior
  1. WeChat HTML constraints
  1. Verify

Output Shape

Create or update files in the current project. For a plain static page, use:

wechat-layout-output/
├── index.html
└── assets/        # only if local images are needed

For an existing app, update the app's normal entry files and keep the server URL unchanged when feasible.

Default Preview Shell

The preview page should include this behavior, adapted to the project:

async function copyArticleHtml(articleNode, statusNode) {
  const html = articleNode.innerHTML;
  const text = articleNode.innerText;
  try {
    await navigator.clipboard.write([
      new ClipboardItem({
        "text/html": new Blob([html], { type: "text/html" }),
        "text/plain": new Blob([text], { type: "text/plain" }),
      }),
    ]);
    statusNode.textContent = "已复制 HTML,可以粘贴到公众号正文区域。";
  } catch {
    const range = document.createRange();
    range.selectNode(articleNode);
    const selection = window.getSelection();
    selection.removeAllRanges();
    selection.addRange(range);
    document.execCommand("copy");
    selection.removeAllRanges();
    statusNode.textContent = "已用兼容模式复制当前预览内容。";
  }
}

Final Response

Tell the user:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.