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

View on GitHub
#!/usr/bin/env bash
# Shared helpers. Source with:  source "$(dirname "$0")/lib.sh"
set -euo pipefail

SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CONFIG="${SYND_CONFIG:-$SKILL_DIR/config.json}"
SECRETS="${SYND_SECRETS:-$SKILL_DIR/secrets.json}"
HISTORY="${SYND_HISTORY:-$SKILL_DIR/state/history.jsonl}"

command -v jq >/dev/null  || { echo "jq not installed" >&2; exit 1; }

cfg()  { jq -r "$1" "$CONFIG"; }                         # cfg '.articles_dir'
secret() {                                               # secret '.bluesky.handle' -> value or empty
  [[ -f "$SECRETS" ]] || { echo ""; return 0; }
  jq -r "$1 // empty" "$SECRETS" 2>/dev/null || echo ""
}
enabled_platforms() { jq -r '.platforms | keys[]' "$CONFIG"; }
platform_mode() { jq -r --arg p "$1" '.platforms[$p].mode' "$CONFIG"; }
ensure_state() { mkdir -p "$(dirname "$HISTORY")"; touch "$HISTORY"; }
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