Loading...
Loading...
Use when the user wants to auto-syndicate their latest 微信公众号 article across social platforms — picks the newest un-syndicated article, extracts one core copy, auto-posts to API platforms (X / Bluesky / Threads / LinkedIn) and prepares a copy-paste outbox for manual platforms (Facebook / 小红书 / 即刻 / 知乎). Triggers — "分发文章到各平台", "同步到社交平台", "今天的文章发各平台", "/wjs-syndicating-articles".
npx skill4agent add jianshuo/claude-skills wjs-syndicating-articlesstate/history.jsonl(slug, platform)/wjs-syndicating-articles # 选最新未分发文章,走完整流程(默认/定时用)
/wjs-syndicating-articles <article-folder># 显式指定文章
/wjs-syndicating-articles --open # 交互模式:打开手动平台 web 页 + 文案进剪贴板
/wjs-syndicating-articles --dry-run # 只草拟,不发、不写 history
/wjs-syndicating-articles --mark <slug> <platform> # 手动标记某平台已发SKILL_DIR = ~/.claude/skills/wjs-syndicating-articles--mark <slug> <platform>bash $SKILL_DIR/scripts/history.sh record <slug> <platform> postedbash $SKILL_DIR/scripts/pick-next-article.sh<article-folder>FOLDERSLUG=$(basename "$FOLDER")$FOLDER/article.md$FOLDER/meta.jsonmeta.jsonarticle_url_base$SKILL_DIR/outbox/<date>-<SLUG>/post.txtmkdir -p<date>=$(date +%F)--dry-runx bluesky threads linkedin# 先去重:tweeting skill 也可能发过 X
if [[ "$P" == "x" ]]; then
TW_HIST="$HOME/.claude/skills/wjs-tweeting-from-articles/state/history.jsonl"
if [[ -f "$TW_HIST" ]] && jq -e --arg s "$SLUG" 'select(.slug==$s and .status=="posted")' "$TW_HIST" >/dev/null 2>&1; then
bash $SKILL_DIR/scripts/history.sh record "$SLUG" x skipped; continue
fi
fi
if bash $SKILL_DIR/scripts/history.sh has "$SLUG" "$P"; then continue; fi # already done
OUT="$(bash $SKILL_DIR/scripts/post-$P.sh "$POST_TXT")"; CODE=$?
case $CODE in
0) URL="$(echo "$OUT" | sed -n 's/^url=//p')"; PID="$(echo "$OUT" | sed -n 's/^post_id=//p')"
bash $SKILL_DIR/scripts/history.sh record "$SLUG" "$P" posted "$URL" "$PID" ;;
3) bash $SKILL_DIR/scripts/history.sh record "$SLUG" "$P" queued "" "" no_creds ;; # degrade -> outbox
*) bash $SKILL_DIR/scripts/history.sh record "$SLUG" "$P" failed ;; # retry next run
esacOUTBOX="$SKILL_DIR/outbox/$(date +%F)-$SLUG"
bash $SKILL_DIR/scripts/build-outbox.sh "$FOLDER" "$POST_TXT" "$OUTBOX"
for P in facebook xiaohongshu jike zhihu; do
bash $SKILL_DIR/scripts/history.sh has "$SLUG" "$P" || bash $SKILL_DIR/scripts/history.sh record "$SLUG" "$P" queued
done--open$SKILL_DIR/outbox/$(date +%F)-<SLUG>cat OUTBOX/post.txt | pbcopy/browseweb_composeopen "$OUTBOX/image.png"--mark <slug> <platform>$SKILL_DIR/
├── SKILL.md config.json secrets.json(gitignored)
├── scripts/ lib.sh history.sh pick-next-article.sh post-*.sh build-outbox.sh
├── outbox/<date>-<slug>/ post.txt image.png OPEN.md
└── state/history.jsonlsecrets.json.examplesecrets.json/schedule daily 10:00 /wjs-syndicating-articles