当前位置: 首页 > Skill >

微信公众号发文助手

微信公众号发文助手

1.0.0 2026.11.20 浏览:230
获取Skill文件查看使用说明
作者:顾安许可证:
本文目录展开

WeChat Service Publisher

Core Rules

  • Default to draft only. Never publish or call freepublish/submit unless the user explicitly confirms publishing in the current turn.
  • Before publishing, state the title, target account, draft id, cover file, and ask for a clear confirmation such as “确认发布”.
  • Before uploading this skill to SkillHub or submitting a SkillHub review, state the slug, version, changelog, and changed files, then ask for explicit user confirmation. Do not click upload or run skillhub publish until the user confirms.
  • Do not store AppSecret in skill files, workspace files, logs, or records. Use WECHAT_APPID and WECHAT_APPSECRET environment variables only for the command invocation.
  • Do not add content_source_url and do not append “原文链接” to the article unless the user explicitly asks.
  • Mark AI-generated content only when required by the current task or platform field. If the user explicitly says the body should not show “创作来源:内容由AI生成” or account tagline text, do not add those visible lines to the article body.
  • When calling WeChat JSON APIs, send UTF-8 JSON with ensure_ascii=False and Content-Type: application/json; charset=utf-8. Do not use clients that serialize Chinese into literal uXXXX sequences for the draft/update payload; WeChat may store those escapes as visible mojibake in the draft.
  • For service-account covers, prefer one 2.35:1 conversation-cover master image with a left 1:1 safe crop area:
    • Full 2.35:1 image: service-account conversation cover.
    • Left 1:1 crop: service-account list thumbnail.
    • The left 1:1 safe crop must be visually clean: no blue vertical line, no hard divider, no frame, no box edge, and no right-side card/badge/text spill.
    • Put all right-side cards and supporting visuals after a dark buffer outside the left 1:1 crop; use a soft dark gradient only, not a visible separator.
    • Use WeChat crop fields: pic_crop_235_1 = "0_0_1_1" and pic_crop_1_1 = "0_0_0.4255_1" when the 1:1 safe area is the left square of a 2.35:1 master.
  • Use image2 for covers and body posters when visual generation is requested. Do not substitute other generators or simple local text cards unless the user explicitly overrides this requirement. If the image contains Chinese, inspect/crop-preview before using it.
  • For images with exact Chinese titles, image2 may omit or alter words. Inspect the generated image. If the title is wrong, regenerate once; if still wrong, keep the visual and correct the title with local image editing before upload.
  • Treat “标的/企业图谱” images as industry-research maps, not recommendations. Use wording such as “代表性企业/研究对象/场景” and avoid “推荐买入/股票推荐/建议买入”. Do not put “原文提到的” in target-company posters or final body copy; use cleaner wording such as “文章涉及” or omit the qualifier.
  • For industry articles, always add a standalone “产业标的梳理” section. List companies/vendors/institutions mentioned in the source by industry-chain segment, prioritize A-share/H-share/China ADR/domestic supply-chain names, include each name’s segment and source-mentioned progress/watch point, and list overseas leaders under competitive landscape when relevant.
  • When creating a “标的企业版” poster, it must show the article title, industry-chain segments, and representative company names by segment. It cannot be a view-only poster; company names must be visible.
  • If the body poster already contains a full “产业链全景图/产业链流程图”, the “标的企业版/企业图谱” poster must not repeat that full chain-flow content. Focus the target-company poster on segment-to-company mapping, company names, watch points, and compact comparison metrics instead.
  • Reject generated posters with obvious Chinese typos, ghosted/overlapping old text, label residue, or text blocks that cover bottom judgments/flow charts. Regenerate or locally repair before upload.
  • After every draft update, call draft/get and verify: no literal uXXXX escapes, expected section text is present, newly uploaded images appear as img tags (WeChat may rewrite src to data-src), and removed body labels are absent.

