| name | mage-article-pipeline |
| description | Runs an end-to-end article production pipeline: topic framing, source gathering, markdown drafting, Humanizer-zh rewriting, cover generation, article illustrations, watermarking, WeChat HTML conversion, WeChat draft publishing, Feishu archival, and review notification. Use when users ask to automate blog writing, auto-produce公众号文章, or build a full article workflow. |
Article Pipeline
mage-article-pipeline is a full article production workflow for blogs and WeChat articles. It turns a topic plus source material into a reviewed markdown article, reviewed images, WeChat-ready HTML, a WeChat draft, a Feishu archive, and an approval notification.
Script Directory
Determine this SKILL.md directory as SKILL_DIR, then use ${SKILL_DIR}/scripts/<name>.
| Script | Purpose |
|---|
scripts/watermark.js | Add text / logo / combo watermark to one image or a directory of images |
scripts/send-email.js | Send review or notification emails through SMTP using .mage-skills/.env |
scripts/archive-feishu.js | Create a Feishu doc from markdown and write archive metadata / open link |
scripts/render-review-email.js | Render a Chinese HTML review email that includes publish/archive status and the final article HTML |
Reference Loading Guide
Keep SKILL.md lean. Load only what the current step needs:
- Read
references/config/preferences-schema.md only when creating, validating, or editing EXTEND.md.
- Read
references/config/first-time-setup.md only when EXTEND.md does not exist yet.
- Read
references/workflow.md only when executing the full pipeline.
- Read
references/article-styles.md only when selecting or explaining article styles.
- Read
references/structure-templates.md only when generating outline and chapter structure.
- Read
references/review-gates.md only when running image QA or pre-publish QA.
- Read
references/watermark.md only when applying watermark settings or editing watermark preferences.
Workflow Summary
Article Pipeline Progress:
- [ ] Step 0: Load preferences (EXTEND.md)
- [ ] Step 1: Build article brief
- [ ] Step 2: Gather sources and user assets
- [ ] Step 3: Create outline
- [ ] Step 4: Draft markdown article
- [ ] Step 5: Humanize with Humanizer-zh
- [ ] Step 6: Generate cover with mage-cover-gen
- [ ] Step 7: Generate illustrations with mage-article-illustrator
- [ ] Step 8: Review every generated image with a multimodal LLM
- [ ] Step 9: Apply watermark
- [ ] Step 10: Pre-publish QA review
- [ ] Step 11: Convert markdown to HTML with mage-md-to-html
- [ ] Step 12: Push WeChat draft with mage-send-to-wechat
- [ ] Step 13: Archive HTML content to Feishu with `scripts/archive-feishu.js`
- [ ] Step 14: Send a Chinese HTML approval email with the final article content
Inputs
Support these inputs in one run:
- topic and angle
- target audience and goal
- article style
- source URLs
- pasted notes
- screenshots or reference images
- manual constraints such as must-cover sections, must-keep terminology, CTA, or watermark text
Core Rules
1. Keep clear chapter structure
For technical and tutorial articles, default to a clear structure with explicit sections such as:
- prerequisites / reader fit
- what it is
- what problem it solves
- hands-on setup or step-by-step practice
- pitfalls and troubleshooting
6.心得 / 方法论
- anti-degradation or long-term maintenance guidance
- summary and CTA
Load references/structure-templates.md when deciding the final outline.
2. User assets are first-class inputs
If the user provides screenshots, diagrams, shell outputs, notes, or personal observations:
- treat them as trusted source material
- incorporate them into the brief and article outline
- decide whether each asset should be quoted directly, summarized in text, or replaced by a cleaner generated illustration
- preserve important real-world details from these assets in the final article
3. Humanizer is on by default
After drafting the markdown article, call Humanizer-zh by default unless preferences or user instructions disable it. The goal is to reduce AI tone without changing technical facts, commands, or terminology.
4. Image QA is mandatory
After every cover or illustration generation, run an AI review before the image is accepted. Do not rely on OCR-only heuristics. Use a multimodal LLM review focused on:
- text corruption or garbled characters
- wrong labels
- fake UI micro-text
- layout overflow
- visually misleading diagrams
If any issue is found, revise the prompt and regenerate before continuing.
5. Pre-publish QA is mandatory
Before HTML conversion and publishing, run one final AI review covering:
- article structure completeness
- factual consistency against gathered sources
- title, summary, CTA, and metadata quality
- whether screenshots and generated illustrations are placed correctly
- whether watermark settings are correct
- whether any placeholder text or broken references remain
Load references/review-gates.md for the full checklist.
Dependencies
Required internal skills
mage-cover-gen
mage-article-illustrator
mage-md-to-html
mage-send-to-wechat
Expected external skills
If an enabled external skill is unavailable, install it automatically before continuing:
humanizer-zh: npx skills add https://github.com/op7418/humanizer-zh --skill humanizer-zh
feishu-doc is now optional. Prefer the built-in archival script for the default markdown-to-Feishu path. Only use feishu-doc when you explicitly need richer Feishu-specific operations beyond simple article archival.
Only stop if installation fails or preferences explicitly disable that step.
Preferences (EXTEND.md)
Check preferences in this order:
test -f .mage-skills/mage-article-pipeline/EXTEND.md && echo "project"
test -f "$HOME/.mage-skills/mage-article-pipeline/EXTEND.md" && echo "user"
If no file exists, run references/config/first-time-setup.md.
Important defaults include:
- article style
- structure template
- humanizer enabled
- image review enabled
- watermark settings
- WeChat theme
- publish mode
- Feishu archival
- email notification
Output Structure
Default output directory:
articles/YYYY-MM-DD/<slug>/
<output-dir>/
├── brief.md
├── sources.json
├── outline.md
├── article.md
├── qa/
│ ├── image-review.md
│ └── prepublish-review.md
├── assets/
│ ├── user-input/
│ ├── cover/
│ │ ├── original/
│ │ └── watermarked/
│ └── illustrations/
│ ├── original/
│ └── watermarked/
├── wechat/
│ ├── article.html
│ ├── published.html
│ ├── image-manifest.json
│ └── publish-result.json
├── feishu/
│ ├── article.html
│ ├── result.json
│ └── open-link.txt
└── notify/
├── review-email.html
└── email-result.json
Usage
Typical usage pattern:
/mage-article-pipeline
topic: OpenClaw 从入门到精深
audience: 开发者
goal: 教学 + 品牌建立
article_style: tutorial-deep
source_urls:
- https://example.com/post
user_assets:
- screenshots
- personal notes
Completion Report
At the end of the run, report:
- article title
- output directory
- whether Humanizer-zh ran
- cover result
- illustration result
- image QA result
- pre-publish QA result
- WeChat draft result
- published HTML result
- Feishu archive result
- approval notification result
If anything failed, report the exact step and the blocking dependency or artifact.