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/history.sh

View on GitHub
#!/usr/bin/env bash
set -uo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
ensure_state

cmd="${1:-}"; shift || true

case "$cmd" in
  record)  # record <slug> <platform> <status> [url] [post_id] [reason]
    slug="$1"; platform="$2"; status="$3"; url="${4:-}"; post_id="${5:-}"; reason="${6:-}"
    jq -nc --arg date "$(date +%F)" --arg slug "$slug" --arg platform "$platform" \
           --arg status "$status" --arg url "$url" --arg post_id "$post_id" --arg reason "$reason" \
       '{date:$date,slug:$slug,platform:$platform,status:$status}
        + (if $url != "" then {url:$url} else {} end)
        + (if $post_id != "" then {post_id:$post_id} else {} end)
        + (if $reason != "" then {reason:$reason} else {} end)' >> "$HISTORY"
    ;;
  has)     # has <slug> <platform>  -> exit 0 if done (posted|queued|skipped)
    slug="$1"; platform="$2"
    if jq -e --arg s "$slug" --arg p "$platform" \
        'select(.slug==$s and .platform==$p and (.status=="posted" or .status=="queued" or .status=="skipped"))' \
        "$HISTORY" >/dev/null 2>&1; then exit 0; else exit 1; fi
    ;;
  fully-done)  # fully-done <slug> -> exit 0 if every enabled platform is done
    slug="$1"
    for p in $(enabled_platforms); do
      if ! "$0" has "$slug" "$p"; then exit 1; fi
    done
    exit 0
    ;;
  *) echo "usage: history.sh {record|has|fully-done} ..." >&2; exit 2 ;;
esac
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: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated 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: 322kUpdated 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: 322kUpdated Claude CodeCodexVerifiedInstall