{"skill":{"slug":"ai-twitter-digest","displayName":"ai-twitter-digest","summary":"Monitor a curated list of AI/tech Twitter accounts, summarize the day's key posts using an LLM, and deliver a formatted digest to a Discord channel. Use when...","description":"---\nname: ai-twitter-digest\ndescription: \"Monitor a curated list of AI/tech Twitter accounts, summarize the day's key posts using an LLM, and deliver a formatted digest to a Discord channel. Use when: (1) setting up a daily automated AI news briefing from Twitter/X, (2) scheduling or running a one-shot Twitter digest to Discord, (3) managing or updating the monitored account list, summarization prompt, or delivery format.\"\n---\n\n# AI Twitter Digest\n\nFetches tweets from AI/tech influencers via the AISA API, summarizes in Chinese using any available LLM (Claude → OpenAI → Gemini, auto-detected), and delivers a two-part digest to Discord:\n\n- **Message 1**: Text summary with `[原文链接]` hyperlinks (no embed previews)\n- **Message 2**: Top 5 bare links rendered as Discord card previews\n\n## Setup\n\n### 1. Run the setup wizard (required before first use)\n\n```bash\npython3 scripts/setup.py\n```\n\nThe wizard will:\n- Auto-detect API keys from your environment and OpenClaw config\n- Prompt for any missing keys (AISA, LLM, Discord channel)\n- Test connectivity to AISA and your chosen LLM provider\n- Write a `.env` file — no manual editing needed\n\n> If you prefer manual setup, create `scripts/.env` with the following content:\n>\n> ```env\n> AISA_API_KEY=your_aisa_key_here\n> DELIVERY_CHANNEL=discord\n> DELIVERY_TARGET=channel:your_channel_id_here\n> SUMMARY_LANGUAGE=Chinese\n> ANTHROPIC_API_KEY=\n> OPENAI_API_KEY=\n> GEMINI_API_KEY=\n> # STATE_FILE=~/.ai-twitter-sent.json\n> # MAX_STORED_IDS=500\n> # CARD_PREVIEWS=true\n> ```\n\n**Required config:**\n\n| Variable | Description |\n|----------|-------------|\n| `AISA_API_KEY` | Twitter data — [aisa.one](https://aisa.one) |\n| `DELIVERY_CHANNEL` | `discord` / `whatsapp` / `telegram` / `slack` / `signal` |\n| `DELIVERY_TARGET` | Channel-specific target (see table below) |\n| One of: `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` | LLM for summarization |\n| `SUMMARY_LANGUAGE` | Digest language — `Chinese` (default), `English`, `Japanese`, `Korean`, `Spanish`, `French`, `German`, or any language name |\n\n**Delivery target format:**\n\n| Channel | Target format | Example |\n|---------|--------------|---------|\n| discord | `channel:<id>` | `channel:1234567890` |\n| whatsapp | E.164 phone or `group:<id>` | `+1234567890` |\n| telegram | `@username` or chat_id | `@mychannel` |\n| slack | `#channel-name` | `#ai-digest` |\n| signal | E.164 phone number | `+1234567890` |\n\n> Card link previews (`CARD_PREVIEWS`) are Discord-only and auto-disabled on other channels.\n\n### 2. Run manually\n\n```bash\npython3 scripts/monitor.py\n```\n\n### 3. Schedule with OpenClaw cron\n\n```bash\n# Daily at 3:30 PM Eastern\nopenclaw cron add \"AI Twitter Digest\" \"30 15 * * *\" \\\n  \"python3 /path/to/ai-twitter-digest/scripts/monitor.py\" \\\n  --timezone \"America/New_York\"\n```\n\n## Customizing Accounts\n\nEdit the `ACCOUNTS` list in `scripts/monitor.py`. See `references/accounts.md` for the default list and suggested additions.\n\n## Output Format\n\n**Message 1 — Summary:**\n```\n📊 **AI 每日简报** — 2026年02月26日\n\n- Karpathy 发布了神经网络教程 | [原文链接](...)\n\n- Sam Altman 表示 GPT-5 今年发布 | [原文链接](...)\n```\n\n**Message 2 — Card previews:**\n```\n🔗 **今日精选链接**\n\nhttps://x.com/karpathy/status/...\nhttps://x.com/sama/status/...\n```\n\n## How It Works\n\n1. Fetches up to 20 tweets/account (AI-keyword filtered, with all-tweets fallback)\n2. Deduplicates against `STATE_FILE` (capped at `MAX_STORED_IDS`)\n3. Summarizes with first available LLM provider\n4. Posts two Discord messages: text digest + card preview links\n5. Updates dedup state file\n","topics":["Twitter","Discord","Prompt"],"tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":891,"installsAllTime":33,"installsCurrent":0,"stars":0,"versions":2},"createdAt":1772085661358,"updatedAt":1778993346447},"latestVersion":{"version":"1.0.1","createdAt":1772086039347,"changelog":"- Updated WhatsApp and Signal delivery target examples in documentation to use generic sample phone numbers.\n- No functional or code logic changes; documentation only.","license":null},"metadata":null,"owner":{"handle":"fredhjc","userId":"s177a3cpn94rb80yfqaa1fc125884xgp","displayName":"FredHJC","image":"https://avatars.githubusercontent.com/u/24794992?v=4"},"moderation":null}