agentleFS
jhwrealjhwreal/wechat-article-pipeline-skill/wechat-article-pipeline/SKILL.md

wechat-article-pipeline

Skill24 starsChanged 55 days agoMITView on GitHub

Use when producing Chinese WeChat/公众号 article packages, checking articles on "检查" or "检查一下", editable workbenches, image planning, WeChat draft API delivery, Toutiao/Xiaohongshu Chrome sync, three-platform drafts, or explicit "打开秘书模式" requests.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. zacktian89/ai-writer-skill★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create/check local articles.

    line 8
  2. Distinctive:

    When the user asks to annotate a term, follow annotations.md: use “(注1)” in the text and numbered explanations in a final appendix.

    line 13
  3. Distinctive:

    Read writing-donts.md before drafting or revising.

    line 14
  4. Very specific:

    If the user asks to导入草稿箱, create a WeChat draft through official APIs only.

    line 21
  5. Distinctive:

    Keep artifacts in the workspace unless directed otherwise:

    line 29
  6. Very specific:

    Never leave final assets in temp or $CODEX_HOME/generated_images.

    line 40
  7. Very specific:

    Place visual placeholders in the markdown only when images are desired: cover, body-1, body-2, ..., closing.

    line 46
  8. Distinctive:

    Follow image-production.md: single-pass queue, currently available worker slots, strict 3:2 visuals.

    line 61
  9. Very specific:

    Run verify_wechat_article_package.py <workspace>/files/<slug>.html.

    line 63
  10. Distinctive:

    Follow delivery.md: editable delivery needs verified URL then HTML.

    line 64
  11. Distinctive:

    Before platform writes, follow pre-publish-check.md: automatically check unchecked articles unless explicitly skipped.

    line 115
  12. Very specific:

    Read publishing.md before WeChat API calls.

    line 117
  13. Distinctive:

    Delete Markdown, images, jobs, manifests, or support files only with explicit permission.

    line 126
  14. Very specific:

    Do not install dependencies, modify agent config, switch accounts, or edit .env credentials unless the user explicitly approves that action.

    line 127
  15. Distinctive:

    No nested agent runtimes or custom API runners for normal images.

    line 128
  16. Very specific:

    Keep cover.png; crop previews never replace it.

    line 129
  17. Distinctive:

    Do not use Xiaohongshu creator-platform private APIs, Cookie export, localStorage export, token extraction, or request replay for delivery.

    line 131
  18. Distinctive:

    Read .env.example only for requested API setup.

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WeChat Article Pipeline

Create/check local articles. Create external drafts or publish only when requested.

Core Decisions

  • For article "检查" or "检查一下", read Check Mode before drafting. Report findings and improvements; edit only when requested. Respect narrower checks.
  • When the user asks to annotate a term, follow annotations.md: use “(注1)” in the text and numbered explanations in a final appendix.
  • Read writing-donts.md before drafting or revising; check articles against it before delivery, repackaging, or publishing, preserving its contextual scope and user-text rules.
  • Select sparse pull quotes while drafting; follow Focus Review for full checks and delivery, including missing-quote suggestions.
  • Require the first Markdown H1 as the sole title; rename there.
  • Enable secretary mode only on explicit "打开秘书模式", for this request; read style-guide.md. Do not mention it unless asked.
  • Infer briefs from rough ideas. Integrate additions and corrections as reader-facing prose per workflow.md, preserving explicit verbatim instructions and quotations.
  • For "不配图", "只排版", or "直接格式化", use the no-image path. If image generation is unavailable, follow the capability fallback in image-production.md; do not silently drop requested images.
  • For 补图, continuation, or missing assets, use the missing-image path; preserve finished images.
  • If the user asks to导入草稿箱, create a WeChat draft through official APIs only. Never use browser automation or private mp.weixin.qq.com endpoints for delivery.
  • Toutiao: use Computer Use to operate the user's real Chrome end to end and follow publishing-toutiao.md. Do not use Browser/Chrome browser automation, Playwright, CDP, DOM evaluation, or background tab objects for any Toutiao UI step.
  • Toutiao publish authorization: a user-authored instruction to “发头条”, “发布头条”, or schedule a Toutiao post is already the confirmation to submit that same content to Toutiao at the stated time. Do not ask for a second publish confirmation in the same workflow; pause only when a material choice is missing or changed, or for CAPTCHA, authentication, or a platform hard blocker.
  • Xiaohongshu: use Chrome + Computer Use and publishing-xiaohongshu.md.
  • Three-platform sync: read publishing-three-platform.md, initialize its state, then create WeChat → Toutiao → Xiaohongshu drafts.

Workspace Contract

Keep artifacts in the workspace unless directed otherwise:

  • markdown: <workspace>/files/<slug>.md
  • check report: <workspace>/files/<slug>.check.md
  • optional heuristic output: <workspace>/files/<slug>.focused.md
  • image jobs: <workspace>/files/<slug>.image-jobs.json
  • HTML workbench: <workspace>/files/<slug>.html
  • job: <workspace>/files/<slug>.job.json
  • optional publish manifest: <workspace>/files/<slug>.publish-manifest.json
  • images: <workspace>/image/<slug>/cover.png, body-*.png, closing.png

Never leave final assets in temp or $CODEX_HOME/generated_images.