Workflow

  1. Read or extract the source article from the provided URL or public body.
  2. Produce a Chinese layered industry-research summary, not a generic reading summary:
    • Core观点
    • 关键论据
    • 重要数据/案例
    • 产业链/技术脉络
    • 产业标的梳理
    • 读者启发/研究提示
  3. Create or reuse visual assets:
    • Body poster: image2 vertical infographic when needed.
    • 标的企业版 poster: image2 infographic when the article contains company/vendor/institution names; must group company names by chain segment, and must avoid repeating the full产业链全景流程 if the body poster already covers it.
    • Cover: image2 2.35:1 master with left 1:1 safe title area, keeping the list crop free of separator lines and right-side content spill.
    • Export and inspect a 1:1 crop preview before using cover.
  4. Build WeChat HTML:
    • Use a polished guide card, styled second-level headings, image blocks with short research-context captions, and custom numbered cards for “读者启发/研究提示” to avoid empty native list-number rendering.
    • Include account label or AI creation label only when not forbidden by the user’s latest instruction.
    • Do not include original-source link by default.
  5. Save to draft box with scripts/wechat_article.py --draft-only ....
  6. Read back the draft and verify text/image integrity before telling the user it is ready.
  7. If the user asks to publish, first ask for confirmation. Only after confirmation run scripts/wechat_article.py --publish-confirmed ....

Script

Use scripts/wechat_article.py for deterministic API work.

Typical draft command:

WECHAT_APPID="..." WECHAT_APPSECRET="..." 
python /Users/sch/.codex/skills/wechat-service-publisher/scripts/wechat_article.py 
  --workspace /Users/sch/Documents/服务号发文 
  --title "一图看懂通信芯片:四大分类及细分方向" 
  --digest "按无线、有线、光通信、网络通信四条主线,梳理通信芯片细分方向、关键场景与产业链流程。" 
  --markdown drafts/一图看懂通信芯片_服务号草稿.md 
  --body-image assets/一图看懂通信芯片_正文图.jpg 
  --cover assets/一图看懂通信芯片_左无框1比1右分类_会话封面.jpg 
  --draft-only

Publishing command, only after explicit user confirmation:

WECHAT_APPID="..." WECHAT_APPSECRET="..." 
python /Users/sch/.codex/skills/wechat-service-publisher/scripts/wechat_article.py 
  --workspace /Users/sch/Documents/服务号发文 
  --draft-media-id "<draft_media_id>" 
  --publish-confirmed

References

  • Read references/wechat_rules.md when updating the workflow, cover rules, body layout, image/title requirements, or deciding API fields.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件

相关 Skill

更多
微信公众号产业研究发文助手 微信公众号产业研究发文助手 将产业文章整理为适合微信公众号/服务号发布的研究型草稿,支持原文读取、分层摘要、产业链标的梳理、image2 海报与封面生成、正文排版、微信草稿保存、回读校验和发布前确认。适用于鹊桥产业等服务号的半导体、AI 算力、先进封装、光通信、新能源、机器人等产业链研究内容。
公众号一键发文流水线·Markdown转排版推送 公众号一键发文流水线·Markdown转排版推送 把"每篇复制改路径"的发文流程收敛成一个可复用流水线。写好的 Markdown,三步变一篇带样式、带封面的群发草稿。
阿淼发公众号 阿淼发公众号 Editor-first WeChat Official Account publishing skill. Posts content to WeChat Official Account (微信公众号) via API or browser, while prioritizing humanized writ...
公众号文章采集 公众号文章采集 智能体自动滚动微信搜一搜结果页,OCR 识别文章信息,生成分类报告。
公众号爆文写作助手(蹭热点·双AI核实) 公众号爆文写作助手(蹭热点·双AI核实) 自媒体爆款文章智能生成工具,支持蹭热点写文、双AI事实核查、自动配图、全平台发布。适配知乎、头条、公众号等平台,自动生成1000字以上深度文章,标题含热点关键词,正文自然融入,适合流量变现。