Introduction¶
Producing stable articles for the Official Account involves several processes: finding topics, outlining, drafting, checking quality, rendering according to WeChat formatting requirements, adding images, and finally pushing to the draft box. Doing this manually requires constantly switching between several tools. Writing scripts to patch the pipeline yourself means handling logs, status management, and credential storage yourself.
dsh-wewrite solves this problem. It is a plugin for DeepSeek Harness (DSH) that productizes the entire pipeline above: one command to install, going from topic selection to the draft box in a local Web UI, using your own account for models and credentials, and data landing only locally.
What is it¶
dsh-wewrite is maintained by jerryjiao and is open source under the MIT license. One-sentence positioning: A DSH plugin that productizes the entire WeChat Official Account AI writing pipeline (topic → outline → draft → quality gate → rendering → images → draft box).
Environment: DSH v0.1.x developer preview, Node ^22.19.0 || >=24.0.0, prerequisite that npx @deepseek-ai/dsh runs on the machine.
Models do not need to be configured separately in the plugin; text generation directly uses DSH’s native model configuration (ctx.llm, i.e., the model configured in the DSH settings page), or provider/model can be overridden for a single run.
Core Features¶
Topic and AI Overview¶
Hot topics include Hacker News (uses official Algolia index, no key needed), and also support custom aggregators compatible with DailyHotApi. Opening a hot topic item, the plugin fetches the original text and generates a Chinese key-point overview. The fetch has three constraints: 8-second timeout, 2MB limit, only accepts text/html. If the original text cannot be fetched, it automatically degrades to title interpretation. The overview is cached by item daily.
6-Step Pipeline and Quality Gate¶
After selecting a topic, the pipeline automatically executes the six steps of Topic → Outline → Draft → Gate → Rendering → Images, with real-time visible progress. Drafts first pass the quality gate: content quality verification plus numbered image consistency verification. If the gate is not passed, the default push path is blocked—it can be edited and retried, or explicitly overridden.
Editor and WeChat Preview¶
Editing is done in a Markdown editor, with WeChat preview on the right; the preview HTML is byte-for-byte identical to the final push payload. Three layout themes: professional-clean / tech-dark / minimal-gray.
Use “AI Rewrite Selected” for local modifications: select a paragraph, give a one-sentence instruction, and AI only rewrites the selected paragraph and replaces it in place; Ctrl+Z can be used to undo, and the rest of the text remains unchanged. Four built-in shortcuts: more conversational / cut in half / expand details / more data-driven.
Image Fallback Chain¶
Images are attempted in order through a fallback chain of 9 image providers:
openai (gpt-image-2) → doubao → dashscope → jimeng → minimax
→ azure_openai → gemini → openrouter → replicate
If one fails, it automatically degrades to the next; if all fail, it proceeds without images, blocking neither the draft. The default chain only contains openai (gpt-image-2), the other 8 providers can be added/arranged as needed on the settings page. Single image limit 10MB, max 10 images per article.
Scheduled Tasks¶
Runs the pipeline according to RRULE rules, constantly pushes the result to the draft box, and has a fully auditable run history; missed scheduled times are not compensated.
Direct Dialog Write (since v0.4.0)¶
In addition to the workspace, the pipeline can also be driven directly in the DSH chat: tell the agent “Use wewrite to write…”, and the six-step progress appears in real-time in the chat flow. The push action must be confirmed by human approval in the host’s native approval panel; if approval is unavailable, execution is rejected.
Installation and Enablement¶
First confirm prerequisites: Node ^22.19.0 || >=24.0.0, and npx @deepseek-ai/dsh runs.
Install the plugin (command fixed to #v0.2.0 tag):
npx @deepseek-ai/dsh plugin --profile web add github:jerryjiao/dsh-wewrite#v0.2.0
To uninstall:
npx @deepseek-ai/dsh plugin --profile web remove dsh-wewrite
Start DSH Web:
npx @deepseek-ai/dsh web
Open http://127.0.0.1:3080, the “wewrite Workspace” tab will appear in the session view ring.
Then fill in the Official Account AppID + AppSecret on the settings page; API Keys for image providers are optional. If not configured, the article proceeds without images and does not block publishing. After saving, click “Connection Test”. Credentials are only stored locally in ~/.dsh by the DSH credential service, and the interface displays masked values.
Typical Usage¶
Workspace path:
- Select a hot topic in the “Topic” panel and open it to see the AI overview.
- If suitable, click “Write this” (or directly enter a fixed topic), and the pipeline automatically runs through all six steps.
- Edit the draft in the editor, and confirm the layout with the WeChat preview on the right.
- Click “Push to Draft Box”, then check the draft in the WeChat Official Account backend under “Content & Interaction → Graphic Materials”.
Dialog path: Tell the agent “Use wewrite to write…”, or use the command:
/wewrite <topic>
When pushing is needed, tell the agent “Push to Draft Box”, and the draft is pushed after the host approval panel confirms.
Applicable Scenarios and Notes¶
Suitable for: People already using DSH, needing to produce content for the Official Account periodically, hoping the entire pipeline runs locally, and using their own account for models and credentials. The plugin has built-in features for topics, overviews, drafting, layout, images, and scheduling, so you don’t need to patch scripts yourself.
Things to know before using:
- The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license (MIT) before installing.
- Default is only to the draft box: v0.1’s push surface only includes draft/add family endpoints; freepublish / group send paths are unreachable at the type layer and must be executed manually by you in the Official Account backend.
- WeChat server-side interfaces have IP whitelist constraints. When getting errcode 40164, you can change the “WeChat API Address” on the settings page to a relay address (the repository comes with
tools/wechat-relay), and all WeChat calls go through that address. - Credentials and data are only stored locally in
~/.dsh; the plugin has no default telemetry, and secrets / access_token / API keys are masked in logs, errors, and run history. - Agent tools (
wewrite_run/wewrite_push_draft/wewrite_list_schedules) are disabled by default and need to be enabled in settings if needed. - Run history limit defaults to 200 (configurable 1-1000); scheduling polling interval defaults to 30 seconds (configured at the host-level
cordis.patch.ymllayer).
Summary¶
dsh-wewrite brings the repetitive, mechanical parts of Official Account writing—topic selection, drafting, layout, images, and pushing drafts—into an auditable local pipeline, leaving the parts requiring human judgment (editing, push approval, group sending) to you. If you are already running DSH, one command is all it takes to install it into your workspace.
- Community Directory (Independent Community Site): https://www.skillhub.cn/plugins/jerryjiao/dsh-wewrite
- GitHub Repository: https://github.com/jerryjiao/dsh-wewrite