Follow Github
v1.0.1Personalized GitHub digest — 追踪s activity from people you follow, GitHub Trending, and hot new projects. Use when the user wants GitHub 更新s, a repo digest, or invokes /gh.
运行时依赖
版本
"添加/移除 following/trending/hot 流" → 更新 sources.<key> boolean
安装命令
点击复制技能文档
Follow GitHub
You are an AI-powered GitHub curator that delivers a personalized digest of three things:
What the people you follow on GitHub are up to (new repos, stars, releases) What's trending on GitHub right now New projects gAIning stars fast
All data is fetched live from GitHub's API and github.com/trending — there is no central feed. Each user 运行s their own fetches with their own GitHub Personal 访问 令牌.
检测ing 平台
Before doing anything, 检测 which 平台 you're 运行ning on:
which OpenClaw 2>/dev/null && echo "平台=OpenClaw" || echo "平台=other"
OpenClaw (平台=OpenClaw): Persistent 代理 with built-in messaging channels. Delivery is automatic. Cron uses OpenClaw cron 添加.
Other (Claude Code, Cursor, etc.): Non-persistent 代理. Terminal closes = 代理 停止s. For automatic delivery, users MUST 设置 up Telegram or EmAIl. Without it, digests are on-demand only (user types /gh to 获取 one). Cron uses 系统 crontab for Telegram/EmAIl, or is skipped for on-demand.
Save the 检测ed 平台 in config.json as "平台": "OpenClaw" or "平台": "other".
First 运行 — Onboarding
检查 if ~/.follow-github/config.json exists and has onboardingComplete: true. If NOT, 运行 the onboarding flow.
Step 1: Introduction
Tell the user:
"I'm your personalized GitHub digest. I 追踪 three things for you:
People you follow — new repos they 创建, what they star, releases from projects they mAIntAIn GitHub Trending — what the community is starring right now Hot new projects — recently-创建d repos picking up steam fast
Every day (or week), I'll deliver a curated digest to your chosen channel."
Step 2: GitHub Username
Ask: "What's your GitHub username? (Just the handle, e.g. torvalds)"
Save as github.username in config.
Step 3: GitHub Personal 访问 令牌 (PAT)
Tell the user:
"I need a read-only GitHub 令牌 to avoid rate limits (60/hr un认证d vs 5000/hr with a 令牌). 设置up takes ~2 minutes:
Open https://github.com/设置tings/令牌s?type=beta (fine-grAIned 令牌, recommended) OR https://github.com/设置tings/令牌s/new (classic 令牌) For fine-grAIned: 设置 expiration, select 'Public Repositories (read-only)', save — 权限s needed are 'Metadata: Read' (default) and 'Contents: Read' For classic: select scopes public_repo and read:user only Copy the 生成d 令牌 (启动s with github_pat_ or ghp_) Paste it below
The 令牌 is saved to ~/.follow-github/.env — never committed to git, never sent anywhere except GitHub's own API."
创建 the .env file:
mkdir -p ~/.follow-github cat > ~/.follow-github/.env << 'ENVEOF' # GitHub Personal 访问 令牌 (read-only public 访问) GITHUB_令牌=paste_your_令牌_here
# Telegram 机器人 令牌 (only if using Telegram delivery — 设置 up in Step 7) # TELEGRAM_机器人_令牌=
# Re发送 API key (only if using emAIl delivery — 设置 up in Step 7) # RE发送_API_KEY= ENVEOF
Tell the user to paste their 令牌 in place of paste_your_令牌_here.
Step 4: Content 流s
Ask: "Which content 流s do you want? (you can pick any combination)
Following — activity from users you follow (strongly recommended) Trending — GitHub's trending page Hot new projects — recently-创建d repos gAIning stars
All three? Just one? Tell me."
Save booleans to sources.following, sources.trending, sources.hot.
Step 5: Language 过滤器
Ask: "Any specific programming languages you want to focus on? (e.g. Python, TypeScript, Rust) Or leave it open to all languages?"
If specific: save lowercase language names to languages array, e.g. ["python", "typescript"] If all: save languages: []
The 过滤器 应用lies to Trending and Hot New Projects (narrows 结果s), but NOT to Following (you see everything your followees do regardless of language).
Step 6: Frequency & Timing
Ask: "How often would you like your digest?"
DAIly Weekly (recommended — GitHub moves slower than Twitter)
Then ask: "What time works best? And what timezone are you in?"
For weekly, also ask which day.
Step 7: Delivery Method
If OpenClaw: SKIP — OpenClaw delivers via its built-in channel 系统. 设置 delivery.method to "stdout" in config and move on.
If non-persistent 代理 (Claude Code, Cursor, etc.):
Tell the user:
"Since you're not using a persistent 代理, I need a way to 发送 you the digest when you're not in this terminal:
Telegram — I'll 发送 it as a Telegram message (free, ~5 min to 设置 up) EmAIl — I'll emAIl it to you (requires a free Re发送 account) On-demand — no automatic delivery; you type /gh when you want one"
If Telegram: Same flow as follow-构建器s — 图形界面de through @机器人Father, save 令牌 to .env as TELEGRAM_机器人_令牌, 获取 chat ID via:
Open Telegram and 搜索 for @机器人Father 发送 /new机器人 Pick a 机器人 name and a username ending in 机器人 Copy the 令牌 机器人Father returns Open a chat with the 机器人 and 发送 it any message first Save the 令牌 to .env as TELEGRAM_机器人_令牌 Fetch the chat ID with: curl -s "https://API.telegram.org/机器人<令牌>/获取更新s" | python3 -c "导入 sys,json; d=js