ct-alpha
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCT Alpha — Crypto Twitter Intelligence
CT Alpha — 加密货币Twitter情报工具
Turn X/Twitter into an actionable crypto intelligence layer. Search CT for narratives, alpha, strategies, and sentiment, then rank results using TweetRank (a PageRank-inspired credibility scoring system), extract tokens/CAs from multiple signals, detect coordinated raids, and suggest execution steps using available tools.
将X/Twitter转化为可落地的加密货币情报层。搜索CT上的叙事、Alpha信息、策略和市场情绪,然后通过TweetRank(受PageRank启发的可信度评分系统)对结果排序,从多信号中提取代币/合约地址,检测协同拉盘行为,并结合可用工具推荐执行步骤。
Overview
概述
- Search: Query CT with crypto-optimized noise filters and relevancy sorting
- TweetRank: Score tweets by author credibility + engagement quality + recency
- Multi-Signal Token Detection: Cashtags, name-phrases, crypto URLs, contract addresses
- Raid Detection: Flag tickers promoted mostly by low-credibility accounts
- Trending: Detect trending tokens across multiple search queries
- Watchlist: Monitor trusted CT accounts by category
- Thread Hydration: Fetch full conversation threads
- X Articles: Full-text extraction of long-form posts (>280 chars)
- Cost Tracking: Per-session API spend tracking (~$0.005/tweet)
- Dynamic Tool Discovery: Suggest follow-up actions with DeFi Llama, Backpack, Polymarket, etc.
- 搜索:使用针对加密货币优化的噪音过滤器和相关性排序查询CT内容
- TweetRank:根据作者可信度+互动质量+时效性为推文评分
- 多信号代币检测:支持现金标签、名称短语、加密货币URL、合约地址提取
- 拉盘检测:标记主要由低可信度账号推广的代币代码
- 趋势检测:在多个搜索查询中发现热门代币
- 关注列表:按类别监控可信CT账号
- 线程补全:获取完整对话线程
- X长文:提取长文帖子的全文内容(超过280字符)
- 成本追踪:按会话追踪API支出(约0.005美元/条推文)
- 动态工具发现:推荐使用DeFi Llama、Backpack、Polymarket等工具进行后续操作
Prerequisites
前置要求
- Runtime: Bun (TypeScript runtime)
- API Token: X API Bearer Token from developer.x.com (pay-per-use via xAI)
- Cost: ~$0.005 per tweet read, ~$0.10 per quick search (20 tweets)
- 运行环境:Bun(TypeScript运行时)
- API令牌:从developer.x.com获取的X API Bearer Token(通过xAI按使用付费)
- 成本:每条读取的推文约0.005美元,每次快速搜索(20条推文)约0.10美元
Quick Start
快速开始
Installation
安装
bash
undefinedbash
undefinedClone the skill
克隆技能仓库
git clone https://github.com/yashhsm/skills.git
cd skills/skills/ct-alpha
git clone https://github.com/yashhsm/skills.git
cd skills/skills/ct-alpha
Run the installer (configures token, watchlist, cache)
运行安装程序(配置令牌、关注列表、缓存)
bun run install.ts
undefinedbun run install.ts
undefinedEnvironment Setup
环境配置
bash
undefinedbash
undefinedSet your X API Bearer Token
设置你的X API Bearer Token
export X_BEARER_TOKEN="your_token_here"
export X_BEARER_TOKEN="your_token_here"
Or save to persistent env file
或保存到持久化环境变量文件
mkdir -p ~/.config/env
echo 'export X_BEARER_TOKEN="your_token_here"' >> ~/.config/env/global.env
source ~/.config/env/global.env
undefinedmkdir -p ~/.config/env
echo 'export X_BEARER_TOKEN="your_token_here"' >> ~/.config/env/global.env
source ~/.config/env/global.env
undefinedBasic Usage
基础使用
bash
undefinedbash
undefinedSearch for alpha on a token
搜索某代币的Alpha信息
bun run ct-search.ts search "$SOL alpha" --quick
bun run ct-search.ts search "$SOL alpha" --quick
Detect trending tokens
检测热门代币
bun run ct-search.ts trending --window 6h --solana-only
bun run ct-search.ts trending --window 6h --solana-only
Monitor watchlist accounts
监控关注列表账号
bun run ct-search.ts watchlist --since 24h
bun run ct-search.ts watchlist --since 24h
Read a specific tweet or article
读取特定推文或长文
bun run ct-search.ts read https://x.com/user/status/123456
bun run ct-search.ts read https://x.com/user/status/123456
Check API spending
查看API支出
bun run ct-search.ts cost
undefinedbun run ct-search.ts cost
undefinedCLI Reference
CLI参考
search — Core research command
search — 核心研究命令
bash
bun run ct-search.ts search "<query>" [flags]| Flag | Description | Default |
|---|---|---|
| 20 tweets, 1hr cache, ~$0.10 | Default mode |
| Up to 100 tweets, 15min cache, ~$0.50 | Confirm cost first |
| Max total tweets | 20 (quick), 100 (full) |
| | |
| | |
| Engagement filter | 3 (quick) |
| Restrict to specific accounts | — |
| Show extracted tickers | — |
| Show contract addresses and crypto URLs | — |
| JSON output | — |
bash
bun run ct-search.ts search "<query>" [flags]| 标记 | 描述 | 默认值 |
|---|---|---|
| 20条推文,1小时缓存,约0.10美元 | 默认模式 |
| 最多100条推文,15分钟缓存,约0.50美元 | 需先确认成本 |
| 推文总数上限 | 20(快速模式),100(完整模式) |
| 排序字段: | |
| 时间范围: | |
| 互动量过滤器 | 3(快速模式) |
| 限制为特定账号 | — |
| 显示提取的代币代码 | — |
| 显示合约地址和加密货币URL | — |
| 输出JSON格式 | — |
trending — Multi-signal trending detection
trending — 多信号趋势检测
bash
bun run ct-search.ts trending [flags]| Flag | Description | Default |
|---|---|---|
| | |
| Minimum mention count | 3 |
| Solana ecosystem only | — |
| Top N results | 20 |
bash
bun run ct-search.ts trending [flags]| 标记 | 描述 | 默认值 |
|---|---|---|
| 时间窗口: | |
| 最低提及次数 | 3 |
| 仅覆盖Solana生态 | — |
| 显示前N个结果 | 20 |
watchlist — Monitor CT accounts
watchlist — 监控CT账号
bash
bun run ct-search.ts watchlist [flags]| Flag | Description | Default |
|---|---|---|
| Filter by category | all |
| Time window | |
bash
bun run ct-search.ts watchlist [flags]| 标记 | 描述 | 默认值 |
|---|---|---|
| 按类别过滤 | all |
| 时间窗口 | |
read — Read a specific tweet/article
read — 读取特定推文/长文
bash
bun run ct-search.ts read <tweet_url_or_id> [--thread] [--raw]Accepts x.com URLs, twitter.com URLs, or raw tweet IDs. Articles (long-form posts) are fetched in full.
bash
bun run ct-search.ts read <tweet_url_or_id> [--thread] [--raw]支持x.com链接、twitter.com链接或原始推文ID。长文帖子会被完整提取。
thread — Hydrate conversation thread
thread — 补全对话线程
bash
bun run ct-search.ts thread <tweet_id>bash
bun run ct-search.ts thread <tweet_id>cost — Track API spending
cost — 追踪API支出
bash
bun run ct-search.ts cost [--reset]bash
bun run ct-search.ts cost [--reset]Core Features
核心功能
TweetRank Scoring
TweetRank评分
Every tweet is scored by three factors multiplied together:
- AuthorCred (0-10): Watchlist membership (+5), follower/following ratio (capped +5), verification (+1), account age (log scale, capped +2), bot penalty (-3)
- EngagementQuality: Bookmarks (×3, unfakeable) > Quotes (×2.5, high effort) > Likes (×1.5) > Retweets (×1, easily botted). All log-scaled.
- RecencyBoost: — newer tweets score higher.
1 / (1 + hoursAgo / 24)
TweetRank = AuthorCred × EngagementQuality × RecencyBoostEach tweet receives a source label:
- — Author is on your watchlist (highest trust)
[WATCHLIST] - — AuthorCred ≥ 5
[HIGH-CRED] - — Unverified author
[UNKNOWN] - — Bot-like patterns detected
[SUSPICIOUS]
每条推文的得分由三个因素相乘得出:
- AuthorCred(0-10):关注列表成员(+5)、粉丝/关注者比率(上限+5)、认证标识(+1)、账号时长(对数缩放,上限+2)、机器人惩罚(-3)
- 互动质量:书签(×3,难以伪造)> 引用推文(×2.5,高投入)> 点赞(×1.5)> 转发(×1,易被机器人刷量)。所有指标均采用对数缩放。
- 时效性增益:— 最新推文得分更高。
1 / (1 + hoursAgo / 24)
TweetRank = AuthorCred × 互动质量 × 时效性增益每条推文会被标记来源类型:
- — 作者在你的关注列表中(可信度最高)
[WATCHLIST] - — AuthorCred ≥ 5
[HIGH-CRED] - — 未认证作者
[UNKNOWN] - — 检测到类机器人模式
[SUSPICIOUS]
Multi-Signal Token Detection
多信号代币检测
Cashtag-only detection misses how tokens actually spread on CT. This extracts from four signal types:
| Signal | Example | Confidence |
|---|---|---|
| Cashtag | | High |
| Name-phrase | "pendle" + crypto context | High/Medium |
| Crypto URL | pump.fun, dexscreener, birdeye, jup.ag | High |
| Contract Address | Base58 (Solana) / 0x (Ethereum) with context | High/Low |
Supported crypto URL domains: pump.fun, dexscreener.com, birdeye.so, jup.ag, raydium.io, solscan.io, etherscan.io.
仅靠现金标签检测会遗漏代币在CT上的实际传播方式。本工具从四种信号类型中提取信息:
| 信号类型 | 示例 | 可信度 |
|---|---|---|
| 现金标签 | | 高 |
| 名称短语 | "pendle" + 加密货币上下文 | 高/中 |
| 加密货币URL | pump.fun, dexscreener, birdeye, jup.ag | 高 |
| 合约地址 | Base58(Solana)/ 0x(Ethereum)+ 上下文 | 高/低 |
支持的加密货币URL域名:pump.fun, dexscreener.com, birdeye.so, jup.ag, raydium.io, solscan.io, etherscan.io.
Raid Detection
拉盘检测
Detects coordinated pump campaigns by analyzing author credibility distribution per ticker:
- If >70% of authors mentioning a ticker have low credibility (AuthorCred < 3), it's flagged as a potential raid
- Output includes raid score, total/low-cred author counts
通过分析每个代币代码的作者可信度分布,检测协同拉盘活动:
- 如果提及某代币代码的作者中超过70%为低可信度账号(AuthorCred < 3),则会被标记为潜在拉盘
- 输出内容包含拉盘评分、总作者数/低可信度作者数
Noise Filtering
噪音过滤
Every search auto-appends crypto noise filters:
- (removes retweets)
-is:retweet - ,
-"airdrop",-"giveaway"(spam removal)-"whitelist" - ,
-"follow and RT",-"follow & RT",-"free mint"(engagement bait)-"dm to claim" - Quick mode also adds
-is:reply
每次搜索会自动添加加密货币噪音过滤器:
- (移除转发)
-is:retweet - ,
-"airdrop",-"giveaway"(移除垃圾信息)-"whitelist" - ,
-"follow and RT",-"follow & RT",-"free mint"(移除互动诱饵)-"dm to claim" - 快速模式还会添加
-is:reply
Caching
缓存
Aggressive caching prevents redundant API calls:
| Cache Type | TTL | Use Case |
|---|---|---|
| Quick search | 1 hour | Default searches |
| Full search | 15 minutes | Deep dives |
| Thread | 2 hours | Conversation threads |
| Profile | 24 hours | User lookups |
| Watchlist | 4 hours | Account monitoring |
Cache is file-based (JSON) with auto-pruning on startup (24h hard limit).
激进的缓存机制可避免重复API调用:
| 缓存类型 | 过期时间 | 使用场景 |
|---|---|---|
| 快速搜索 | 1小时 | 默认搜索 |
| 完整搜索 | 15分钟 | 深度研究 |
| 对话线程 | 2小时 | 对话线程 |
| 账号资料 | 24小时 | 用户查询 |
| 关注列表 | 4小时 | 账号监控 |
缓存为基于文件的JSON格式,启动时会自动清理(硬限制24小时)。
Research Methodology
研究方法
Follow this 6-step loop for every research request:
针对每个研究请求,遵循以下6步循环:
1. Decompose
1. 拆解
Break the user's question into 1-3 targeted search queries.
- Token research: search both and plain name with OR
$TICKER - Narratives: search thematic keywords, not just token names
- Strategies: include strategy/yield/APY keywords
将用户的问题分解为1-3个针对性搜索查询。
- 代币研究:同时搜索和普通名称,用OR连接
$TICKER - 叙事研究:搜索主题关键词,而非仅代币名称
- 策略研究:包含strategy/yield/APY等关键词
2. Pre-Filter
2. 预过滤
Before any API call:
- Check cache (same query within TTL is free)
- Noise filters are automatic
- Estimate cost: Quick ~$0.10, Full ~$0.50-1.50
- Narrow time window: 24h for trending, 7d for research
在调用API前:
- 检查缓存(相同查询在过期时间内免费)
- 自动应用噪音过滤器
- 估算成本:快速搜索约0.10美元,完整搜索约0.50-1.50美元
- 缩小时间窗口:趋势分析用24小时,研究用7天
3. Search
3. 搜索
Execute with mode first (always):
--quickbash
bun run ct-search.ts search "$TOKEN alpha" --quick --extract-tickers始终先使用模式执行:
--quickbash
bun run ct-search.ts search "$TOKEN alpha" --quick --extract-tickers4. Extract
4. 提取
Analyze TweetRank scores and trust labels. Look for extracted tickers, contract addresses, and crypto URLs.
分析TweetRank得分和信任标签。查找提取的代币代码、合约地址和加密货币URL。
5. Deep-Dive (if needed)
5. 深度研究(如有需要)
- Follow high-engagement threads:
bun run ct-search.ts thread <id> - Search specific authors:
--from author1,author2 - Broaden with only if quick was insufficient
--full
- 跟进高互动线程:
bun run ct-search.ts thread <id> - 搜索特定作者:
--from author1,author2 - 仅当快速搜索结果不足时,才使用模式扩大范围
--full
6. Synthesize
6. 合成
Combine findings into actionable intelligence:
- Group by theme, not by query
- Highlight tickers with strong multi-signal detection
- Flag raid risks
- Suggest verification and execution steps
将发现整合为可落地的情报:
- 按主题分组,而非按查询分组
- 突出显示具备强多信号检测的代币
- 标记拉盘风险
- 推荐验证和执行步骤
Query String Rules
查询字符串规则
The query argument supports X API v2 operators:
| Operator | Example | Description |
|---|---|---|
| keyword | | Both words |
| | Exact phrase |
| | Either term |
| | Exclude term |
| | Tweets by user |
| | Tweets with URLs |
| | Language filter |
| | Cashtag |
Do NOT use these v1.1 operators (they cause 400 errors on v2 pay-per-use):
- ,
min_faves:N— usemin_retweets:NCLI flag instead--min-likes - ,
place:,bio:— not available on v2sample:
Do NOT manually include noise filters in the query — the CLI auto-appends them.
查询参数支持X API v2运算符:
| 运算符 | 示例 | 描述 |
|---|---|---|
| 关键词 | | 包含两个词 |
| | 精确匹配短语 |
| | 包含任一术语 |
| | 排除该术语 |
| | 特定用户的推文 |
| | 包含URL的推文 |
| | 语言过滤 |
| | 现金标签 |
请勿使用以下v1.1运算符(在v2按使用付费模式下会导致400错误):
- ,
min_faves:N— 请改用min_retweets:NCLI标记--min-likes - ,
place:,bio:— v2不支持sample:
请勿在查询中手动添加噪音过滤器 — CLI会自动追加。
Dynamic Tool Discovery
动态工具发现
After completing research, suggest execution steps using available MCP tools:
| Tool Prefix | Use Case | Example |
|---|---|---|
| TVL, yields, fees, prices | |
| Exchange price, depth, trades | |
| Prediction markets | |
| Token data, market charts | |
Always frame suggestions as "verify" not "confirm" — encourage skepticism about CT alpha.
完成研究后,推荐使用可用的MCP工具执行后续步骤:
| 工具前缀 | 使用场景 | 示例 |
|---|---|---|
| TVL、收益、手续费、价格 | |
| 交易所价格、深度、交易 | |
| 预测市场 | |
| 代币数据、市场图表 | |
始终将建议表述为“验证”而非“确认” — 鼓励对CT Alpha信息保持怀疑态度。
Cost Protocol
成本协议
- Always first (~$0.10 for 20 tweets). Relevancy sort = best results come first.
--quick - Only increase if 20 results are genuinely insufficient.
--limit - Display cost estimate before mode.
--full - Cache is aggressive — same query within TTL is free.
- Two-pass strategy: First search 20 results. If more depth needed on a sub-topic, do a targeted follow-up rather than re-running with higher limits.
- 始终先使用模式(20条推文约0.10美元)。相关性排序=最佳结果优先。
--quick - 仅当20条结果确实不足时,才增加。
--limit - 在模式前显示成本估算。
--full - 缓存机制激进 — 相同查询在过期时间内免费。
- 两步策略:先搜索20条结果。如果需要对某个子主题进行更深入研究,进行针对性跟进,而非重新运行更高限制的查询。
Best Practices
最佳实践
- Start narrow, broaden only if needed: Specific ticker + context words first
- Use for signal: Restrict to watchlist accounts for highest signal-to-noise
--from - Use for substance: Analytical content, not hot takes
has:links - Never present CT findings as authoritative: Always include confidence levels and risk bullets
- Contract addresses are always UNVERIFIED: Verify on-chain before interacting
- Two-pass research: Quick search first, then targeted deep-dives
- Track spending: Use command to monitor API usage
cost
- 先窄后宽:先搜索特定代币+上下文词,必要时再扩大范围
- 使用获取高信号:限制为关注列表账号,获得最高信噪比
--from - 使用获取有实质内容的内容:分析性内容,而非热门观点
has:links - 绝不将CT发现作为权威信息呈现:始终包含可信度水平和风险提示
- 合约地址始终未经验证:交互前务必在链上验证
- 两步研究法:先快速搜索,再进行针对性深度研究
- 追踪支出:使用命令监控API使用情况
cost
Security Considerations
安全注意事项
- X Bearer Token is stored in — ensure proper file permissions
~/.config/env/global.env - Never commit tokens to version control
- Contract addresses extracted from tweets are ALWAYS unverified — always verify on-chain
- Watchlist data is local-only (not synced or shared)
- Cache files contain tweet data — consider cleanup for sensitive research
- X Bearer Token存储在中 — 确保文件权限正确
~/.config/env/global.env - 绝不要将令牌提交到版本控制
- 从推文中提取的合约地址始终未经验证 — 务必在链上验证
- 关注列表数据仅存储在本地(不同步或共享)
- 缓存文件包含推文数据 — 敏感研究后可考虑清理
Skill Structure
技能结构
ct-alpha/
├── SKILL.md # This file — agent instructions
├── ct-search.ts # Main CLI entry point
├── setup.ts # Interactive setup script
├── install.ts # Full installer
├── lib/
│ ├── api.ts # X API v2 integration, pagination, caching
│ ├── extract.ts # Multi-signal token extraction
│ ├── tweetrank.ts # TweetRank scoring and raid detection
│ ├── format.ts # Output formatting with trust labels
│ ├── cache.ts # File-based caching layer
│ ├── cost.ts # API cost tracking
│ └── filters.ts # Noise filtering, engagement filtering
├── resources/
│ ├── x-api.md # X API v2 reference
│ ├── query-templates.md # Pre-built search patterns
│ └── tool-discovery.md # Dynamic tool suggestion map
├── data/
│ ├── known-tokens.json # Token name → ticker mappings
│ └── watchlist.default.json # Default watchlist categories
└── examples/
└── basic-search.ts # Quick start examplect-alpha/
├── SKILL.md # 本文档 — 代理指令
├── ct-search.ts # 主CLI入口
├── setup.ts # 交互式设置脚本
├── install.ts # 完整安装程序
├── lib/
│ ├── api.ts # X API v2集成、分页、缓存
│ ├── extract.ts # 多信号代币提取
│ ├── tweetrank.ts # TweetRank评分和拉盘检测
│ ├── format.ts # 带信任标签的输出格式化
│ ├── cache.ts # 基于文件的缓存层
│ ├── cost.ts # API成本追踪
│ └── filters.ts # 噪音过滤、互动过滤
├── resources/
│ ├── x-api.md # X API v2参考
│ ├── query-templates.md # 预构建搜索模式
│ └── tool-discovery.md # 动态工具推荐映射
├── data/
│ ├── known-tokens.json # 代币名称→代码映射
│ └── watchlist.default.json # 默认关注列表类别
└── examples/
└── basic-search.ts # 快速开始示例