Trump Truth Social Tracker

v1.0.0

跟踪特朗普 Truth Social 帖子数据。从 CNN 归档 API 获取数据并同步到本地 SQLite 数据库,支持查询、统计和分析。触发场景:(1) 用户要求同步/更新 Truth Social 数据 (2) 查询特朗普帖子内容、互动数据 (3) 分析帖子趋势或统计信息 (4) 用户提到"Truth So...

1· 88·0 current·0 all-time
by赖根@laigen

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for laigen/trump-truth-social-tracker.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Trump Truth Social Tracker" (laigen/trump-truth-social-tracker) from ClawHub.
Skill page: https://clawhub.ai/laigen/trump-truth-social-tracker
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install trump-truth-social-tracker

ClawHub CLI

Package manager switcher

npx clawhub@latest install trump-truth-social-tracker
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description say it tracks Trump posts from CNN archive and syncs to a local SQLite DB. The included script fetches a CNN JSON URL, filters posts, upserts into a local SQLite DB under ~/.openclaw/workspace, and can write local report files — all consistent with the declared purpose. No unrelated credentials, binaries, or network services are requested.
Instruction Scope
SKILL.md instructs running the included Python script and querying the local SQLite DB; file and path references are explicit and limited to the skill's workspace. The script fetches only the provided JSON URL (configurable via --json-url) and writes to local DB and report files. Note: the provided file listing in the prompt is truncated near the end of the main function, so the final alert-processing behavior in the remainder of the file was not fully visible — based on the visible code, alerts are formatted and appended only to a local markdown report; there is no visible network exfiltration or external posting in the shown portion.
Install Mechanism
No install spec; this is instruction-only with a contained Python script. No downloads or archive extraction are declared. This is the lowest-risk install pattern for skills.
Credentials
No environment variables, credentials, or external service tokens are requested. The script uses only a configurable JSON URL and local filesystem paths under the user's home directory; this is proportional to the stated task.
Persistence & Privilege
always is false and the skill is user-invocable. The script writes only to its own workspace paths (~/.openclaw/workspace/...), creates a reports file, and creates the SQLite DB. It does not request system-wide configuration changes or other skills' credentials.
Assessment
This skill appears coherent: it fetches a public CNN JSON feed, saves posts locally to a SQLite DB, and can append alerts to a local markdown report. Before installing, review the full (untruncated) script to confirm the trailing code does not send data to any external endpoint or perform unexpected actions. Consider running it in a sandbox or with limited network access if you want extra safety. Be aware the script writes unsanitized post content into the DB and report file (normal for this use case) — if you will render reports in HTML or share them, consider sanitizing content to avoid link/markup surprises. Finally, verify the JSON URL is the expected CNN domain (or provide your own trusted source) and inspect any cron/automation configuration before enabling repeated autonomous runs.

Like a lobster shell, security has layers — review code before you run it.

alertsvk976pgn0aw25nhwh5wqhrrkcpx84vqnxdata-collectionvk976pgn0aw25nhwh5wqhrrkcpx84vqnxlatestvk976pgn0aw25nhwh5wqhrrkcpx84vqnxmonitoringvk976pgn0aw25nhwh5wqhrrkcpx84vqnxnewsvk976pgn0aw25nhwh5wqhrrkcpx84vqnxpoliticsvk976pgn0aw25nhwh5wqhrrkcpx84vqnxsocial-mediavk976pgn0aw25nhwh5wqhrrkcpx84vqnxtrackingvk976pgn0aw25nhwh5wqhrrkcpx84vqnxtrumpvk976pgn0aw25nhwh5wqhrrkcpx84vqnxtruth-socialvk976pgn0aw25nhwh5wqhrrkcpx84vqnx
88downloads
1stars
1versions
Updated 2w ago
v1.0.0
MIT-0

Truth Social Tracker

跟踪特朗普在 Truth Social 平台的帖子,数据来源为 CNN 归档 API。

数据源

  • URL: https://ix.cnn.io/data/truth-social/truth_archive.json
  • 更新频率: CNN 实时更新
  • 字段: id, created_at, content, url, media, replies_count, reblogs_count, favourites_count

数据库

  • 路径: ~/.openclaw/workspace/temp/trump_truth_social.sqlite
  • 表名: truth_posts
  • 主键: id
  • 只保存: 有内容(content 非空)的帖子

表结构

CREATE TABLE truth_posts (
    id TEXT PRIMARY KEY,
    created_at TEXT,
    content TEXT NOT NULL,
    url TEXT,
    replies_count INTEGER,
    reblogs_count INTEGER,
    favourites_count INTEGER,
    media TEXT,
    fetched_at TEXT
);

使用方法

同步数据

# 全量同步
python3 ~/.openclaw/workspace/skills/trump-truth-social-tracker/scripts/sync_truth_social.py

# 增量同步(最多10条新帖子)
python3 ~/.openclaw/workspace/skills/trump-truth-social-tracker/scripts/sync_truth_social.py --incremental 10 --alert

# 增量同步 + 预警 + 写入 report 文件
python3 ~/.openclaw/workspace/skills/trump-truth-social-tracker/scripts/sync_truth_social.py --incremental 10 --alert --write-report --output-json

输出统计信息:总帖子数、时间范围、互动总数。

查询数据

# 使用 sqlite3 查询
sqlite3 ~/.openclaw/workspace/temp/trump_truth_social.sqlite

# 常用查询示例
SELECT content, created_at, favourites_count 
FROM truth_posts 
ORDER BY favourites_count DESC LIMIT 10;

SELECT * FROM truth_posts 
WHERE content LIKE '%Iran%' 
ORDER BY created_at DESC;

SELECT COUNT(*) FROM truth_posts;

脚本

scripts/sync_truth_social.py

核心同步脚本,功能:

  1. 获取 CNN 归档 JSON
  2. Upsert 到 SQLite(INSERT OR REPLACE)
  3. 过滤无内容帖子
  4. 输出统计信息

参数:

  • --db-path: 自定义数据库路径
  • --json-url: 自定义数据源 URL
  • --incremental N: 增量同步,最多 N 条新帖子
  • --alert: 检测金融市场影响关键词
  • --write-report: 将预警写入 reports/trump_truth_social_alerts.md 文件
  • --output-json: JSON 格式输出

示例:

# 全量同步
python3 sync_truth_social.py

# 增量同步 + 预警检测
python3 sync_truth_social.py --incremental 10 --alert

# 心跳任务使用(增量 + 预警 + 写入 report)
python3 sync_truth_social.py --incremental 10 --alert --write-report --output-json

报告文件

预警信息持续追加到:

~/.openclaw/workspace/reports/trump_truth_social_alerts.md

Comments

Loading comments...