🦀 ClawHub
Blog Content Publish
by @leeguooooo
Publish editorial and dynamic section content with blog-publish, enforce quality gates for hot/news/ai_news, and sync repository skills to ClawHub via clawhu...
TERMINAL
clawhub install blog-content-publish📖 About This Skill
name: blog-content-publish description: Publish editorial and dynamic section content with blog-publish, enforce quality gates for hot/news/ai_news, and sync repository skills to ClawHub via clawhub sync --all.
Goal
@leeguoo/blog-publish (single source of truth).blog-publish to publish normal blog content and dynamic section content.producer leakage.editorial, hot, news, and ai_news.blog-publish to generate CDN-hosted markdown URLs for embedded assets.When to Use
hot/news/ai_news.Inputs
locale
- slug
- title
- summary
- contentMarkdown
section (hot, news, or ai_news)
pairId (if omitted, server falls back to slug)
- repoUrl
- sourceUrl
- publicSourceLabel
- tags
- decisionMeta
- producer (internal only, never for public display)Quality Gates (Required for hot/news/ai_news)
summary) + structured body.
- Body must contain numbered topics (## 1) ..., ## 2) ...) and a closing takeaways section.
- Dynamic briefs should normally contain 4-8 topics; reject outputs with only 1-2 thin topics unless the source itself is extremely short.
来源/Source
- 证据/Evidence
- 摘要/Summary
- 解读/Interpretation
- 行动建议/Action
- 证据/Evidence must point to a concrete anchor (release bullet / PR / issue / official doc section), not only homepage-level links.
- 摘要/Summary is factual and source-grounded.
- 解读/Interpretation is inference/opinion and must not fabricate facts; include explicit impact level (P0/P1/P2).
- 行动建议/Action must be executable (for example: "upgrade now", "canary first", "hold and monitor").
来源标题.
- One topic should have one primary source link + one evidence link when available.
- Avoid same-link repetition across all topics; evidence links should be topic-specific whenever possible.
TBD, 待补充, lorem ipsum).
- No leaked render placeholders (INLINE_CODE, RUBYPH, @@...@@).
- No exposing internal producer identity in byline/meta/body (for example: "generated by skill/openclaw bot").
- Mentioning OpenClaw is allowed when it is the article subject, not the publisher identity.Quality Score (Publish Threshold)
0-2 each):< 4, or
- Any topic missing Evidence/Action.Body Template (news / hot / ai_news)
# {{title}}更新时间:{{timestamp}}
数据来源:{{source_set}}
> 说明:本期每条热点均包含「摘要 + 解读」。
1) {{topic_title}}
来源:{{source_name}}
证据:{{evidence_anchor}}
摘要:{{fact_summary}}
解读(P1):{{implication}}
行动建议:{{operator_action}} 2) {{topic_title}}
来源:{{source_name}}
证据:{{evidence_anchor}}
摘要:{{fact_summary}}
解读(P2):{{implication}}
行动建议:{{operator_action}} 总结
1. {{takeaway_1}}
2. {{takeaway_2}}
3. {{takeaway_3}}
Preflight Checks
blog-publish publish --dry-run --input .json
- blog-publish publish --dry-run --input .md
rg -n "(^|[^\\]\\()https?://" against generated markdown files.
- Reject leaked render placeholders: rg -n "INLINE_CODE|RUBYPH|@@[A-Z0-9_]+@@" against generated markdown files.
- Verify each topic has Source + Evidence + Summary + Interpretation + Action.
- Verify each interpretation includes risk level label (P0|P1|P2).
- Verify evidence links are not all identical across every topic.
- If pairId is missing, ensure slug is stable because server uses it for localization grouping.
Publishing Rules
section is editorial when absent.blog-publish publish and blog-publish update both accept JSON payload files and markdown files with frontmatter.blog-publish post-list to discover existing locale + slug pairs before editing existing posts.blog-publish download to export stored content into editable markdown frontmatter, then feed that file back into blog-publish update.producer as internal metadata only; public surfaces must use publicSourceLabel or section label.Command Playbook
pnpm add -g @leeguoo/blog-publish
- blog-publish login --api-base https://blog.misonote.com --sso-client-id misonote-blog-web --sso-redirect-uri https://blog.misonote.com/auth/callback
- blog-publish whoami
- blog-publish post-list --api-base https://blog.misonote.com --locale zh
- blog-publish download --api-base https://blog.misonote.com --locale zh --slug --output ./drafts/.zh.md
- blog-publish upload --api-base https://blog.misonote.com --file ./assets/cover.png --markdown-only
- blog-publish upload --api-base https://blog.misonote.com --file ./assets/cover.png --filename cover-final.png
PUBLISH_API_TOKEN=
- Preflight: blog-publish whoami --api-base https://blog.misonote.com
- Never prompt end users to complete browser authorization links.
blog-publish publish --dry-run --input .json
- blog-publish publish --dry-run --input .md
- blog-publish publish --input .json
- blog-publish publish --input .md
- blog-publish update --dry-run --input .md
- blog-publish update --input .md Media Notes
MEDIA_CDN_BASE_URL and emits image markdown URLs like:https://img.leeguoo.com/media//
deduped: true and the existing asset.id instead of creating a duplicate.
img.leeguoo.com as the canonical image host in generated markdown to leverage Cloudflare CDN + cache.pnpm clawhub:sync:dry-run
- pnpm clawhub:sync:all
clawdhub sync all):pnpm clawdhub:sync:dry-run
- pnpm clawdhub:sync:allFailure Handling
BLOG_PUBLISH_SSO_CLIENT_ID, BLOG_PUBLISH_SSO_REDIRECT_URI) and rerun strict login command.
- If running in automation and error is PUBLISH_UNAUTHORIZED, stop interactive login attempts, rotate PUBLISH_API_TOKEN, then retry publish.