/cowrite:space-wechat-layoutfrom cowrite
Formats articles, Markdown drafts, or longform posts into WeChat Official Account-ready HTML with a local preview, selectable styles, and a copy-to-clipboard button.
Ships in cowrite. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
Collect the article
# heading or first strong title-like line. If unclear, ask for a title.Ask for style
Claude: warm off-white, calm editorial, restrained borders, generous whitespace.OpenAI: crisp white, black/gray, utilitarian documentation feel.Google: bright white, soft blue/green/yellow/red accents, modular cards.references/style-guide.md only when implementing the chosen style or when comparing styles.Prepare the content
Build the local preview
index.html when possible.复制 HTML button;max-width: 677px);Copy behavior
text/html and text/plain.document.execCommand("copy").复制 HTML or 复制到公众号.WeChat HTML constraints
border-radius: 8px or less unless the chosen style specifically needs smaller corners.section, h1, h2, h3, p, table, blockquote.max-height and overflow-y:auto; keep headings, score summaries, and conclusions outside the scroll window.Verify
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.
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 = "已用兼容模式复制当前预览内容。";
}
}
Tell the user:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/ai-writing-assistantAI-powered writing assistant for social media content creation. Provides six structured methods for writing, outlining, completion, inspiration, revision optimization, and material integration./article-batch-illustrationAnalyze a complete Markdown article, plan a restrained set of illustration positions, and generate consistent article images through Cowrite's bundled image-studio. Use for 整篇配图, 批量配图, 给文章配图, or pasted Cowrite full-page illustration commands./baoyu-xhs-imagesGenerates Xiaohongshu (Little Red Book) infographic series with 10 visual styles and 8 layouts. Breaks content into 1-10 cartoon-style images optimized for XHS engagement. Use when user mentions "小红书图片", "XHS images", "RedNote infographics", "小红书种草", or wants social media infographics for Chinese platforms.npx claudepluginhub spacezephyr/cowrite --plugin cowriteOther plugins' skills for the same job