Crypto Twitter intelligence skill for Claude Code. Turns X/Twitter into a structured research layer for crypto narratives, tokens, and strategies.
- TweetRank — PageRank-inspired credibility scoring. Weights bookmarks > quotes > likes > retweets. Detects coordinated shill raids.
- Multi-signal token detection — Cashtags, plain name phrases, pump.fun/dexscreener URLs, contract addresses with context-window scoring.
- X article support — Full text extraction for long-form posts (>280 chars) at no extra API cost.
- Tool discovery — Suggests follow-up actions using available MCP tools (DeFi Llama, Backpack, Polymarket).
- Cost-optimized — Quick mode default (~$0.10/search, 20 tweets), aggressive caching, auto noise filters.
# Recommended: installs skill + symlinks to Claude Code, Cursor, Codex, etc.
npx skills add sendaifun/ct-alpha -g
# Or: one-liner (clones repo + interactive setup)
curl -fsSL https://raw.githubusercontent.com/sendaifun/ct-alpha/main/install.sh | bash
# Or: manual
git clone https://github.com/sendaifun/ct-alpha.git ~/ct-alpha
cd ~/ct-alpha && bun run install.tsX API Bearer Token is prompted on first CLI run if not set. No separate setup step needed.
ct-alpha uses the X API v2 pay-per-use model — no monthly subscription, you only pay for tweets fetched. Recommended starting credits: $50 (enough for ~500 searches in quick mode).
- Go to console.x.com and log in with your X account
- Accept the Developer Agreement and Policy
- Describe your use case (e.g. "Crypto market research and sentiment analysis")
- From the dashboard, click Create App (or "Create Project" → "Add App")
- Give it a name (e.g.
ct-alpha) - Your credentials will be generated automatically
- In your app settings, go to Keys and Tokens
- Find the Bearer Token and copy it
- Save it somewhere safe — it's only shown once (you can regenerate if lost)
- In the Developer Console, go to Billing
- Add a payment method
- Purchase $50 in credits (pricing details)
- Credits are deducted per tweet fetched (~$0.005/tweet). Same tweet fetched twice in 24h is only charged once.
The installer will prompt for your token automatically. Or set it manually:
mkdir -p ~/.config/env
echo 'export X_BEARER_TOKEN="YOUR_TOKEN_HERE"' >> ~/.config/env/global.envThat's it — you're ready to search CT.
"what's CT saying about Pendle?"
"trending tokens on Solana"
"find yield strategies for JTO"
# Read a tweet/article by URL ($0.005)
bun run ct-search.ts read https://x.com/user/status/123
# Read with full thread + replies
bun run ct-search.ts read https://x.com/user/status/123 --thread
# Search
bun run ct-search.ts search "$SOL alpha" --quick --extract-tickers
# Trending tokens
bun run ct-search.ts trending --window 6h --solana-only
# Monitor watchlist
bun run ct-search.ts watchlist --since 24h
# API spend
bun run ct-search.ts costX API charges $0.005/tweet via xAI pay-per-use.
| Operation | Tweets | Cost |
|---|---|---|
| Read tweet/article | 1 | $0.005 |
| Read + thread | 1 + replies | ~$0.005-0.10 |
| Quick search (default) | 20 | ~$0.10 |
Full search (--full) |
up to 100 | ~$0.50 |
| Trending scan | 2-3 queries x 30 | ~$0.30-0.45 |
Same tweet re-read within 24h (UTC) is free (X API deduplication).
Quick mode is always default. Cost displayed after every operation.
ct-search.ts CLI entry point + inline token onboarding
lib/
api.ts X API v2 wrapper (search, threads, profiles)
tweetrank.ts Credibility scoring + raid detection
extract.ts Multi-signal extraction (tickers, CAs, URLs, name-phrases)
filters.ts Crypto noise filters + engagement thresholds
cache.ts Redis-backed cache with local-file fallback
cost.ts Redis-backed usage tracking with local-file fallback
format.ts Structured output with trust labels
runtime-store.ts Redis-backed sessions, balances, reservations, top-ups
data/
watchlist.default.json Default CT accounts (shipped)
known-tokens.json Token name-to-ticker mappings
SKILL.md Skill definition (skills.sh compatible)
install.ts Interactive installer
install.sh One-line shell installer
- Bun v1.0+
- X API Bearer Token (developer.x.com, pay-per-use via xAI)
ct-alpha now also ships a Bun + Hono HTTP server with two API surfaces:
GET /x402/*Fixed-price x402 endpoints for standard clients.GET /metered/*Session-authenticated metered endpoints for internal tooling, backed by a wallet credit ledger.
Hosted public standard endpoint: https://x-research.suzi.trade
cp .env.example .envX_BEARER_TOKENX402_FACILITATOR_URLX402_PAY_TOX402_NETWORK(mainnetby default, ordevnet/testnet)REDIS_URL(recommended for any hosted deployment)REDIS_PREFIX(optional, defaults toct-alpha)PORT(optional, defaults to3000)
bun install
bun run dev:apiLocal containerized stack:
cp .env.example .env
docker compose up --buildThis starts:
- the Bun API on
http://localhost:3000 - Redis on
localhost:6379
The compose stack injects REDIS_URL=redis://redis:6379 for the API container.
For production:
- run the same image behind HTTPS
- inject secrets from your secret manager instead of a checked-in
.env - point
REDIS_URLat your managed Redis instance - keep
X_BEARER_TOKEN,X402_FACILITATOR_URL, andX402_PAY_TOin the secret manager
Hosted base URL for public standard routes: https://x-research.suzi.trade
GET /x402/read?tweetId=...GET /x402/search/20?q=...GET /x402/search/100?q=...GET /x402/accounts-feed/20?accounts=a,b,cGET /x402/accounts-feed/100?accounts=a,b,cGET /x402/thread/100?tweetId=...GET /x402/trending/solana?window=6hGET /x402/trending/general?window=6h
All standard routes support fresh=true. Cache-served responses bypass x402 and return for free.
Example hosted request:
https://x-research.suzi.trade/x402/search/20?q=solana&since=24h
Script defaults:
bun run e2e:devnettargets the hosted standard endpoint by default.bun run e2e:all:devnetstays local-first for full standard + metered coverage, but switches to the hosted endpoint by default whenX402_E2E_SCOPE=standard.- Override either script with
CT_ALPHA_BASE_URLor the more specificX402_E2E_URL/X402_E2E_BASE_URL.
POST /metered/auth/siwxGET /metered/credits/balancePOST /metered/credits/topup/5POST /metered/credits/topup/10POST /metered/credits/topup/25POST /metered/credits/topup/50GET /metered/read?tweetId=...GET /metered/search?q=...&limit=20GET /metered/accounts-feed?accounts=a,b,c&limit=20GET /metered/thread?tweetId=...GET /metered/trending?solanaOnly=true
Metered requests use:
POST /metered/auth/siwxwith aSIGN-IN-WITH-Xheader.Authorization: Bearer <session_token>on subsequent metered and top-up routes.402 Payment Requiredon insufficient balance, with top-up suggestions in the JSON body.
Internal tooling can use the shared helper in lib/metered-client.ts. It handles:
- SIWx auth for
/metered/auth/siwx - bearer session headers for metered routes
- x402-paid top-ups, including the required
payment-identifierextension - typed convenience methods for
read,search,accounts-feed,thread, andtrending
import { readFileSync } from "fs";
import { createKeyPairSignerFromBytes } from "@solana/kit";
import { toClientSvmSigner } from "@x402/svm";
import { ApiResponseError, MeteredApiClient } from "./lib/metered-client";
const payerSecret = new Uint8Array(
JSON.parse(readFileSync("./data/runtime/devnet-payer.json", "utf-8"))
);
const payerSigner = toClientSvmSigner(await createKeyPairSignerFromBytes(payerSecret));
const client = new MeteredApiClient({
baseUrl: process.env.CT_ALPHA_BASE_URL || "http://localhost:3000",
paymentSigner: payerSigner,
});
const auth = await client.authenticate();
try {
const result = await client.search(auth.session.sessionToken, {
q: "solana",
limit: 20,
since: "24h",
fresh: true,
});
console.log(result.body.meta);
} catch (error) {
if (error instanceof ApiResponseError && error.status === 402) {
await client.topup(auth.session.sessionToken, 5);
} else {
throw error;
}
}