你的 X 账号全能数据管家
简介
个人 X 账号全能管家,整合时间线、互动提及、粉丝追踪、推文阅读与书签管理,内置成本优化与预算守护机制
原始描述
Personal X (Twitter) analytics — timeline engagement, mentions, follower tracking, read any tweet/thread, bookmarks, and combined briefings via X API v2. Cos...
通过你的 Agent 添加
安装目录:x-smart-read/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心功能
x-twitter 是一款面向个人用户的 X (Twitter) 数据分析与内容管理工具,通过 X API v2 实现账号全景监控与成本可控的日常简报。其核心能力覆盖六大模块:
| 模块 | 功能 | 典型场景 |
|---|---|---|
| 简报 (Briefing) | 24小时综合摘要(发帖+提及+资料) | 晨间社交速览 |
| 时间线 (Timeline) | 近期发帖、互动数据、历史高互动帖 | 内容表现追踪 |
| 提及 (Mentions) | 回复与@提及监控,可选上下文展开 | 社交互动管理 |
| 阅读 (Read) | 任意推文/串文抓取,URL或ID直读 | 外链内容归档 |
| 书签 (Bookmarks) | 本地存储的收藏管理 | 稍后阅读体系 |
| 用户资料 (User) | 个人资料统计、粉丝变化追踪 | 账号成长监测 |
显著优点
- 成本精细化管控:每项操作明码标价($0.005–$0.02),内置
--dry-run 预览、--budget-mode 分级(guarded/relaxed/unlimited)及日预算硬上限(lite/standard/intense 三档),彻底解决 API 费用不可控痛点
- 智能本地缓存:
top、--spend-report、bookmarks add/remove 等操作完全免费;跨会话缓存避免重复付费,配合 "Never call the same command twice" 规则实现零浪费
- 场景化工作流:
x_briefing.py 一键替代多命令组合(节省 30%+ 成本),activity 子命令专为「工作 accountability」场景设计
- 技术栈现代:基于
uv 运行环境,Python 脚本即取即用,无复杂依赖
潜在局限
- 付费门槛:核心功能依赖 X API v2 付费层级,零预算用户无法使用
- 平台绑定:深度耦合 X 生态,无多平台(Bluesky/Mastodon)适配
- 隐私集中:需存储 API 密钥于本地
~/.openclaw/.env,单点凭据泄露风险
- 反爬依赖:若 X 调整 API 定价或限流,现有成本模型可能失效
适合人群
- 内容创作者/运营者:需量化帖子表现、追踪粉丝增长
- 社交戒断实践者:通过
activity 检查实现数字健康 accountability
- 信息策展人:结合
read + bookmarks 构建个人推文知识库
- 成本敏感开发者:API 预算可控、拒绝惊喜账单的自动化需求
常规风险
- 预算超限:尽管有
guarded 模式,用户仍可能通过 --force 或 --no-budget 绕过限制
- 数据滞留:本地缓存缺乏加密说明,设备丢失可能导致推文阅读历史泄露
- API 服务变更:X 平台历史上有突发调价、封号先例,技能可持续性存外部依赖
--dry-run 预览、--budget-mode 分级(guarded/relaxed/unlimited)及日预算硬上限(lite/standard/intense 三档),彻底解决 API 费用不可控痛点top、--spend-report、bookmarks add/remove 等操作完全免费;跨会话缓存避免重复付费,配合 "Never call the same command twice" 规则实现零浪费x_briefing.py 一键替代多命令组合(节省 30%+ 成本),activity 子命令专为「工作 accountability」场景设计uv 运行环境,Python 脚本即取即用,无复杂依赖- 付费门槛:核心功能依赖 X API v2 付费层级,零预算用户无法使用
- 平台绑定:深度耦合 X 生态,无多平台(Bluesky/Mastodon)适配
- 隐私集中:需存储 API 密钥于本地
~/.openclaw/.env,单点凭据泄露风险 - 反爬依赖:若 X 调整 API 定价或限流,现有成本模型可能失效
适合人群
- 内容创作者/运营者:需量化帖子表现、追踪粉丝增长
- 社交戒断实践者:通过
activity 检查实现数字健康 accountability
- 信息策展人:结合
read + bookmarks 构建个人推文知识库
- 成本敏感开发者:API 预算可控、拒绝惊喜账单的自动化需求
常规风险
- 预算超限:尽管有
guarded 模式,用户仍可能通过 --force 或 --no-budget 绕过限制
- 数据滞留:本地缓存缺乏加密说明,设备丢失可能导致推文阅读历史泄露
- API 服务变更:X 平台历史上有突发调价、封号先例,技能可持续性存外部依赖
activity 检查实现数字健康 accountabilityread + bookmarks 构建个人推文知识库- 预算超限:尽管有
guarded模式,用户仍可能通过--force或--no-budget绕过限制 - 数据滞留:本地缓存缺乏加密说明,设备丢失可能导致推文阅读历史泄露
- API 服务变更:X 平台历史上有突发调价、封号先例,技能可持续性存外部依赖
技能正文
name: x-twitter
description: >
Personal X (Twitter) analytics — timeline engagement, mentions, follower tracking,
read any tweet/thread, bookmarks, and combined briefings via X API v2.
Cost-optimized with persistent local store and daily budget guards.
metadata: {"openclaw":{"emoji":"𝕏","requires":{"bins":["uv"]}}}
X (Twitter) Personal Analytics
Monitor your X account — posts, engagement, mentions, followers. Read any tweet. Built for daily briefings and accountability.
Triggers
Use this skill when the user asks about:
- Their X / Twitter posts, timeline, or engagement
- Mentions, replies, or who's talking about them on X
- Follower count, profile stats, follower growth
- "What's happening on my X?" / "How are my posts doing?"
- "Check my Twitter mentions" / "Any new replies?"
- Morning briefing / daily social media summary
- "Am I on X too much?" / accountability check
- Reading a specific tweet or thread (user sends a tweet URL)
- "What did @someone say?" / reading other people's tweets
- Bookmarking or saving tweets for later
- X/Twitter analytics or performance
Prerequisites
Run setup first (imports credentials from ~/.openclaw/.env or prompts interactively):
uv run scripts/x_setup.py
Commands
Briefing — combined morning summary
# Full briefing: your posts + mentions + profile (last 24h, ~$0.02)
uv run scripts/x_briefing.py
# Custom lookback period
uv run scripts/x_briefing.py --hours 48
# Preview cost
uv run scripts/x_briefing.py --dry-run
Timeline — your posts + engagement
# Recent posts with engagement metrics
uv run scripts/x_timeline.py recent
# Last 5 posts
uv run scripts/x_timeline.py recent --max 5
# Posts from last 24 hours
uv run scripts/x_timeline.py recent --hours 24
# Top posts by engagement (from local store, no API call)
uv run scripts/x_timeline.py top --days 7
# Refresh metrics for a specific tweet
uv run scripts/x_timeline.py refresh TWEET_ID
# Accountability check — are they on X right now?
uv run scripts/x_timeline.py activity
Mentions — who's talking to/about you
# Recent mentions
uv run scripts/x_mentions.py recent
# Mentions from last 24 hours
uv run scripts/x_mentions.py recent --hours 24
# Mentions with context (shows what they replied to — costs extra)
uv run scripts/x_mentions.py recent --context
Read — fetch any tweet or thread
# Read a tweet by URL
uv run scripts/x_read.py https://x.com/user/status/123456
# Read by bare ID
uv run scripts/x_read.py 123456
# Fetch full thread
uv run scripts/x_read.py 123456 --thread
# Preview cost
uv run scripts/x_read.py --dry-run https://x.com/user/status/123456
Bookmarks — save and manage
# List your bookmarks
uv run scripts/x_bookmarks.py list
# Bookmark a post
uv run scripts/x_bookmarks.py add TWEET_ID
# Remove a bookmark
uv run scripts/x_bookmarks.py remove TWEET_ID
User Profile — stats + follower tracking
# Your profile stats
uv run scripts/x_user.py me
# Track follower changes over time
uv run scripts/x_user.py me --track
# Look up another user
uv run scripts/x_user.py lookup someuser
Setup & Spend
# Validate credentials
uv run scripts/x_setup.py --check
# Show config (secrets redacted)
uv run scripts/x_setup.py --show
# Weekly spend summary
uv run scripts/x_setup.py --spend-report
# 30-day spend report
uv run scripts/x_setup.py --spend-report --days 30
# Set budget mode
uv run scripts/x_setup.py --budget-mode relaxed
# Print version
uv run scripts/x_setup.py --version
Cost Control Flags (all scripts)
# Preview cost without making the API call
uv run scripts/x_timeline.py --dry-run recent
# Override budget guard
uv run scripts/x_timeline.py --force recent
# Skip all budget checks and warnings
uv run scripts/x_timeline.py --no-budget recent
Workflows
Morning Brief
uv run scripts/x_briefing.py
# Recent posts with engagement metrics
uv run scripts/x_timeline.py recent
# Last 5 posts
uv run scripts/x_timeline.py recent --max 5
# Posts from last 24 hours
uv run scripts/x_timeline.py recent --hours 24
# Top posts by engagement (from local store, no API call)
uv run scripts/x_timeline.py top --days 7
# Refresh metrics for a specific tweet
uv run scripts/x_timeline.py refresh TWEET_ID
# Accountability check — are they on X right now?
uv run scripts/x_timeline.py activity
# Recent mentions
uv run scripts/x_mentions.py recent
# Mentions from last 24 hours
uv run scripts/x_mentions.py recent --hours 24
# Mentions with context (shows what they replied to — costs extra)
uv run scripts/x_mentions.py recent --context
Read — fetch any tweet or thread
# Read a tweet by URL
uv run scripts/x_read.py https://x.com/user/status/123456
# Read by bare ID
uv run scripts/x_read.py 123456
# Fetch full thread
uv run scripts/x_read.py 123456 --thread
# Preview cost
uv run scripts/x_read.py --dry-run https://x.com/user/status/123456
Bookmarks — save and manage
# List your bookmarks
uv run scripts/x_bookmarks.py list
# Bookmark a post
uv run scripts/x_bookmarks.py add TWEET_ID
# Remove a bookmark
uv run scripts/x_bookmarks.py remove TWEET_ID
User Profile — stats + follower tracking
# Your profile stats
uv run scripts/x_user.py me
# Track follower changes over time
uv run scripts/x_user.py me --track
# Look up another user
uv run scripts/x_user.py lookup someuser
Setup & Spend
# Validate credentials
uv run scripts/x_setup.py --check
# Show config (secrets redacted)
uv run scripts/x_setup.py --show
# Weekly spend summary
uv run scripts/x_setup.py --spend-report
# 30-day spend report
uv run scripts/x_setup.py --spend-report --days 30
# Set budget mode
uv run scripts/x_setup.py --budget-mode relaxed
# Print version
uv run scripts/x_setup.py --version
Cost Control Flags (all scripts)
# Preview cost without making the API call
uv run scripts/x_timeline.py --dry-run recent
# Override budget guard
uv run scripts/x_timeline.py --force recent
# Skip all budget checks and warnings
uv run scripts/x_timeline.py --no-budget recent
Workflows
Morning Brief
uv run scripts/x_briefing.py
# Read a tweet by URL
uv run scripts/x_read.py https://x.com/user/status/123456
# Read by bare ID
uv run scripts/x_read.py 123456
# Fetch full thread
uv run scripts/x_read.py 123456 --thread
# Preview cost
uv run scripts/x_read.py --dry-run https://x.com/user/status/123456
# List your bookmarks
uv run scripts/x_bookmarks.py list
# Bookmark a post
uv run scripts/x_bookmarks.py add TWEET_ID
# Remove a bookmark
uv run scripts/x_bookmarks.py remove TWEET_ID
User Profile — stats + follower tracking
# Your profile stats
uv run scripts/x_user.py me
# Track follower changes over time
uv run scripts/x_user.py me --track
# Look up another user
uv run scripts/x_user.py lookup someuser
Setup & Spend
# Validate credentials
uv run scripts/x_setup.py --check
# Show config (secrets redacted)
uv run scripts/x_setup.py --show
# Weekly spend summary
uv run scripts/x_setup.py --spend-report
# 30-day spend report
uv run scripts/x_setup.py --spend-report --days 30
# Set budget mode
uv run scripts/x_setup.py --budget-mode relaxed
# Print version
uv run scripts/x_setup.py --version
Cost Control Flags (all scripts)
# Preview cost without making the API call
uv run scripts/x_timeline.py --dry-run recent
# Override budget guard
uv run scripts/x_timeline.py --force recent
# Skip all budget checks and warnings
uv run scripts/x_timeline.py --no-budget recent
Workflows
Morning Brief
uv run scripts/x_briefing.py
# Your profile stats
uv run scripts/x_user.py me
# Track follower changes over time
uv run scripts/x_user.py me --track
# Look up another user
uv run scripts/x_user.py lookup someuser
# Validate credentials
uv run scripts/x_setup.py --check
# Show config (secrets redacted)
uv run scripts/x_setup.py --show
# Weekly spend summary
uv run scripts/x_setup.py --spend-report
# 30-day spend report
uv run scripts/x_setup.py --spend-report --days 30
# Set budget mode
uv run scripts/x_setup.py --budget-mode relaxed
# Print version
uv run scripts/x_setup.py --version
Cost Control Flags (all scripts)
# Preview cost without making the API call
uv run scripts/x_timeline.py --dry-run recent
# Override budget guard
uv run scripts/x_timeline.py --force recent
# Skip all budget checks and warnings
uv run scripts/x_timeline.py --no-budget recent
Workflows
Morning Brief
uv run scripts/x_briefing.py
# Preview cost without making the API call
uv run scripts/x_timeline.py --dry-run recent
# Override budget guard
uv run scripts/x_timeline.py --force recent
# Skip all budget checks and warnings
uv run scripts/x_timeline.py --no-budget recent
Morning Brief
uv run scripts/x_briefing.py
Single command replaces running timeline + mentions + user separately. Costs ~$0.02.
Accountability Check
uv run scripts/x_timeline.py activity
uv run scripts/x_timeline.py activity
Use this when the user should be working — it shows when they last posted and how active they've been. Nudge them if they're spending too much time on X.
Weekly Review
uv run scripts/x_timeline.py top --days 7
uv run scripts/x_user.py me --track
Agent Guidelines — READ THIS BEFORE CALLING ANY COMMAND
uv run scripts/x_timeline.py top --days 7
uv run scripts/x_user.py me --track
Every command costs real money. The X API charges per request. Follow these rules to minimize spend:
Rules
- Never call the same command twice in one conversation unless the user explicitly asks for fresh data. The scripts cache locally — if you already ran
recent this session, just reference those results.
- Prefer
top over recent for repeat questions. top reads from the local store for free ($0). recent hits the API ($0.005).
- Don't use
--context on mentions by default. It costs an extra $0.005 per reply thread it fetches. Only add it if the user specifically asks "what were they replying to?"
- Use
--max 5 for quick checks. Default is 10-20. If the user just wants a summary, pull fewer.
- Use
--hours 24 for briefings. Don't pull the full timeline when they just want "what happened today."
- Never run all scripts unprompted. If the user asks "what's happening on my X?", use
x_briefing.py instead of running 3 separate commands.
- For accountability checks, use
activity only. It's a single API call. Don't also pull mentions and profile — that triples the cost.
top and refresh are your friends. top is free (local data). refresh TWEET_ID updates just one tweet ($0.005) — use it when they ask "how's my last post doing?" instead of re-pulling the whole timeline.
- Watch the daily spend total. Every command output shows "Today's spend: $X.XXX". If it's approaching the budget limit, tell the user before making more calls.
- Never loop or retry on your own. If a command fails (402, rate limit, etc.), report the error. Don't retry automatically.
- x_read.py caches tweets — if the user asks about the same tweet again, it's already in the local store. No need to re-fetch.
- Use x_briefing.py for morning briefings instead of running timeline + mentions + user separately. It's cheaper ($0.02 vs $0.02 for 3 separate commands) and cleaner output.
Cost Reference
Action
Cost
When to use
x_briefing.py
$0.02
Morning briefing — one command does it all
recent
$0.005
Once per briefing, or when user asks for new posts
top
$0
Anytime — serves from local store
activity
$0.005
Accountability check, once per session max
refresh ID
$0.005
User asks about a specific post's performance
mentions recent
$0.005
Once per briefing, or user asks about replies
mentions --context
$0.005-0.03
Only when user explicitly wants reply context
x_read.py URL
$0.005
User sends a tweet URL or asks to read a post
x_read.py --thread
$0.005-0.01
User asks for full thread
x_bookmarks.py list
$0.005
User wants to see saved bookmarks
x_bookmarks.py add/remove
$0
Write actions are free
user me
$0.01
Profile check, once per day is plenty
user me --track
$0.01
Morning brief only — saves follower delta
user lookup
$0.01
Only when user asks about another account
--spend-report
$0
Check spending anytime
--dry-run
$0
Preview cost before any command
Budget Modes
recent this session, just reference those results.top over recent for repeat questions. top reads from the local store for free ($0). recent hits the API ($0.005).--context on mentions by default. It costs an extra $0.005 per reply thread it fetches. Only add it if the user specifically asks "what were they replying to?"--max 5 for quick checks. Default is 10-20. If the user just wants a summary, pull fewer.--hours 24 for briefings. Don't pull the full timeline when they just want "what happened today."x_briefing.py instead of running 3 separate commands.activity only. It's a single API call. Don't also pull mentions and profile — that triples the cost.top and refresh are your friends. top is free (local data). refresh TWEET_ID updates just one tweet ($0.005) — use it when they ask "how's my last post doing?" instead of re-pulling the whole timeline.| Action | Cost | When to use |
|---|---|---|
x_briefing.py |
$0.02 | Morning briefing — one command does it all |
recent |
$0.005 | Once per briefing, or when user asks for new posts |
top |
$0 | Anytime — serves from local store |
activity |
$0.005 | Accountability check, once per session max |
refresh ID |
$0.005 | User asks about a specific post's performance |
mentions recent |
$0.005 | Once per briefing, or user asks about replies |
mentions --context |
$0.005-0.03 | Only when user explicitly wants reply context |
x_read.py URL |
$0.005 | User sends a tweet URL or asks to read a post |
x_read.py --thread |
$0.005-0.01 | User asks for full thread |
x_bookmarks.py list |
$0.005 | User wants to see saved bookmarks |
x_bookmarks.py add/remove |
$0 | Write actions are free |
user me |
$0.01 | Profile check, once per day is plenty |
user me --track |
$0.01 | Morning brief only — saves follower delta |
user lookup |
$0.01 | Only when user asks about another account |
--spend-report |
$0 | Check spending anytime |
--dry-run |
$0 | Preview cost before any command |
Budget Modes
The user can set a budget enforcement mode via x_setup.py --budget-mode:
- guarded (default): Warn at 50/80/100%, block at limit
- relaxed: Warn at 50/80/100%, never block
- unlimited: No warnings, no blocks
Budget Tiers
The user set a daily budget during setup. The scripts will warn and block when the limit is hit:
- lite: $0.03/day (~1 briefing)
- standard: $0.10/day (~3-5 checks)
- intense: $0.25/day (~10+ checks)
If blocked, tell the user: "Daily X API budget reached. Use --force to override, or wait until tomorrow."
What NOT to do
- Don't run commands "just to have fresh data" — only fetch when the user needs it
- Don't use
--no-cache unless debugging
- Don't call
user lookup on multiple accounts in a loop
- Don't refresh every tweet's metrics — only refresh specific ones the user asks about
- Don't combine
recent + mentions + user in one response — use x_briefing.py instead
--no-cache unless debugginguser lookup on multiple accounts in a looprecent + mentions + user in one response — use x_briefing.py instead正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。