Default Article Path

  1. Inspect files/ and image/ before choosing a slug.
  2. Draft and select focus marks in Markdown using workflow.md and style-guide.md.
  3. Place visual placeholders in the markdown only when images are desired: cover, body-1, body-2, ..., closing.
  4. Plan once:
python3 <skill>/scripts/postprocess_wechat_article.py \
  <workspace>/files/<slug>.md \
  <workspace>/files/<slug>.html \
  --workspace <workspace> \
  --article-slug <slug> \
  --jobs-out <workspace>/files/<slug>.image-jobs.json \
  --no-focus-marking \
  --support-dir <workspace>/files/wechat-article-pipeline/<slug> \
  --plan-only
  1. Follow image-production.md: single-pass queue, currently available worker slots, strict 3:2 visuals.
  2. Rerun without --plan-only to build the package. Add --publish-manifest only for requested API draft handoff.
  3. Run verify_wechat_article_package.py <workspace>/files/<slug>.html; fix failures and complete Focus Review.
  4. Follow delivery.md: editable delivery needs verified URL then HTML; static delivery needs files.

WeChat clipboard output excludes the first Markdown H1 (article title), starting at the cover when present; keep the signature and body headings. Preview and source retain the title.

Mount only the active platform preview from the sole Markdown source. Cache semantic HTML; embed images only while copying.

Fast Paths

No-image formatting:

python3 <skill>/scripts/postprocess_wechat_article.py \
  <workspace>/files/<slug>.md \
  <workspace>/files/<slug>.html \
  --no-images \
  --no-focus-marking \
  --support-dir <workspace>/files/wechat-article-pipeline/<slug>

No-body-image draft delivery:

python3 <skill>/scripts/postprocess_wechat_article.py \
  <workspace>/files/<slug>.md \
  <workspace>/files/<slug>.html \
  --no-images \
  --no-focus-marking \
  --publish-manifest \
  --cover-image <workspace>/image/<slug>/cover.png

No-image WeChat drafts still need one cover for thumb_media_id; keep it out of the body.

Missing-image jobs only:

python3 <skill>/scripts/postprocess_wechat_article.py \
  <workspace>/files/<slug>.md \
  <workspace>/files/<slug>.html \
  --workspace <workspace> \
  --article-slug <slug> \
  --jobs-out <workspace>/files/<slug>.image-jobs.json \
  --no-focus-marking \
  --missing-only \
  --plan-only

Generate listed images; package without --missing-only.

Publishing Path

Before platform writes, follow pre-publish-check.md: automatically check unchecked articles unless explicitly skipped. Report findings; continue authorized delivery without pending content decisions. Do not ask permission to check. Record only completed checks.

Read publishing.md before WeChat API calls. Dry-run first. First draft consumes its issue. Later same-conversation, same-slug drafts use --same-session-revision: reuse its saved signature; no advance. Never publish/group-send by default.

Inspect every live WeChat API result immediately. On 40164 or an IP-allowlist error, stop the entire delivery chain: do not retry, upload, package, or continue to Toutiao/Xiaohongshu. Report the outbound IP, ask the user to allowlist it, end the turn, and resume only after acknowledgment.

For Toutiao and Xiaohongshu, load their publishing reference before the first browser write. Follow each platform’s handoff, verification, submission latch, and recovery limits. Never repeat a possible final submission.

Safety Rules

  • Overwrite existing packages only when requested for that slug/file.
  • Delete Markdown, images, jobs, manifests, or support files only with explicit permission.
  • Do not install dependencies, modify agent config, switch accounts, or edit .env credentials unless the user explicitly approves that action.
  • No nested agent runtimes or custom API runners for normal images.
  • Keep cover.png; crop previews never replace it.
  • Enable Toutiao 头条首发 only with confirmed eligibility.
  • Do not use Xiaohongshu creator-platform private APIs, Cookie export, localStorage export, token extraction, or request replay for delivery.
  • Publish no external hyperlinks in WeChat, Toutiao, or Xiaohongshu bodies. Keep source names plain; evidence links go in reports/support files.

Acceptance Checklist

Confirm:

  • artifacts stay under the workspace, share one slug, contain every requested 3:2 visual, and leave no unresolved {{visual:*}}
  • verify_wechat_article_package.py reports status: ok; delivery matches delivery.md, including a reachable server for editable workbenches
  • Markdown uses relative image paths; all previews derive from it and preserve semantic headings and image positions
  • Toutiao manual copy must not require a WeChat draft: use complete HTTPS receipts when available, otherwise embed all original images (including GIF), never loopback image URLs. Verify target-editor uploads before claiming delivery; Xiaohongshu embeds images during copy
  • Toutiao uses only Computer Use against the real foreground Chrome, with one workbench copy and one system paste; Xiaohongshu keeps its own documented handoff. On a hard gate, preserve the diagnostic draft and stop
  • delivery reports result paths, status, verified structure/images, and any public URL; platform bodies contain no external links
  • added or revised prose stands alone for readers without chat residue, respecting requested verbatim text and quotations

References

  • Drafting: workflow.md, style-guide.md.
  • Images: image-production.md, image-rules.json.
  • Contracts: job-schema.md.
  • Delivery: publishing.md, publishing-three-platform.md, publishing-toutiao.md, publishing-xiaohongshu.md.
  • Debug workbench rendering only: wechat-md-workbench.template.v3.html.
  • Read .env.example only for requested API setup.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.