
Twitter Monitor
Fetch and normalize tweets from chosen X accounts or profile URLs into JSON or CSV, with optional Feishu Bitable sync and recurring agent scheduling.
Overview
twitter-monitor is an agent skill most often used in Grow (also Idea research and Launch distribution) that fetches X posts into structured exports with optional Feishu sync and scheduled reruns.
Install
npx skills add https://github.com/kangarooking/kangarooking-skills --skill twitter-monitorWhat is this skill?
- One-shot fetch via scripts/twitter_monitor.py with JSON or CSV output
- Configurable watch list of handles and profile URLs (e.g. sama, elonmusk, OpenAI)
- Optional Feishu/Lark Bitable append with dedupe on 推文ID and documented field schema
- Scheduling paths: OpenClaw recurring jobs or Codex automation after a successful manual run
- TWITTER_API_KEY via twitterapi.io; Feishu only when the user requests Bitable sync
- Recommended Feishu Bitable schema lists 13 documented fields including engagement metrics
Adoption & trust: 1 installs on skills.sh; 94 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
You need a consistent feed of tweets and engagement stats from specific accounts without manually scrolling X or rebuilding scrapers every week.
Who is it for?
Indie builders who already use twitterapi.io and want agent-run monitoring with optional Feishu ops tables or OpenClaw/Codex recurrence.
Skip if: Users who refuse API keys, need official X enterprise compliance reviews only, or want Feishu setup forced on every run without asking.
When should I use this skill?
User wants to monitor X/Twitter accounts, export tweet JSON or CSV, sync to Feishu/Lark when asked, or schedule recurring fetches after TWITTER_API_KEY is set.
What do I get? / Deliverables
You get JSON or CSV (and optionally Feishu rows) with deduped tweet IDs and metrics so you can plug signals into content, launch, or competitor workflows on a schedule.
- JSON or CSV file of tweets with links, IDs, author fields, and engagement counts
- Optional appended Feishu Bitable rows with dedupe on 推文ID
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Grow content because founders monitor founder and competitor feeds to inform posts, positioning, and timing—not just one-off research dumps. The script pipeline produces structured tweet text, engagement metrics, and links you can reuse in content calendars and distribution decisions.
Where it fits
Track rival founders and product accounts weekly to see positioning moves before you commit to a feature bet.
Pull high-engagement posts from niche leaders into CSV to draft your own threads with fresher hooks.
Monitor launch-day mentions and link posts into Feishu for a lightweight war-room table deduped by tweet ID.
How it compares
Skill-orchestrated fetch and optional Bitable sync—not a hosted social listening SaaS with built-in sentiment models.
Common Questions / FAQ
Who is twitter-monitor for?
It is for solo builders and small teams using coding agents to watch specific X accounts and export tweet plus engagement data for their own analytics stack.
When should I use twitter-monitor?
Use it in Grow to fuel content decisions, in Idea to track competitor or thought-leader accounts, and in Launch to watch distribution narratives; enable Feishu sync only when you ask to write results to Bitable.
Is twitter-monitor safe to install?
It uses a third-party Twitter API key and may touch Feishu via feishu-cli—review the Security Audits panel on this page and rotate TWITTER_API_KEY if the agent environment is shared.
SKILL.md
READMESKILL.md - Twitter Monitor
[ "sama", "elonmusk", "https://x.com/OpenAI" ] TWITTER_API_KEY=replace_with_twitterapi_io_key # Feishu Output Only use Feishu when the user asks to write or sync results to Feishu/Lark Bitable. Preferred workflow: 1. Run `twitter_monitor.py` first and produce JSON or CSV. 2. Check whether `feishu-cli` is installed. 3. If it is missing, ask whether to install and configure it. 4. Use the user's existing Feishu CLI auth/session and target app/table details. Recommended Bitable fields: | Field | Type | | --- | --- | | 推文内容 | Text | | 日期 | Date/time | | 推文链接 | URL | | 推文ID | Text | | 作者 | Text | | 作者ID | Text | | 阅读量 | Number | | 点赞数 | Number | | 转发数 | Number | | 评论数 | Number | | 收藏数 | Number | | 是否回复 | Checkbox | | 抓取时间 | Date/time | Deduplicate by `推文ID` before appending records when the target table already contains prior fetches. Do not ask users for Feishu app secrets unless `feishu-cli` cannot support their target operation and the user explicitly chooses API-based setup. # Scheduling Offer scheduling only after a one-shot fetch works or when the user explicitly asks for recurring monitoring. Options: - **OpenClaw**: Prefer this when the user already works in OpenClaw or asks for agent-run recurring jobs. Create a repeatable command that exports `TWITTER_API_KEY`, runs `scripts/twitter_monitor.py`, then performs any requested Feishu sync. - **Codex automation**: Use when the current environment supports reminders/automations and the user wants the agent thread to wake up and run the job. - **cron**: Use for simple Linux/macOS shell schedules. - **launchd**: Use for persistent macOS user jobs when cron is not appropriate. Before creating any schedule, confirm: 1. Account ids. 2. API key source, preferably an environment variable or secret manager. 3. Page count and time window. 4. Output destination. 5. Feishu target, if applicable. Keep recurring commands idempotent by deduplicating on `推文ID` before appending to a durable destination. # twitterapi.io Setup Use `twitterapi.io` advanced search for one-shot X/Twitter account fetches. Required environment variable: ```bash export TWITTER_API_KEY="..." ``` Default command: ```bash python scripts/twitter_monitor.py --accounts sama --pages 1 --format json ``` Use `--pages` to cap cursor pagination. Keep the default at `1` unless the user asks for a deeper pull or confirms an API-cost tradeoff. Useful variants: ```bash python scripts/twitter_monitor.py --accounts sama,elonmusk --pages 2 --format csv python scripts/twitter_monitor.py --accounts-file assets/accounts.example.json --since-hours 24 python scripts/twitter_monitor.py --accounts sama --since-date 2026-04-27 --until-date 2026-04-27 ``` The script accepts handles with or without `@`, comma-separated lists, and `x.com` or `twitter.com` profile URLs. #!/usr/bin/env python3 """Fetch recent X/Twitter posts through twitterapi.io and write JSON or CSV.""" from __future__ import annotations import argparse import csv import json import os import re import sys import time import urllib.error import urllib.parse import urllib.request from datetime import datetime, timedelta, timezone from email.utils import parsedate_to_datetime from pathlib import Path from typing import Any API_BASE = "https://api.twitterapi.io/twitter/tweet/advanced_search" UTC = timezone.utc FIELDNAMES = [ "推文内容", "日期", "推文链接", "推文ID", "作者", "作者ID", "阅读量", "点赞数", "转发数", "评论数", "收藏数", "是否回复", "抓取时间", ] def normalize_account(value: str) -> str: value = value.strip() if not value: raise ValueError("empty account value") match = re.search(r"(?:x\.com|twitter\.com)/@?([A-Za-z0-9_]{1,15})", value) if match: return match.group(1) value = value.removeprefix("@").strip().strip("/") if not re.fullmatch(r"[A-Za-z0-9_]{1,15}", value): raise ValueError(f"invalid X account id: {value!r}") return value def parse_accounts(args: arg