Skip to content

NimaChu/mp-article

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mp-article

mp-article: Review, Illustrate, Format, Publish

A Codex-customized WeChat Official Account article workflow that combines review, illustration, layout, and publishing in one skill.

Give Codex an existing Markdown article. mp-article preserves the author's voice, prepares matching visuals, formats the complete article for WeChat, and publishes it directly to the configured draft box.

Four-In-One Workflow

1. Article Review

  • Treats supplied articles as finished copy instead of rewriting them
  • Checks structure, image opportunities, and publishing metadata
  • Verifies current claims conservatively
  • Changes a factual claim only after direct contradictory evidence is found and the user approves the correction

2. Illustration

  • Uses Codex built-in image generation by default
  • Creates a horizontal cover that expresses the article title
  • Adds ordinary illustrations that match nearby paragraphs and the article tone
  • Creates infographics that replace suitable tables, processes, timelines, or information-heavy text blocks

3. WeChat Layout

  • Adds title, author, summary, and cover metadata
  • Places images at contextually relevant positions
  • Avoids duplicated text when an infographic already carries the information
  • Renders Markdown with WeChat-friendly themes and uploads inline images

4. Draft Publishing

  • Runs a dry validation before publishing
  • Uses the WeChat Official Account API by default
  • Uploads the cover and inline images automatically
  • Saves directly to the configured draft box
  • Never mass-sends

Install

Place this repository at:

~/.codex/skills/mp-article

Install script dependencies:

cd ~/.codex/skills/mp-article/scripts
bun install

Configuration

Keep credentials outside this repository. Configure one or more Official Accounts in:

~/.baoyu-skills/mp-article/EXTEND.md

Legacy nima-wechat-draft-publisher and baoyu-post-to-wechat configuration paths remain supported.

See references/wechat/config/first-time-setup.md for the full configuration format.

Publish Through The API

bun scripts/wechat-api.ts path/to/article.md \
  --theme default \
  --cover path/to/cover.png

Validate without uploading:

bun scripts/wechat-api.ts path/to/article.md \
  --theme default \
  --cover path/to/cover.png \
  --dry-run

Browser Fallback

bun scripts/wechat-article.ts \
  --markdown path/to/article.md \
  --theme default

See SKILL.md for the complete Codex workflow.