AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Cmm Typesetting

skill-chemny-cmm-content-factory-cmm-typesetting · by chemny

Use this CMM skill to typeset finished article drafts into WeChat-compatible publish HTML (long-form line) OR into XHS card sets (card line). Long-form uses blocks.yaml + render_wechat.py plus CJK punctuation preflight and optional theme-gallery review. Card line uses card_text_map.yaml + render_card.py (3 templates: xhs-quick-knowledge / xhs-checklist / xhs-quote-poster, 9 skins total). Use when…

No reviews yet
0 installs
20 views
0.0% view→install

Install

$ agentstack add skill-chemny-cmm-content-factory-cmm-typesetting

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-chemny-cmm-content-factory-cmm-typesetting)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Cmm Typesetting? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

CMM Typesetting

cmm-typesetting is the typesetting station of the long-form (长图文) production line. It consumes a finished draft (content_package body + illustration_map assets) plus style_selection.layout, and produces WeChat-ready HTML.

Boundary

Use this skill for:

  • Mapping a finished article into a semantic block sequence (blocks.yaml).
  • Rendering publish.html / preview.html with a theme + components.
  • Running layout checks (paragraph length, visual breaks, component density,

WeChat-risk styles).

Do not use this skill to:

  • Write or edit article content (cmm-content-writing).
  • Plan or generate images (cmm-visual-production / cmm-image-creator).
  • Publish or create platform drafts (cmm-publishing).

Workflow

  1. Inputs: draft markdown (with [插图] placeholders resolved against

illustration_map), theme id from style_selection.layout, user profile (~/.cmm/profile/) for footer_cta ritual text.

  1. CJK punctuation preflight before mapping. Run the checker in non-writing mode

first:

python3 {baseDir}/scripts/cjk_punctuation_check.py draft.md --check

If it reports issues, preview the fix:

python3 {baseDir}/scripts/cjk_punctuation_check.py draft.md

Only run --write after the user approves editing the source file. If source edits are not approved, record the punctuation issue in the handoff notes and continue from an explicitly copied/temporary draft.

  1. Semantic mapping (the agent does this): read

references/wechat-components.md (content-feature → component table, C1 final rules, density discipline) and references/blocks-contract.md, then write blocks.yaml. Do not hand-write HTML.

  1. Deterministic render:
python3 {baseDir}/scripts/render_wechat.py --blocks blocks.yaml --out-dir ./typeset [--theme wechat-claude]
  1. Read report.json. Fix fail items by editing blocks (split paragraphs,

add breaks); judge warn items (gradient/negative-margin risks need the one-time WeChat paste test).

  1. Optional theme-gallery review when the user is choosing style, complains the

look is wrong, or the content has no pinned layout:

python3 {baseDir}/scripts/render_theme_gallery.py --blocks blocks.yaml --out-dir ./typeset-gallery --open

This renders the same article through the curated WeChat theme set and writes gallery.html for visual selection. Once a theme is selected, re-render the final package with render_wechat.py and record the chosen theme.

  1. Preview gate: open the rendered HTML and cover image for user review before

handing off to cmm-publishing:

open ./typeset/publish.html
open 

Tell the user the output paths. Wait for explicit confirmation before proceeding to step 8. For WeChat long-form runs, this confirmation must cover title, final body, cover text, cover image, body-image placement/order, and whether to create the platform draft-box item. A user's earlier instruction to "publish to draft box" sets the target, but does not approve the unseen preview.

  1. Hand publish.html + assets to cmm-publishing.

References

  • references/blocks-contract.md — blocks.yaml schema and commands.
  • references/wechat-components.md — 15 components, selection rules, C1 final,

WeChat compatibility preflight, and xiaohu-style practical container mapping.

  • references/themes/wechat/ — 公众号长文排版规格卡 (fits/signature/text rules);

references/themes/xhs/ — 小红书卡片布局规格卡。模板唯一事实源见 cmm-content-factory/references/registry/(role wechat / xhs-card)。

  • references/skins.yaml — per-theme color tokens + behavior flags; the

renderer builds all element styling from these tokens (CMM-native, self-contained). minimal themes auto-reduce decoration.

Theme Quick Map

实用系: tech-blue(教程) business-navy(商务) tech-simple(开发者) claude(AI暖,宋体衬线) warm(暖系:奶油底+黏土橙+纤细) 阅读系: deepread(叙事长文默认) medium(博客) clean-column(随笔) 杂志系: latepost(深度报道, C1-D) hische(西式杂志, C1-D) 特殊系: conference/发布会(产品感灰正文, minimal) elegant(中式书卷) kenya(极致留白, ≤800字)

Selection comes from style_selection.layout (cmm-content-factory/references/styles/selection-rules.md); a same-turn user instruction overrides.

Card Line (图文卡片)

Three templates for XHS 3:4 cards (750×1000px):

| Template | Fits | Skins | |---|---|---| | xhs-quick-knowledge | tool overview, AI news, insight summary | cool / warm / neutral | | xhs-checklist | step tutorial, how-to, N件事 | green / blue / purple | | xhs-quote-poster | key quotes, opinion closer, series ender | ink-white / dark-warm / paper |

Agent writes card_text_map.yaml per references/card-text-map-contract.md.

python3 {baseDir}/scripts/render_card.py --input card_text_map.yaml [--skin warm] --out-dir ./out

Output: preview_cards.html (50% scaled, all cards), report_cards.json. Samples: ~/.cmm/samples/cards/demo-*.yaml.

XHS 图片生成注意事项

topic_context 字段:如果话题名称存在歧义(例如"循环工程"可能被图像模型误读为"编程循环"),在 card_text_map.yamlmeta 节下添加 topic_context 字段,用一句话澄清正确含义。该字段会注入每张卡片的图像生成提示词。

anchor 图片尺寸限制:用前一张卡片的输出作为下一张的参考图(anchor)时,大图片经 base64 编码后作为 jq 参数传递会触发 shell Argument list too long 报错。遇到此情况,为受影响的卡片单独建一个不含 anchor 引用的 yaml 文件,跳过 anchor 单独生成即可。

Stop Conditions

  • Never publish or push to platforms; output stays local.
  • If the draft has unresolved [插图] placeholders, render them as pending

boxes and list them in the handoff notes instead of inventing images.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.