Agent Skill
2/7/2026

xray-watchlist

Twitter/X watchlist monitoring skill. Fetches tweets from followed users, filters valuable content using AI, and generates magazine-style Markdown reports. Use for 'tech insights', 'AI trends', 'what's new on X', or 'Twitter briefing'.

N
nocoo
0GitHub Stars
1Views
npx skills add nocoo/xray

SKILL.md

Namexray-watchlist
DescriptionTwitter/X watchlist monitoring skill. Fetches tweets from followed users, filters valuable content using AI, and generates magazine-style Markdown reports. Use for 'tech insights', 'AI trends', 'what's new on X', or 'Twitter briefing'.

name: xray-watchlist description: "Twitter/X watchlist monitoring skill. Fetches tweets from followed users, filters valuable content using AI, and generates magazine-style Markdown reports. Use for 'tech insights', 'AI trends', 'what's new on X', or 'Twitter briefing'."

X-Ray Watchlist

Fetch tweets from your watchlist and generate insightful reports.

Tools

fetch-tweets.ts

Usage:

bun run scripts/fetch-tweets.ts

Fetches recent tweets from all users in watchlist, automatically:

  • Filters out pure retweets (configurable)
  • Saves to data/raw_tweets.json

Arguments:

  • --include-processed: Include already processed tweets (default: skip)

Output: JSON file at data/raw_tweets.json containing:

{
  "fetched_at": "2026-01-26T10:00:00.000Z",
  "tweets": [...]
}

Analyze output at data/analyze_output.json (STRICT JSON only):

{
  "generated_at": "2026-01-26T10:05:00.000Z",
  "items": [
    {
      "id": "tweet_id",
      "translation": "中文译文(仅英文)",
      "score": 86,
      "evaluation": "1-2句中文评价"
    }
  ]
}

manage-watchlist.ts

Usage:

bun run scripts/manage-watchlist.ts list          # List all users
bun run scripts/manage-watchlist.ts add @user     # Add user
bun run scripts/manage-watchlist.ts remove @user  # Remove user

Workflow

When user triggers this skill:

1. Fetch Tweets

bun run scripts/fetch-tweets.ts

Or run the guided flow:

bun run scripts/run-watchlist-report.ts

2. Analyze (AI Step)

After fetching, you (Claude) will:

  1. Read data/raw_tweets.json
  2. Analyze: For each tweet, output translation (English only), score (0-100 integer), evaluation (1-2 Chinese sentences)
  3. Write data/analyze_output.json in strict JSON format
  4. Run bun run scripts/validate-analyze-output.ts

3. Generate Report

bun run scripts/generate-watchlist-report.ts

This reads data/raw_tweets.json + data/analyze_output.json and generates a fixed-format report in reports/.

4. Sync to Obsidian (REQUIRED)

⚠️ CRITICAL: This step is MANDATORY. Do NOT skip.

bun run scripts/sync-report.ts

This copies the report to Obsidian vault. Must run after saving report.

Scoring Guidelines

Score each tweet on a 0-100 scale based on content and engagement. Include a 1-2 sentence evaluation in Chinese.

Report Format (CRITICAL)

Generate a Markdown report in Simplified Chinese.

Structure:

# X-Ray Watchlist Report
Generated: YYYY-MM-DD HH:MM
Total tweets: N


## N. @user
<translation if English>
<full text>
<url>
- Engagement: likes X | reposts Y | replies Z | quotes Q | views V
- Score: 0-100
- Evaluation: 1-2句中文评价

Format Rules:

  1. Translation line only for English tweets
  2. Ordering: Sort by score descending

Output Locations

1. Save to Project

reports/xray_YYYYMMDD_HHMM.md

2. Sync to Obsidian

After saving report, run the sync script (this avoids external directory permission prompts):

bun run scripts/sync-report.ts

This script automatically:

  • Finds the latest report in reports/
  • Creates the Obsidian directory if needed
  • Copies the report to /Users/nocoo/workspace/personal/obsidian/xray/

You can also specify a specific report:

bun run scripts/sync-report.ts reports/xray_20260126_1430.md

User Intent Examples

  • "Run X-Ray"
  • "What's new on my Twitter feed?"
  • "今天X上有什么新动态?"
  • "帮我看看关注的人最近在聊什么"
  • "Generate Twitter insights"
  • "X洞察"

Completion Notification

After pipeline completes (success or failure), MUST call task-notifier skill:

# On success
python3 /Users/nocoo/workspace/personal/skill-task-notifier/scripts/notify.py "X-Ray 完成:筛选了 {count} 条推文" success

# On failure
python3 /Users/nocoo/workspace/personal/skill-task-notifier/scripts/notify.py "X-Ray 失败:{error}" error

Quick Reference

CommandDescription
bun run scripts/fetch-tweets.tsFetch from watchlist
bun run scripts/run-watchlist-report.tsGuided watchlist flow
bun run scripts/validate-analyze-output.tsValidate analyze output
bun run scripts/generate-watchlist-report.tsGenerate watchlist report
bun run scripts/sync-report.tsSync latest report to Obsidian
bun run scripts/manage-watchlist.ts listList watched users
bun run scripts/manage-watchlist.ts add @userAdd user
bun run scripts/manage-watchlist.ts remove @userRemove user

Data Files

FileDescription
data/raw_tweets.jsonFetched tweets (input for AI)
data/analyze_output.jsonAnalyze output (AI)
reports/*.mdGenerated Markdown reports
data/x-ray.dbSQLite database (watchlist, tweets)
config/config.jsonAPI keys (never commit)
Skills Info
Original Name:xray-watchlistAuthor:nocoo