jianshuo/claude-skills / wjs-publishing-books-to-x
wjs-publishing-books-to-x
UnverifiedUse when 王建硕 wants to publish his VoiceDrop books (voicedrop.cn/books) to X/Twitter as threads — 列出他写的书、挑没发过的、整本拆成推文串发出。Triggers — "把书发到 X", "发书的 thread", "publish my book to X", "书架的书发推", "/wjs-publishing-books-to-x".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.3 KB |
| com.jianshuo.wjs-publishing-books-to-x.plist.template | other | 1.0 KB |
| daily.shexecutable | script | 6.8 KB |
| scripts/fetch-book.pyexecutable | script | 2.1 KB |
| scripts/pick-next-book.shexecutable | script | 1.3 KB |
| state/.gitignore | other | 22 B |
scripts/pick-next-book.sh
View on GitHub#!/usr/bin/env bash
# 输出下一本要发的书:"slug<TAB>title"。没有可发的 → exit 1。
# 我的书 = author 是「王建硕」或空;跳过 history.jsonl 里已出现的 slug
# (posted / posted_partial 都算发过),跳过 chapters==0 的老书(没法读正文)。
# 顺序:createdAt 从新到旧。
# 退出码:0 = 选中一本;3 = 全发完了;其他 = 出错。
set -euo pipefail
HERE="$(cd "$(dirname "$0")/.." && pwd)"
exec python3 - "$HERE/state/history.jsonl" <<'PY'
import json, sys, urllib.request
UA = {"User-Agent": "Mozilla/5.0 wjs-publishing-books-to-x"} # 裸 urllib UA 会被 CF 403
hist = set()
try:
for line in open(sys.argv[1]):
line = line.strip()
if line:
try:
hist.add(json.loads(line).get("slug"))
except Exception:
pass
except FileNotFoundError:
pass
req = urllib.request.Request("https://jianshuo.dev/voicedrop/books?format=json", headers=UA)
with urllib.request.urlopen(req, timeout=30) as r:
d = json.load(r)
mine = [b for b in d["books"]
if b.get("author") in ("王建硕", "")
and b.get("chapters", 0) > 0
and b["slug"] not in hist]
mine.sort(key=lambda b: -b.get("createdAt", 0))
if not mine:
sys.exit(3)
print(f'{mine[0]["slug"]}\t{mine[0]["title"]}')
PY
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |