| name | blog-publisher |
| description | Publish bilingual Astro blog posts for blog.mushroom.cv and create WeChat Official Account drafts.
Trigger when the user says: 发布, 发布文章, 发布blog, 发布公众号, publish blog, create WeChat draft.
Use for:
- turning user-provided notes, links, README summaries, or markdown into a blog post
- generating or processing a 1200x630 banner
- publishing to Cloudflare Pages
- creating a WeChat draft from the final markdown
Critical rules:
- read this skill before publishing
- filenames must be English slugs, never Chinese
- default category is Tech-News
- run SEO/GEO checks before deploy
- finalize the slug before Blog deploy and before WeChat draft creation
|
Blog Publisher Skill
Mission
Publish one complete bilingual article to the Astro blog and, when requested, create a WeChat Official Account draft from the same final markdown.
Primary site:
- Blog:
https://blog.mushroom.cv/blog/SLUG/
- WeChat backend:
https://mp.weixin.qq.com
Project paths:
- Blog articles:
src/content/blog/
- Images:
src/assets/images/
- M1 Blog publisher:
pipeline/m1/publisher.py
- M2 WeChat publisher:
pipeline/m2/index.js
- M3 references, if needed:
pipeline/m3/
- Blog deploy:
pnpm build + wrangler pages deploy
- WeChat draft output:
pipeline/m2/output/
Trigger Words
Use this skill immediately when the user says any of:
发布
发布文章
发布blog
发布公众号
发布:文件路径.md
publish blog
create WeChat draft
Required Output
Return:
- final Blog URL
- WeChat draft status and media ID, if M2 was requested
- final markdown path
- final banner path and size
- any validation issue that remains
Non-Negotiable Rules
- Article filenames must be English slugs only.
- Do not use Chinese characters in markdown or image filenames.
- Every article frontmatter must include
category.
- Dates use ISO format:
YYYY-MM-DD.
- Default category:
Tech-News.
- New articles should appear at the top of
/blog/.
- Add the required copyright block to both Chinese and English sections.
- Run SEO/GEO checks before deploy.
- Create the WeChat draft only after the final slug and Blog URL are confirmed.
- Do not create duplicate routes for the same article.
Allowed categories:
Tech-News default
Tech-Experiment
Progress-Report
Research
DN
Standard Frontmatter
---
title: "中文标题"
titleEn: "English Title"
description: "中文描述"
descriptionEn: "English description"
pubDate: "YYYY-MM-DD"
updatedDate: "YYYY-MM-DD"
category: "Tech-News"
tags: ["tag1", "tag2", "tag3"]
heroImage: "../../assets/images/SLUG-banner.jpg"
---
Required Copyright Blocks
Chinese section, before <!--EN-->:
---
> © 2026 Author: Mycelium Protocol. 本文采用 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.zh) 授权——欢迎转载和引用,须注明作者姓名及原文链接,不得去除署名后以原创发布。
English section, at the end:
---
> © 2026 Author: Mycelium Protocol. Licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) — free to share and adapt with attribution. You must credit the author and link to the original; removing attribution and republishing as original is not permitted.
Fast Path: Existing Topic Or Short Article
Use this path when the user provides the topic, source link, README/project info, or a short post draft.
Target time: 3-5 minutes, excluding external API/network delays.
1. Decide The Final Slug First
Choose a short English slug before writing files.
Good:
ai-ppt-master-native-powerpoint.md
moss-tts-nano-local-tts.md
Bad:
- Chinese filenames
- long title-derived filenames
- truncated filenames generated by tools
If another article already has today’s pubDate, choose a slug that will sort early enough to place the new post near the top. Current blog list sorting is primarily by pubDate; same-day ordering can depend on collection/file order.
2. Prepare Banner
If the user provides no image, either:
- generate a custom banner when requested, or
- choose one default banner from
src/assets/.
For custom banners:
convert INPUT.png -resize 1200x630^ -gravity center -extent 1200x630 -quality 85 src/assets/images/SLUG-banner.jpg
ls -lh src/assets/images/SLUG-banner.jpg
Preferred constraints:
- size:
1200x630
- file size: under
120KB when practical
- filename: English only
Default banner pool:
blog-placeholder-1.jpg
blog-placeholder-2.jpg
blog-placeholder-3.jpg
blog-placeholder-4.jpg
blog-placeholder-5.jpg
banner-human-ai-coexistence.jpg
banner-cypherpunk-revolution.jpg
banner-mycelial-network.jpg
banner-future-is-now.jpg
banner-ai-new-intelligence.jpg
banner-digital-public-goods.jpg
banner-ai-smart-city-collab.jpg
banner-org-ai-transformation.jpg
banner-ai-city-ecosystem.jpg
banner-ai-personal-assistant.jpg
banner-personal-growth-ai-skills.jpg
Default banner frontmatter format:
heroImage: "../../assets/banner-digital-public-goods.jpg"
Custom banner frontmatter format:
heroImage: "../../assets/images/SLUG-banner.jpg"
3. Create Final Markdown Directly
For fast publishing, write the final file directly:
src/content/blog/SLUG.md
Do not use pipeline/m1/publisher.py to save the article when the final slug matters. It derives a filename from titleEn, truncates long names, and can create duplicate or undesirable routes.
4. Run SEO/GEO Check
Read and apply .agents/skills/seo-geo/SKILL.md.
Minimum checks:
description and descriptionEn exist
tags has at least 3 items
updatedDate is set
- slug is English and keyword-bearing
- opening has BLUF
- at least one H2/H3 is a question
- article includes concrete numbers or source facts
- at least one authoritative external link is present when source-based
- copyright blocks include
Mycelium Protocol
5. Build Once
pnpm build
Check:
ls dist/blog | grep SLUG
6. Deploy Once
npx wrangler pages deploy dist --project-name=blog-mushroom --branch=main --commit-dirty=true
7. Validate Blog
curl -I https://blog.mushroom.cv/blog/SLUG/
curl -Ls --compressed https://blog.mushroom.cv/blog/ | rg -o '/blog/[a-z0-9-]+/' | head -5
Expected:
- article URL returns
200
- new article appears at or near the top
- no duplicate route exists for the old slug
8. Create WeChat Draft Last
Only run this after the final Blog slug and URL are confirmed.
cd pipeline/m2
node index.js "../../src/content/blog/SLUG.md" --theme blue
Themes:
claude
chengyun
blue
sticker
mint
purple
cyber
rose
Return the media ID from pipeline/m2/output/SLUG.json.
Standard Path: Preexisting Markdown Or M1 Required
Use M1 only when the user explicitly gives a markdown file and accepts M1’s save/copy behavior, or when the workflow requires its automatic handling.
python3 pipeline/m1/publisher.py PATH/TO/ARTICLE.md --images PATH/TO/IMAGE.jpg
Important:
- M1 saves a new article file under
src/content/blog/.
- If a same-slug file already exists, M1 appends a timestamp.
- M1 also runs Blog build and Cloudflare deploy unless skip flags are used.
- Avoid creating a same-slug article manually before M1.
- After M1, inspect the generated path before running M2.
Use M1 when:
- the user provides a markdown file and accepts automatic naming
- the existing pipeline should handle image copying and full Blog deployment
- preserving the historical P1/M1 publication flow matters more than exact slug control
WeChat-Only Path
Use when the Blog article already exists and the user only asks for a WeChat draft:
cd pipeline/m2
node index.js "../../src/content/blog/SLUG.md" --theme blue
If the command fails with proxy or network errors, rerun with appropriate network permission. If it fails with WeChat IP whitelist error 40164, the user must add the reported IP in the WeChat platform allowlist.
Available Repo Scripts
Use these only when they fit the current task:
| Script | Purpose |
|---|
./publish.sh content.txt | full publish flow, may require AI polishing |
./publish-fast.sh content.txt | fast direct publish flow |
./deploy.sh | deploy only |
SEO/GEO Integration
When publishing, run a practical SEO/GEO pass rather than a long report unless the user asks for one.
Required article traits:
- bilingual content separated by
<!--EN-->
- BLUF at the start of Chinese and English sections
- one question-style heading
- FAQ for articles over 1000 words, optional for shorter posts
- original/source data when available
- source link at the end for GitHub/project/news posts
- Mycelium Protocol copyright block
Validation Checklist
Before deploy:
After deploy:
Cleanup Rules
If a slug changes before final release:
- delete old local markdown, if any
- delete old M2 outputs:
pipeline/m2/output/OLD-SLUG.html and .json
- rebuild and redeploy
- if the old production URL still returns
200, add a redirect:
/blog/OLD-SLUG/ /blog/NEW-SLUG/ 301
Place redirects in:
public/_redirects
Then rerun:
pnpm build
npx wrangler pages deploy dist --project-name=blog-mushroom --branch=main --commit-dirty=true
Known Failure Cases
Duplicate routes from M1
Cause:
- manually creating
src/content/blog/SLUG.md
- then running M1, which creates another timestamped file
Prevention:
- use the fast path and do not call M1, or
- let M1 create the file and inspect the generated filename before continuing
M1-generated slug is truncated
Cause:
- M1 derives filename from
titleEn and truncates long titles
Prevention:
- fast path: create
src/content/blog/FINAL-SLUG.md directly
- run
pnpm build and deploy manually
WeChat draft created before final slug
Cause:
- M2 was run before the Blog slug was finalized
Prevention:
- run M2 only after final Blog URL is validated
Cleanup:
- ignore or delete old local M2 output
- create a new draft from the final markdown
Article not first on list
Cause:
- same-day posts share the same
pubDate
- list sorting uses
pubDate, so same-day ordering may depend on collection/file order
Prevention:
- choose a final slug before deploy
- verify list order before M2
- avoid post-deploy slug changes
WeChat IP whitelist error
Error:
invalid ip x.x.x.x, not in whitelist
Fix:
- user logs into WeChat Official Account platform
- add the reported IP to the API whitelist
- retry M2 after about 1 minute
Protected Git branch
Blog deployment uses Cloudflare Pages deploy and does not require direct push to main.
If committing code is needed, use a feature branch and PR.