WeWrite — Main Entry for WeChat Official Account Content
Operating Principles
- By default, the content workflow runs continuously without pausing at each step. Confirmation at the topic selection and outline stages only occurs when the user specifies "interactive mode".
- Each article must use an independent task directory; overwriting another article's directory is strictly prohibited.
- The "write an article" command by default only delivers a reviewed local draft; image generation and publishing are not default actions.
- Image matching, typesetting, and publishing are independent actions performed after the main text is completed; image generation must not be automatically triggered for the sake of typesetting or publishing.
- "Full production" is a combined shortcut for main text, image matching, and local preview; the publish command may only be invoked when the user explicitly states "push to draft box/publish".
- If search fails, you may continue writing analysis and experience-based judgments, but must not present model memory as verified facts.
is the status directory returned by
.
is the directory of this skill. Deterministic operations use the
command.
Routing
| User Intent | Module |
|---|
| Reset style | |
| Topic selection only | |
| Article review | |
| Cover or supporting images | |
| Typesetting, preview, draft box, image post | |
| Learning & revision, sample essays, themes | |
| Data review | |
| Multi-platform rewriting | |
When the Skill tool is available in the environment, activate the skill with the same name; otherwise, fully read
from the sibling directory before execution.
Content Workflow
1. Create or Resume Task
First run
. Guide installation only if the command is missing or dependencies fail; a missing style file is a normal first-time setup, and the flow will redirect to
.
Select the mode based on the user's exact words:
bash
# Default "write an article": no image generation, no publishing
wewrite run start --topic "{topic, optional}" --mode draft --visual-mode none
# "Full production": complete main text first; add independent image matching and preview after main text is archived
wewrite run start --topic "{topic, optional}" --mode complete --visual-mode none
# "Push to draft box": user has explicitly authorized publishing, but no automatic image generation is triggered
wewrite run start --topic "{topic, optional}" --mode publish --visual-mode none
Write the diagnose flags and current date to the task:
bash
wewrite run update --patch '{"flags": {"skip_publish": false, "skip_image_gen": false, "use_writer_model": false, "needs_onboard": false, "diagnosed_at": "YYYY-MM-DD"}}'
If the user says "continue last time", first run
, confirm the unique task, then run
wewrite run resume <run_id>
; do not create a new task.
2. Topic Selection
If the user has already provided a topic, record it and skip the selection step; otherwise, execute
. After completion:
bash
wewrite run step topic completed
3-4. Article Brief, Evidence, and First Draft
Execute
. First save
and
, then save the first draft to
; all web materials are synchronously recorded in
of this task. The first draft is not the final version.
5. Editorial Review
Execute
. Facts, viewpoints, practicality, account voice, and readability are the main criteria; if repairable issues are found, directly revise the manuscript and conduct a re-review. The final text may only be written to
when the editorial decision is
and
shows
. Tool scores only indicate potential issues.
6. Archive Main Text
Execute immediately after confirming the article exists, the editorial review has passed, and the report has been saved:
This command archives the main text and sources and writes them to the history. After archiving, you can still add image matching, preview, and publishing results to the current article,
but must not rewrite the original main text.
Optional Follow-up Actions
A. Image Matching
- When the user says "add a cover", set to .
- When the user says "full image matching" or "full production", set to .
- Set to when the user only wants prompts; automatically downgrade to prompts if image configuration is missing.
- Execute . It can only generate independent images and copies with images, and must not overwrite .
Even if the article is already completed, use the current task directly; do not create a new writing task. Strictly comply with
and
.
B. Typesetting and Publishing
Execute
. It prioritizes typesetting the copy with images; if none exists, it typesets the original main text, and does not automatically call
. When the user explicitly requests publishing in this round, first run
wewrite run permission publish allow
;
when the user withdraws the request, run
wewrite run permission publish deny
. The article will only be pushed to the draft box when
and the publishing
configuration is available, and the cover exists; in all other cases, a local preview will be generated.
C. "Full Production" Shortcut
First complete the entire content workflow and archive the main text, then sequentially execute the
mode of
and
the local preview of
. It is a continuous invocation of three independent actions and does not grant publishing permissions.
Finally, inform the user of the title, original article path, path of the copy with images, number of sources, image/preview results, whether the article has been pushed to the draft box, and any downgrades that occurred.
Failure and Recovery
Record when a step fails:
bash
wewrite run step <topic|write|review|visual|publish> failed --error "brief reason"
When a content step fails, retain the current task, and only redo the failed or incomplete steps after the next resume. When the main text has been archived,
failure in image matching or publishing does not change the completion status of the article; if publishing fails, fall back to local preview, and if image generation fails, retain the prompts.
If search fails, delete specific numbers and quotes that cannot be verified.