Skip to content

jianshuo/claude-skills / wjs-syndicating-articles

wjs-syndicating-articles

Verified

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".

scripts/build-outbox.sh

View on GitHub
#!/usr/bin/env bash
# build-outbox.sh <article-folder> <post.txt> <outbox-dir>
# Prepares post.txt + image.png + OPEN.md for the manual (outbox-mode) platforms.
set -uo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
ARTF="${1:?article folder}"; POST_TXT="${2:?post.txt}"; OUTBOX="${3:?outbox dir}"
mkdir -p "$OUTBOX"
[[ "$POST_TXT" -ef "$OUTBOX/post.txt" ]] || cp "$POST_TXT" "$OUTBOX/post.txt"

# hero image: cover.png > illustration.png > none
if   [[ -f "$ARTF/cover.png" ]];        then cp "$ARTF/cover.png" "$OUTBOX/image.png"
elif [[ -f "$ARTF/illustration.png" ]]; then cp "$ARTF/illustration.png" "$OUTBOX/image.png"
fi

POST_BODY="$(cat "$OUTBOX/post.txt")"
{
  echo "# 待发件箱 — 手动平台粘贴指引"
  echo
  echo "文案已在 \`post.txt\`(运行 \`--open\` 时会自动进剪贴板)。主图见 \`image.png\`。"
  echo
  echo "## 文案"
  echo
  echo '```'
  echo "$POST_BODY"
  echo '```'
  echo
  for p in $(enabled_platforms); do
    [[ "$(platform_mode "$p")" == "outbox" ]] || continue
    web="$(jq -r --arg p "$p" '.platforms[$p].web_compose // empty' "$CONFIG")"
    case "$p" in
      facebook)    echo "## Facebook";    echo "- 打开:${web:-https://www.facebook.com/}"; echo "- 粘贴文案 → 发布。" ;;
      jike)        echo "## 即刻";        echo "- 打开:${web:-https://web.okjike.com/}"; echo "- 粘贴文案 → 发布。" ;;
      xiaohongshu) echo "## 小红书";      echo "- 这是手机 App 为主:把 \`image.png\` AirDrop 到手机,文案已在剪贴板,App 内发图文笔记。"; [[ -n "$web" ]] && echo "- 或网页创作者后台:$web" || true ;;
      zhihu)       echo "## 知乎";        echo "- 打开:${web:-https://zhuanlan.zhihu.com/write}(走「想法」短文案,或贴成文章)"; echo "- 粘贴文案 → 发布。" ;;
      *)           echo "## $p"; [[ -n "$web" ]] && echo "- 打开:$web" || true; echo "- 粘贴文案 → 发布。" ;;
    esac
    echo
  done
} > "$OUTBOX/OPEN.md"
echo "outbox=$OUTBOX"
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 323kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 323kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 323kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 323kUpdated Claude CodeCodexVerifiedInstall