tentacle-post2wechat
Skill4 starsChanged 9 months agoCC0-1.0View on GitHub
Enterprise WeChat draft publisher via api.tentacle.pro. Uses API_KEY, server-side credential mapping, token caching/refresh, cover upload, inline image upload, and draft/add.
- Reads credentials
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ast-grepSkill
- baoyu-article-illustratorSkill
- baoyu-compress-imageSkill
- baoyu-cover-imageSkill
- baoyu-image-genSkill
- baoyu-infographicSkill
- baoyu-markdown-to-htmlSkill
- baoyu-post-to-wechatSkill
- baoyu-xhs-imagesSkill
- tentacle-markdown2htmlSkill
- tentacle-obsidian-initSkill
- tentacle-skills-washingSkill
The file
Files
tentacle-post2wechat (Enterprise Edition)
Purpose
Enterprise publisher that sends requests to api.tentacle.pro.
Server resolves API_KEY -> AppID/AppSecret, caches/refreshes WeChat tokens, then forwards to WeChat APIs.
Runtime
bun .agents/skills/tentacle-post2wechat/scripts/main.ts <html_file> [options]Shared .env (.agents/skills/.env)
API_KEY=tpk_...Behavior
- Force-compress local images before upload (
jpeg, quality65). - Upload inline images using enterprise endpoint and replace
<img src>URLs. - Upload cover image as permanent material and obtain
thumb_media_id. - Save to draft box only (
draft/add).
Official WeChat API Role Mapping
- Inline article images map to WeChat
media/uploadimgsemantics and return URL for HTML replacement. - Cover image maps to WeChat permanent material (
material/add_material?type=image) and returnsmedia_id. - Draft save maps to WeChat
draft/add(article_type=news) withthumb_media_id+ replaced HTML content.
Recommended Pipeline
- If input is
.md: proactively invoke thetentacle-markdown2htmlskill first to convert it to HTML, then continue with the steps below. Do not ask the user to do this manually. - Receive normalized HTML (or convert markdown in previous step).
- Upload inline images and rewrite
<img src>to returned URLs. - Upload cover image and get
thumb_media_id. - Submit
draft/addpayload.
Required Inputs
- HTML file (auto-generated from
.mdviatentacle-markdown2htmlif needed) - Cover image (
--cover) or first inline image fallback
Example
bun .agents/skills/tentacle-post2wechat/scripts/main.ts article.html \
--cover Assets/Cover-Images/topic/cover.jpg \
--title "标题" \
--author "作者" \
--summary "摘要(不超过120字)"API Contract
See references/api-contract.md.
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
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.

