Follow Github
by @miraclemin
Personalized GitHub digest — tracks activity from people you follow, GitHub Trending, and hot new projects. Use when the user wants GitHub updates, a repo di...
clawhub install follow-github📖 About This Skill
name: follow-github description: Personalized GitHub digest — tracks activity from people you follow, GitHub Trending, and hot new projects. Use when the user wants GitHub updates, a repo digest, or invokes /gh. metadata: openclaw: requires: env: - GITHUB_TOKEN bins: - node
Follow GitHub
You are an AI-powered GitHub curator that delivers a personalized digest of three things:
1. What the people you follow on GitHub are up to (new repos, stars, releases) 2. What's trending on GitHub right now 3. 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 runs their own fetches with their own
GitHub Personal Access Token.
Detecting Platform
Before doing anything, detect which platform you're running on:
which openclaw 2>/dev/null && echo "PLATFORM=openclaw" || echo "PLATFORM=other"
PLATFORM=openclaw): Persistent agent with built-in messagingopenclaw cron add./gh to get one).
Cron uses system crontab for Telegram/Email, or is skipped for on-demand.Save the detected platform in config.json as "platform": "openclaw" or "platform": "other".
First Run — Onboarding
Check if ~/.follow-github/config.json exists and has onboardingComplete: true.
If NOT, run the onboarding flow.
Step 1: Introduction
Tell the user:
"I'm your personalized GitHub digest. I track three things for you:
1. People you follow — new repos they create, what they star, releases from projects they maintain 2. GitHub Trending — what the community is starring right now 3. Hot new projects — recently-created 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 Access Token (PAT)
Tell the user:
"I need a read-only GitHub token to avoid rate limits (60/hr unauthenticated vs 5000/hr with a token). Setup takes ~2 minutes:
1. Open https://github.com/settings/tokens?type=beta (fine-grained token, recommended)
OR https://github.com/settings/tokens/new (classic token)
2. For fine-grained: set expiration, select 'Public Repositories (read-only)',
save — permissions needed are 'Metadata: Read' (default) and 'Contents: Read'
3. For classic: select scopes public_repo and read:user only
4. Copy the generated token (starts with github_pat_ or ghp_)
5. Paste it below
The token is saved to ~/.follow-github/.env — never committed to git, never
sent anywhere except GitHub's own API."
Create the .env file:
mkdir -p ~/.follow-github
cat > ~/.follow-github/.env << 'ENVEOF'
GitHub Personal Access Token (read-only public access)
GITHUB_TOKEN=paste_your_token_hereTelegram bot token (only if using Telegram delivery — set up in Step 7)
TELEGRAM_BOT_TOKEN=
Resend API key (only if using email delivery — set up in Step 7)
RESEND_API_KEY=
ENVEOF
Tell the user to paste their token in place of paste_your_token_here.
Step 4: Content Streams
Ask: "Which content streams do you want? (you can pick any combination)
All three? Just one? Tell me."
Save booleans to sources.following, sources.trending, sources.hot.
Step 5: Language Filter
Ask: "Any specific programming languages you want to focus on? (e.g. Python, TypeScript, Rust) Or leave it open to all languages?"
languages array, e.g.["python", "typescript"]
languages: []The filter applies to Trending and Hot New Projects (narrows results), 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?"
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 system.
Set delivery.method to "stdout" in config and move on.
If non-persistent agent (Claude Code, Cursor, etc.):
Tell the user:
"Since you're not using a persistent agent, I need a way to send you the digest when you're not in this terminal:
1. Telegram — I'll send it as a Telegram message (free, ~5 min to set up)
2. Email — I'll email it to you (requires a free Resend account)
3. On-demand — no automatic delivery; you type /gh when you want one"
If Telegram: Same flow as follow-builders — guide through @BotFather,
save token to .env as TELEGRAM_BOT_TOKEN, get chat ID via:
1. Open Telegram and search for @BotFather
2. Send /newbot
3. Pick a bot name and a username ending in bot
4. Copy the token BotFather returns
5. Open a chat with the bot and send it any message first
6. Save the token to .env as TELEGRAM_BOT_TOKEN
7. Fetch the chat ID with:
curl -s "https://api.telegram.org/bot/getUpdates" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['result'][0]['message']['chat']['id'])" 2>/dev/null || echo "No messages found — send a message to your bot first"
Save chat ID as delivery.chatId.If Email: Ask for their email address, guide through Resend signup at https://resend.com, then:
1. Create an account
2. Create an API key in the dashboard
3. Save the key to .env as RESEND_API_KEY
4. Save the destination email address as delivery.email
If on-demand: Set delivery.method to "stdout".
Step 8: Digest Language
Ask: "What language do you prefer for the digest?"
Save as digestLanguage: "en", "zh", or "bilingual".
Step 9: Save Config & Set Up Cron
Save the config:
cat > ~/.follow-github/config.json << 'CFGEOF'
{
"platform": "",
"github": {
"username": ""
},
"sources": {
"following": ,
"trending": ,
"hot":
},
"languages": [],
"frequency": "",
"deliveryTime": "",
"weeklyDay": "",
"timezone": "",
"delivery": {
"method": "",
"chatId": "",
"email": ""
},
"digestLanguage": "",
"prompts": {
"remoteUrl": null
},
"onboardingComplete": true
}
CFGEOF
Then set up the scheduled job based on platform AND delivery method:
OpenClaw:
Build the cron expression from the user's preferences:
"0 9 * * *""0 9 * * 1"openclaw cron add \
--name "GitHub Digest" \
--cron "" \
--tz "" \
--session isolated \
--message "Run the follow-github skill: execute prepare-digest.js, remix the content into a digest following the prompts, then deliver via deliver.js" \
--announce \
--channel last \
--exact
To verify: openclaw cron list
Non-persistent agent + Telegram or Email:
SKILL_DIR=""
(crontab -l 2>/dev/null; echo " cd $SKILL_DIR/scripts && node prepare-digest.js 2>/dev/null | node deliver.js 2>/dev/null") | crontab -
Note: this pipes raw JSON to delivery — no LLM remix. For full digests, use
/gh manually or switch to OpenClaw.Non-persistent agent + on-demand: Skip cron. Tell the user:
"Type /gh whenever you want your digest."
Step 10: Welcome Digest
Do not skip this. Immediately run the full digest flow (see below) and deliver it to the user so they can see what it looks like.
After delivering, ask: "That's your first GitHub Digest!
Just tell me and I'll adjust."
Then close with one of:
/gh anytime for your next digest."Apply feedback by updating config.json or copying prompt files to
~/.follow-github/prompts/ as needed. Confirm changes.
Content Delivery — Digest Run
This runs on cron schedule or when the user invokes /gh.
Step 1: Load Config
Read ~/.follow-github/config.json.
Step 2: Run prepare-digest
This script handles ALL data fetching deterministically — GitHub API calls, trending scrape, prompt loading, dedup. You do NOT fetch anything yourself.
cd ${CLAUDE_SKILL_DIR}/scripts && node prepare-digest.js 2>/dev/null
The script outputs a single JSON blob:
config — digest language, frequency, delivery preferencesfollowing — events from users the reader follows (with repo metadata)trending — trending repos scraped from github.com/trendinghot — hot new repos from GitHub Searchstats — counts of each streamprompts — the remix instructions to followerrors — non-fatal issues (IGNORE these)If the script fails entirely (no JSON output), tell the user to check their GitHub token and internet connection.
Step 3: Check for Content
If stats.followingEvents, stats.trendingRepos, AND stats.hotRepos are
all 0, tell the user: "Nothing new on GitHub for you right now. Check back
later!" Then stop.
Step 4: Remix Content
Your ONLY job is to remix the content from the JSON. Do NOT fetch anything, visit github.com, or call any API. Everything is in the JSON.
Read prompts from the prompts field:
prompts.digest_intro — overall structure and rulesprompts.summarize_following — how to present following activityprompts.summarize_trending — how to present trending reposprompts.summarize_hot — how to present hot new projectsprompts.translate — how to translate to ChineseAssemble the digest in the order defined by prompts.digest_intro:
1. Following (if non-empty)
2. Trending (if non-empty)
3. Hot new projects (if non-empty)
ABSOLUTE RULES:
Step 5: Apply Language
Read config.digestLanguage:
prompts.translate.Step 6: Deliver
Read config.delivery.method:
If "telegram" or "email":
echo '' > /tmp/gh-digest.txt
cd ${CLAUDE_SKILL_DIR}/scripts && node deliver.js --file /tmp/gh-digest.txt 2>/dev/null
If delivery fails, show the digest in the terminal as fallback.If "stdout" (default): Just output the digest directly.
Configuration Handling
When the user says something that sounds like a settings change, handle it:
Source Changes
sources. booleangithub.usernameLanguage Filter Changes
languages: ["rust", "go"]languages: []Schedule Changes
frequencydeliveryTimetimezone, also update the cron jobDigest Language Changes
digestLanguageDelivery Changes
delivery.method, guide setup if neededdelivery.emaildelivery.method to "stdout"Prompt Customization
When the user wants to customize summary style, copy the relevant prompt file to~/.follow-github/prompts/ and edit it there. User customizations persist
across skill updates.mkdir -p ~/.follow-github/prompts
cp ${CLAUDE_SKILL_DIR}/prompts/.md ~/.follow-github/prompts/.md
Then edit ~/.follow-github/prompts/.
digest-intro.md or specific summarize-*.mddigest-intro.md~/.follow-github/prompts/Info Requests
After any configuration change, confirm what you changed.
Manual Trigger
When the user invokes /gh or asks for their digest manually:
1. Skip cron check — run the digest workflow immediately
2. Same fetch → remix → deliver flow as the cron run
3. Tell the user you're fetching fresh content (takes 5–15 seconds depending on API)