# Cmm Visual Production

> Use this CMM skill to plan visual production for content packages, including WeChat covers, Xiaohongshu/Rednote card sets, article illustrations, social cards, thumbnails, layout specs, and image prompts. It directly creates visual_plan and visual_package contracts with CMM asset specs, prompts, and quality gates, while treating legacy visual skills only as optional approved execution backends. T…

- **Type:** Skill
- **Install:** `agentstack add skill-chemny-cmm-content-factory-cmm-visual-production`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [chemny](https://agentstack.voostack.com/s/chemny)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [chemny](https://github.com/chemny)
- **Source:** https://github.com/chemny/cmm-content-factory/tree/main/skills/cmm-visual-production

## Install

```sh
agentstack add skill-chemny-cmm-content-factory-cmm-visual-production
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# CMM Visual Production

`cmm-visual-production` is the visual routing layer in the CMM content factory.

It consumes a `content_package`, creates a `visual_plan`, and produces visual
asset specs, prompts, layout guidance, and quality checks. After user
confirmation, an approved backend can render or generate the assets. Its final
artifact is a `visual_package`.

## Boundary

Use this skill for:

- Planning visual assets for platform drafts.
- Deciding whether the content needs a cover, article illustrations, social
  cards, Xiaohongshu images, thumbnails, or prompts.
- Producing asset specs, image prompts, layout notes, and quality gates.
- Selecting an optional execution backend after confirmation.
- Producing a structured `visual_package` for publishing workflows.

Do not use this skill to:

- Write the content draft.
- Render or generate images without confirmation.
- Patch or modify generated bitmaps.
- Publish or upload assets to external platforms.

## Generation Boundary

This skill plans visuals and produces a `visual_plan` / `visual_package`
(covers, body illustrations, social cards, Xiaohongshu card sets). Actual image
generation is performed by `cmm-image-creator` after confirmation — and that
confirmation **must include the locked 文案三件套**(标题/正文/图上要印的逐字文案)；
生图前置确认门见 `cmm-image-creator/SKILL.md` →「生图前置确认门」(硬规则)。All visual
methods (illustration framework, density tables, platform specs, card layouts)
are internalized in this skill's `references/` and `templates/` — no external
skill is required.

For WeChat covers, readable baked-in title text is mandatory. Do not plan or
accept a cover whose policy is `no baked text`, `title handled by metadata`,
`无字底图`, `无文图`, or any equivalent no-text cover. Image content and text
must be generated by the approved image-generation backend. Do not plan local
drawing, deterministic text rendering, overlays, screenshot edits, or manual
bitmap painting as a fallback for content/text. If generated text is wrong,
unreadable, or malformed, the asset must be regenerated through the image model.
Local resize/crop/pad is allowed only as platform-size normalization after
generation, with no text/content changes and with a recorded review gate.

### When to route here vs straight to `cmm-image-creator`

Mirror of the video line's planner/executor split (see `cmm-video-production`):

- **`cmm-visual-production` = decide & spec.** Use it when there is a real visual
  decision: choosing layout/format, building a card-set or cover *system*, or when
  a reviewable `visual_package` is wanted before generating.
- **`cmm-image-creator` = generate.** When the output form is already fixed — a
  single image at a known size, a one-off cover, or **reusing/regenerating a
  finished card** — the agent may call `cmm-image-creator` **directly**; it accepts
  either a `visual_plan` spec or a direct prompt.

Don't force the extra hop through this layer for an obvious single-image job.
When this layer runs, it hands `cmm-image-creator` the asset spec to **consume**.

## Input

Preferred input is a `content_package` from `cmm-content-writing`:

```yaml
content_package:
  plan_id: ""
  platform: ""
  format: ""
  title: ""
  body_markdown: ""
  summary: ""
  variants: []
  sources_used: []
  visual_needs: []
  video_needs: []
  publish_notes: ""
  fact_check_status: pending
  status: draft
```

If `visual_needs` is empty, infer only the minimum useful assets from platform
and format. Do not overproduce images.

For WeChat article body images, no count recommendation may be made before the
body-image count gate is computed. First report the article body character
count, the matching row from `article-illustration-method.md`, the minimum
required body images, the recommended count, and whether the proposed plan needs
a waiver. Only then choose image jobs and placements. A compact article, a strong
single workflow, or an aesthetic preference is not a valid reason to skip this
gate.

Read `references/visual-package-contract.md` for exact fields. Read
`references/visual-method.md` for platform asset rules, prompt structure,
image-generation routing, and quality checks. Read
`references/article-illustration-method.md` whenever planning body
illustrations for an article (功能分类、位置触发器、来源路由、illustration_map)。
Read `references/platform-image-specs.md` for exact per-platform dimensions and
`references/wechat-visual-style.md` plus `templates/` for WeChat article
layout and body-illustration patterns.

Before building a `visual_plan`, resolve the upstream
`content_plan.style_selection`: load the visual template from
`cmm-content-factory/references/styles/visual/.yaml` and the layout
template from `cmm-content-factory/references/styles/layout/.yaml`. Their
palette, fonts, image tone, generation avoid-lists, layout text/table/image
rules, and consistency rules are mandatory constraints for asset specs,
prompts, and article layout. Visual and layout temperature must match per
`styles/selection-rules.md`.

## Workflow

1. Validate the `content_package`.
2. Determine platform requirements:
   - aspect ratio
   - number of assets
   - cover vs body illustration vs card set
   - whether screenshots or user-provided images are required
3. Build a `visual_plan`.
4. For card sets, build a `card_text_map` that binds each card to title,
   body copy, source section, and caption role.
5. Build asset specs, rendering policy, post-render checks, and final image
   prompts.
6. Ask for confirmation before invoking any image-generation or rendering skill.
7. Route to an approved backend only after confirmation.
8. Preserve prompt files and asset paths in `visual_package`.
9. Run or record quality checks.
10. Stop before publishing.

## Routing

| Need | CMM output | Execution after approval |
|---|---|
| WeChat cover pair, editorial social cards, polished carousel, screenshot-heavy post | `wechat_cover_pair` or `social_card_set` | built-in card layout + `cmm-image-creator` |
| Single article/blog/concept cover image | `cover` | `cmm-image-creator` |
| Article body illustrations, diagrams, comparisons, flowcharts, infographics | `article_illustrations` | built-in illustration method + `cmm-image-creator` |
| Xiaohongshu/Rednote image card series, knowledge cards, checklist cards | `xhs_card_set` | built-in card layout + `cmm-image-creator` |
| Raw image generation (any runtime) | `generated_image` | `cmm-image-creator` (prefers native runtime image generation, falls back to configured third-party APIs after approval) |
| Prompt-only planning | `image_prompts_only` | none |

Routing rules:

- Use CMM asset specs for layout, typography, platform ratios, and visual
  packaging first.
- Use the built-in card layout method when layout, typography, platform ratios,
  or visual packaging matter more than raw image generation.
- Generate a standalone raster cover via `cmm-image-creator`.
- Use the built-in illustration method when the article body needs explanatory
  visuals tied to sections.
- Build a card series (social browsing) via the built-in card layout + `cmm-image-creator`.
- For Xiaohongshu/Rednote text-heavy cards, the final card image content/text
  must also come from the approved image-generation backend. Do not switch to
  local PIL/HTML rendering or manual bitmap composition for text/content.
  Platform-size normalization may use local resize/crop/pad only when it
  preserves the card content and is recorded for review.
- **Model selection is not decided here.** Hand `cmm-image-creator` the asset
  spec only — prompt, size/aspect-ratio, resolution (1K/2K/4K), role, and any
  reference image. Do **not** pass a provider/model from this layer;
  `cmm-image-creator` owns model scheduling: host-native first (Codex native
  image generation in Codex), then third-party fallback only when needed. The
  `optional_backend` / `provider_policy` fields in `visual_plan` should be left
  empty (or "auto") unless the user explicitly pins a provider for a specific
  asset.

## visual_plan

Before generation, output a plan:

```yaml
visual_plan:
  content_package_id: ""
  platform: ""
  required_assets:
    - asset_type: ""
      count: 1
      aspect_ratio: ""
      purpose: ""
      asset_spec:
        canvas: ""
        text_zones: []
        image_zones: []
        typography: ""
        color_direction: ""
      prompt: ""
      optional_backend: ""
      provider_policy: ""
      confirmation_required: true
  illustration_map: []   # 正文配图逐图登记,见 references/article-illustration-method.md
  card_text_map: []
  rendering_policy:
    preferred_renderer: ""
    text_rendering: ""
    generated_image_role: ""
  post_render_checks:
    required: true
    checks:
      - dimensions
      - minimum_font_size
      - text_overflow
      - overlap
      - safe_margin
      - mobile_readability
      - module_boundary
      - corner_marker
      - left_rail_absent
      - checklist_visibility
      - tag_inset
      - text_marker_alignment
      - design_quality
  source_images_needed: []
  style_direction: ""
  layout_notes: ""
  risks: []
  quality_gate:
    readability: ""
    platform_ratio: ""
    source_integrity: ""
    text_overflow: ""
    brand_safety: ""
    design_quality: ""
  status: pending_confirmation
```

## visual_package

After confirmed production, output:

```yaml
visual_package:
  content_package_id: ""
  platform: ""
  asset_type: cover
  visual_style:
    id: ""
    cover_source: ""
    illustration_source: ""
  body_image_count_gate:
    article_chars: 0
    article_type: ""
    minimum_required: 0
    recommended_count: 0
    planned_count: 0
    count_status: pass
    rationale: ""
    replacement_breakpoints: []
  body_image_count_waiver:
    required_count: 0
    planned_count: 0
    missing_count: 0
    waiver_reason: ""
    replacement_breakpoints: []
    reader_impact_assessment: ""
    user_confirmation_required: true
    user_confirmed: false
  image_text_lock:
    article_title: ""
    body_final_status: ""
    cover_text:
      title: ""
      subtitle: ""
    body_images: []
  asset_paths: []
  prompt_paths: []
  image_prompts: []
  layout_notes: ""
  style_notes: ""
  source_assets: []
  quality_notes: []
  post_render_report:
    cards:
      - card: 1
        path: ""
        dimensions: ""
        min_font_px: 0
        body_font_px: 0
        title_font_px: 0
        text_overflow: ""
        overlap: ""
        safe_margin_px: 0
        mobile_readability: ""
        module_boundary: ""
        corner_marker: ""
        left_rail_absent: ""
        checklist_visibility: ""
        tag_inset: ""
        text_marker_alignment: ""
        design_quality: ""
        needs_manual_review: false
    summary: ""
  quality_gate:
    readability: ""
    platform_ratio: ""
    source_integrity: ""
    text_overflow: ""
    brand_safety: ""
    design_quality: ""
  status: draft
```

Use `body_image_count_gate` for new WeChat tasks. `body_image_count_rationale`
is deprecated and must not be used as the only count record. If planned body
images are below the minimum from `article-illustration-method.md`, add
`body_image_count_waiver` and keep `user_confirmed: false` until the user
explicitly confirms the waiver in chat. Do not present an under-minimum plan as
the default visual plan; present it only as a waiver option next to the compliant
plan.

## Quality Gate

| Gate | Requirement |
|---|---|
| `readability` | Text is readable at mobile size. |
| `platform_ratio` | Aspect ratio and safe zones match target platform. |
| `source_integrity` | Visualized products, people, facts, and screenshots are sourced or marked for review. |
| `text_overflow` | No card/cover text overflows or collides with other elements. |
| `brand_safety` | Avoid misleading logos, unsupported claims, or unapproved impersonation. |
| `design_quality` | Visual hierarchy, spacing, information density, and card-to-card consistency are good enough for the target platform. |
| `style_consistency` | Assets follow the selected visual and layout templates: palette, fonts, cover template family, ratio per platform, and model-rendered text requirements. |

## Confirmation Rules

- Default behavior is plan first, generate second.
- Do not call image generation, Playwright rendering, or screenshot export until
  the user confirms the `visual_plan`.
- For WeChat article runs, the confirmation must include the final title, final
  body status, per-image text lock, cover text, and body-image placement/order.
  A broad instruction such as "发到草稿箱" is not enough to approve unseen
  image text or layout.
- If the user explicitly says "直接生成", "不用确认", "跳过确认", or equivalent,
  state the assumptions before generation. This shortcut cannot bypass the
  WeChat cover-text requirement or a stricter upstream factory preview gate.
- Preserve prompt files whenever the routed skill requires them.
- If a routed legacy skill has its own stricter confirmation rule, follow the
  stricter rule.

## Stop Conditions

Stop and ask before:

- Generating paid image assets.
- Fetching web images for current products or people.
- Publishing/uploading images externally.
- Replacing existing visual assets.

## Source & license

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

- **Author:** [chemny](https://github.com/chemny)
- **Source:** [chemny/cmm-content-factory](https://github.com/chemny/cmm-content-factory)
- **License:** MIT

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

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-chemny-cmm-content-factory-cmm-visual-production
- Seller: https://agentstack.voostack.com/s/chemny
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
