One-click WeChat Official Account AI content pipeline — from topic selection to publishing, 8 sub-skills linked.
Suite Description ·
aws-wechat-article-*9 slugs in total:main / topics / writing / review / formatting / images / publish / assets, plusaws-wechat-sticker. Cross-skill relative references depend on the sameskills/root directory; recommendedclawhub syncto install all at once. Source code:https://github.com/aiworkskills/wechat-article-skills
Agent Execution: determine that the directory containing this SKILL.md is {baseDir}。
Capability Disclosure (Capabilities)
This skill is theorchestration entry, and the ones that actually call external APIs are the sub-skills (writing / images / publish / sticker / review). This entry itself only runs validate_env.py:
- Credentials: read
aws.enveach*_API_KEYandWECHAT_{N}_*,only verifies that keys exist and are non-empty, values are not used for any network request - Network: this entry has no outbound;sub-skills have outbound, see their respective capability disclosures
- File read/write:
.aws-article/, this article'sarticle.yaml - shell: only
{python} {baseDir}/scripts/validate_env.py
The overall suite will call external LLM, image, and WeChat APIs, and will send the API key and this article's content externally when called.
When only main is installed, environment validation can still be done; entering the pipeline will fail due to missing sub-skills and file not found。
Configuration Check ⛔ BLOCKING
Before entering "Global Account Constraints," "Article Preparation," and the content pipeline, you must follow First-Time Guide to complete the "Detection Order" in full — determine OS, detect {python}, check the two configuration files, run validate_env.py, create the preset directory. If any step failsdo not continue。
That document is also thesolesource of failure guidance and behavioral constraints (do not act on your own initiative, do not request keys), and this file will not repeat it.
Three key points to state once here:
publish_methoddefaults todraft(publish.py fullonly writes to the WeChat Official Account draft box). Only when the user explicitly requests "publish it" should you changepublished, or temporarily usefull --publish。- User explicitly does not connect WeChat → first set
publish_method: nonethen pass validation, after whichfullwill be skipped directly. - Writing / image models are optional, when missing only warn, do not block.
Main configuration files (do not mix them up)
| File | Location | Purpose |
|---|---|---|
aws.env |
repository root | only stores keys:*_API_KEY、WECHAT_N_APPID / WECHAT_N_APPSECRET(for key names see references/env.example.yaml) |
.aws-article/config.yaml |
inside the repository | account-level non-secret configuration: writing style, topic selection boundaries, model endpoints, WeChat slots, and publish_method(template see references/config.example.yaml) |
article.yaml |
this article's directory | this article's publishing metadataand status:image_source(generated / user)、publish_completed(create new false, after the publishing loop closes true) |
See the field descriptions in articlescreening-schema.md。
Interaction order
Complete the previous step before proceeding to the next. At each step, if required input is missing (directory, metadata, topic, user choice, publishing intent), first ask the user and obtain confirmation; unless the user states that they are continuing based on a certain historical task, in which case judge from the intermediate artifacts which stage to enter.
1) Configuration self-check ⛔
Complete the detection order as described above,validate_env.py and only when the exit code is 0 and the preset directory has been created can you proceed to the next step.
- Exit code 0 + optional warnings → does not block, proceed directly to the next step, and must not require the user to first configure a writing/image model.
- Exit code 1(WeChat incomplete) → see branches.md section 3。
validate_env.pyDo not checkarticle_category/target_reader/default_author, those three items are checked in the next step.
2) Global account constraints ⛔
Open .aws-article/config.yamland check whether article_category、target_reader、default_author is non-empty after trim.
All three present → pass silently and proceed to the next step. If any is empty → see branches.md section 4: ask the user item by item, write back to the file after obtaining a response for the current round,filling in arbitrarily or inferring from elsewhere is prohibited。
3) Preparation for this piece
When it is unclear whether the user wants to continue writing or start anew, you must first ask, then enter the steps below.Prohibiteddefaulting to the most recently modified directory, running the writing script without confirmation, or assuming to reuse the previous round's path.
If the user directly gives a drafts/… path → follow branches.md section 1 "I already have a directory"。
When it involves the user's own business(product / software / service): first ls .aws-article/products/ check whether there is a relevant directory; if so, you must read the *.md under the root as the draft basis, and prioritize reusing existing images in images/ ; for business-introduction-type content produced during the process, proactively guide the user to save it back to .aws-article/products/{产品名}/. See assets skill。
Create a new piece (strict sub-order, do not skip steps)
-
Writing intent ⛔ BLOCKING: must clarifywhat this piece is about(topic, angle, genre, or goal). When the user only wants "help me come up with topics", you mustexplicitly confirmbefore handling it in no-direction mode. ⛔ Before the user answers this step,prohibited
web_search, prohibited from executing topics research, and prohibited from batch-generating topics or titles. If the user has already made it clear in the current conversation, a single verbal confirmation is sufficient; there is no need to repeatedly interrogate. -
Finalize topic and slug: determine the publishing title (the user chooses from candidates or customizes it), and generate the slug based on it; the directory name
YYYYMMDD-标题slug。 -
Create directory and
article.yaml: create{drafts_root}/YYYYMMDD-标题slug/(drafts_rootbased onconfig.yaml, defaultdrafts/)。 ⛔ must use{baseDir}/../aws-wechat-article-publish/scripts/article_init.pyto initialize, do not hand-write. Hand-writing will definitely miss fields — in an actual test, three consecutive pieces missedimage_medium, so the image medium's "avoid the previous piece" could never find anything. -
Write this piece's preset selections to disk (required): using
config.yamlas the source, according tocustom_* > default_*combined with this piece's topic, select for each of the following fields asingle presetand write it back toarticle.yamlasSingle-element list:default_structure、default_closing_block、default_title_style、default_format_preset、default_format_scheme、default_cover_image_style、default_sticker_style。⛔
default_article_image_styleis not included here; keep the multi-element candidate pool as-is—the main-text form isone selected per image slot, converging into a single form used for all images in the entire piece. In actual testing, all three articles were pinned to "comparison explanation," while the actual three images were evidence-based, flowchart, and flowchart.⛔ When choosing templates and color schemes, don't just look at names: first run
format.py --list-themes, match this article's topic against "suitable / unsuitable," then choose a tier based on the color scheme description.Also don't choose the same set for several consecutive articles—if several articles published on the same day all have the same template, color scheme, and cover form, readers will tell at a glance that a template was applied. Before starting, glance at the most recent articles:grep -h "^default_format_preset:" -A1 $(ls -d drafts/*/ | sort -r | head -3 | sed 's#$#article.yaml#') 2>/dev/nullFor handling continuation / re-entry, see Section 5 of branches.md。
-
Script output must always be written to disk ⛔: when invoking any script in this kit, redirect both stdout and stderr to the current article directory's
<环节>.log, and don't just watch the screen.{python} {baseDir}/../aws-wechat-article-images/scripts/image_create.py generate … \ > drafts/YYYYMMDD-slug/cover-generation.log 2>&1Agreed filenames:
cover-generation.log、image-generation.log、format.log、publish.log. These logs are the only evidence when problems occur,key information exists only inside them—that the endpoint ignored the ratio and cropped the cover in half, which file the template was loaded from, whether the color scheme was applied, which URL the main-text image was uploaded as; once it scrolls past on the screen, it's gone. In actual testing, it was only by relying oncover-generation.logthe line "centered crop at 2.35:1: 1024x1024 → 1024x436" that we pinpointed why the cover looked bad.
4) Content pipeline
选题 → 写稿 → 审稿(内容审) → 排版 → 配图 → 审稿(终审)
| Step | Sub-skill | Read | Output |
|---|---|---|---|
| Topic selection | topics | config.yaml、web_search |
topic-card.md research.md |
| Writing | writing | topic-card.md、config.yaml |
draft.md |
| Content review | review | draft.md、config.yaml |
review.md → article.md |
| Layout | formatting | article.md、config.yaml |
article.html |
| Image preparation | images | article.md、config.yaml |
imgs/、cover.* |
| Final review | review | article.html、imgs/ |
review.md |
⛔ The article.md final draft produced by content review must first satisfy review Step 5(end of document {embed:…}, BLOCKING) before layout.
topics / web_search may only be executed after 3-1 (the user has stated what to write, or has confirmed that only topic selection help is needed).
Confirmation rounds: when all three global keys are non-empty, pass silently;publish_method when legal, do not repeatedly interrogate; merge multiple items pending confirmation into one round. When user intent is clear, the ideal number of rounds is 1 round(confirm title/summary) + display after writing. When the user has no special requirements, image preparation follows the default style automatically and is not confirmed separately.
5) Publishing
Based on config.yaml 's publish_method :draft → publish.py full only writes to the drafts box;published or full --publish → then submit for publishing;none → full exits with no operation.
The first two tiers require WeChat credentials to be fully configured; it is recommended to first run publish.py check-wechat-env. After completion, output a summary and receipt, and move the directory as needed to published_root。
User says, "The images in the drafts box are unsatisfactory; I want to replace them and republish" → see Section 2 of branches.md。
Intermediate artifact gate ⛔
Before entering the next step, first check the artifacts required for this step; fill in whatever is missing,skipping steps and claiming completion is prohibited。
| Stage | Required artifacts | When missing |
|---|---|---|
| Writing completed | article.md exists and is non-empty |
Continue writing or return to writing |
| Layout completed | article.html exists, and is regenerated bycurrent article.md rerun |
Rerun formatting first |
| Images complete | Has cover.(png/jpg/jpeg/webp);article.md and article.html both do not contain placeholder |
Run images generation and replacement first |
| Ready to publish | article.yaml contains title/author/digest/content_source; publishing environment check passed |
Add metadata or environment first |
| Publishing closed loop | Publishing command succeededand receipt is available | only then is writing back allowed publish_completed: true |
Prohibitedto claim the entire process is complete based on a single signal alone (such as "draft created successfully"). When the body still has placeholder , the status must be marked as "draft submitted, body images incomplete".
Routing
When related to default and long-form publishing, prioritize main, orchestrated step by step by this skill; do not skip main and connect directly to a sub-skill just because the user said "write", "topic selection", or "publish".
When a sub-skill can be connected directly: the userexplicitly wants only that step's outputand does not imply the entire chain "from zero to published".
| User wording | Routes to |
|---|---|
| Start from 0, one-stop, complete process, help me publish an article, publish to WeChat Official Account, what should I write today (want it written and published), not sure which step to start from | main |
| "Can it be published" and includes publishing on behalf, or wants the entire finishing process from manuscript to publishing | main |
| Onlytopic card / title / summary / scheduling / series planning | topics |
| Onlywriting / rewriting / polishing / continuing on an existing topic or draft | writing |
| Onlyreview / proofreading / compliance checklist | review |
| Onlyformatting / changing theme / converting to HTML | formatting |
| Onlylong-form cover or body images | images |
| Onlyexecute publishing / submission / mass send | publish |
| image posts, image messages, multi-image push, nine-grid | sticker |
For ambiguous wording that may still require subsequent publishing, still start by asking from main. For the boundaries of single-step sub-skills, see branches.md section 6。
Branches and supplementary rules
All situations not on the main path are written in references/branches.md: existing directory branch, replacing images and republishing after publishing, handling exit code 1, how to ask when the global three keys are empty, preset handling for re-entry into continuation writing, and the boundaries of single-step sub-skills.