jianshuo/claude-skills / wjs-syndicating-articles
wjs-syndicating-articles
VerifiedUse 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".
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 51 B |
| SKILL.md | skill md | 4.8 KB |
| config.json | config | 708 B |
| run-scheduled.sh | script | 1.5 KB |
| scripts/build-outbox.shexecutable | script | 2.0 KB |
| scripts/history.shexecutable | script | 1.4 KB |
| scripts/lib.sh | script | 886 B |
| scripts/pick-next-article.shexecutable | script | 630 B |
| scripts/post-bluesky.sh | script | 1.5 KB |
| scripts/post-linkedin.sh | script | 1.2 KB |
| scripts/post-threads.sh | script | 1.3 KB |
| scripts/post-x.sh | script | 815 B |
| scripts/syndicate.shexecutable | script | 2.6 KB |
| scripts/test/assert.sh | script | 955 B |
| scripts/test/test_build_outbox.sh | script | 1.7 KB |
| scripts/test/test_e2e_dryrun.sh | script | 1.9 KB |
| scripts/test/test_history.sh | script | 1.5 KB |
| scripts/test/test_pick.sh | script | 1.0 KB |
| scripts/test/test_post_bluesky.sh | script | 1.1 KB |
| scripts/test/test_post_linkedin.sh | script | 824 B |
| scripts/test/test_post_threads.sh | script | 735 B |
| scripts/test/test_post_x.sh | script | 581 B |
| scripts/test/test_syndicate.sh | script | 2.7 KB |
| secrets.json.example | other | 263 B |
scripts/post-threads.sh
View on GitHub#!/usr/bin/env bash
# post-threads.sh <post.txt> [--dry-run] exit: 0 ok / 3 no creds / other fail
set -uo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
TXT_FILE="${1:?usage: post-threads.sh <post.txt> [--dry-run]}"
DRY="${2:-}"
TEXT="$(cat "$TXT_FILE")"
TOKEN="$(secret '.threads.access_token')"
UID_="$(secret '.threads.user_id')"
[[ -n "$TOKEN" && -n "$UID_" ]] || { echo "threads: no creds" >&2; exit 3; }
if [[ "$DRY" == "--dry-run" ]]; then echo "threads would post: $TEXT"; exit 0; fi
API="https://graph.threads.net/v1.0"
# 1) create container
cre="$(curl -fsS -X POST "$API/$UID_/threads" \
--data-urlencode "media_type=TEXT" \
--data-urlencode "text=$TEXT" \
--data-urlencode "access_token=$TOKEN")" || { echo "threads container failed: $cre" >&2; exit 1; }
CID="$(echo "$cre" | jq -r .id)"
[[ -n "$CID" && "$CID" != "null" ]] || { echo "threads no container id: $cre" >&2; exit 1; }
# 2) publish
pub="$(curl -fsS -X POST "$API/$UID_/threads_publish" \
--data-urlencode "creation_id=$CID" \
--data-urlencode "access_token=$TOKEN")" || { echo "threads publish failed: $pub" >&2; exit 1; }
PID="$(echo "$pub" | jq -r .id)"
[[ -n "$PID" && "$PID" != "null" ]] || { echo "threads no post id: $pub" >&2; exit 1; }
U="$(secret '.threads.username')"
echo "url=https://www.threads.net/@${U:-me}/post/$PID"
echo "post_id=$PID"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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 implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |