Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

XFetch - X/Twitter Intelligence Skill for Claude Code

A Claude Code skill that provides real-time X/Twitter social data and insights via a configurable backend plus optional direct calls to the official X API.

Features

  • Tweets: Fetch recent tweets from any user
  • Hot/Trending: Find trending tweets by time, region, and tag
  • Ghost Tweets: Detect deleted tweets
  • Profile Traces: Track profile change history (bio, name, avatar)
  • Social Tracking: Monitor follow/unfollow actions
  • KOL Ranking: Deep account analysis with rankings and MBTI
  • Tweet Detail: Get full details of any tweet by URL or ID
  • Content Draft: Generate tweet ideas from viral topics

Prerequisites

  • Node.js
  • Third-party API Key: Set XFETCH_API_KEY for the configurable backend
  • Official X API Token: Set XFETCH_X_BEARER_TOKEN for direct api.x.com calls
  • Optional API Host Override: Set XFETCH_API_HOST to a bare hostname only
  • Legacy env fallback disabled by default: XCLAW_API_KEY and CRYPTOHUNT_API_KEY are only read when XFETCH_ALLOW_LEGACY_ENV=1

Safety Notes

  • Do not inline tokens in the command line or commit them to config files.
  • Keep third-party backend credentials separate from official X API bearer tokens unless you explicitly intend to reuse them.
  • XFETCH_API_HOST rejects localhost, .local, and URL-style values with protocol or path.
  • Network requests time out after 15 seconds and large responses are capped.

Installation as Claude Code Skill

Copy the xfetch.js and SKILL.md files into your Claude Code skills directory:

mkdir -p ~/.claude/skills/xfetch
cp xfetch.js SKILL.md ~/.claude/skills/xfetch/

Usage

# Fetch recent tweets
node xfetch.js tweets CryptoPainter_X 20

# Trending tweets (last 24h, CN region)
node xfetch.js hot 24 cn AI

# Deleted tweets
node xfetch.js ghost elonmusk

# Profile change history
node xfetch.js traces CryptoPainter_X

# Follow/unfollow tracking
node xfetch.js social CryptoPainter_X

# Deep KOL analysis
node xfetch.js rank CryptoPainter_X

# Tweet detail
node xfetch.js detail 1234567890

# Content ideation from viral topics
node xfetch.js draft 24 cn

Flags

  • --full: Include raw text and HTML content in output
  • --verbose: Backend-specific expansion flag. It is ignored for direct api.x.com tweet fetches.

Output

All commands output formatted JSON to stdout. The tweets and hot commands use a "slim" format by default that extracts: author, title, abstract, engagement metrics, time, and link.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages