據 AlphaMoat 統計,截至 2026-10,Clawback 累計下載 7,100 次、獲 0 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 3,970 位,在「專業領域」分類(1,228 個)中排名第 441 位。
列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。
| 平台 | 累計下載 | 星標 | 評論 |
|---|---|---|---|
| ClawHub ↗ | 4901 | - | - |
| SkillHub ↗ | 7100 | - | — |
各平台的計數口徑不同,統計時間不一致。
文件資料來源為美國眾議院 Clerk 和參議院 eFD,僅 E*TRADE 被描述為已實作並測試的券商。涵蓋設定、驗證、帳戶選擇、通知及常駐執行,並列出持倉、損失和每日交易限制。自動交易可能產生重大損失,歷史表現不保證未來結果;考慮真實帳戶前須充分審查並在 sandbox 測試。 實作/測試為發布者自述,不是本輪真實連線驗證。風險卡與來源安全主張不同,報告本機 token 處理不安全;修復前僅用 sandbox 帳戶,輪換曾用於此套件的憑證,審查安裝腳本,避免特權全域連結。需要 Python/pip、經審查相依套件、E*TRADE 憑證和 OAuth,Telegram/FMP 為可選。啟用真實交易前人工核對帳戶和風險設定。
資料釋出於 2026-10-27
以下是根據技能文件生成的示例,不代表實際執行結果。
2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-10 | 7100 | — | - |
| 2026-09 | 5325 | — | - |
| 2026-08 | 4718 | +2.9% | - |
| 2026-07 | 4586 | +7.7% | - |
| 2026-06 | 4260 | +2.9% | - |
| 2026-05 | 4139 | — | - |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
---
name: clawback
description: Mirror congressional stock trades with automated broker execution and risk management. Use when you want to track and automatically trade based on congressional disclosures from House Clerk and Senate eFD sources.
version: 1.1.0
author: mainfraame
homepage: https://github.com/mainfraame/clawback
user-invocable: true
metadata: {"openclaw": {"emoji": "🦀", "requires": {"bins": ["python3", "pip"]}, "install": {"pip": "{baseDir}"}, "primaryEnv": "BROKER_API_KEY"}}
---
# ClawBack
**Mirror congressional stock trades with automated broker execution**
## Agent Instructions
When the user invokes `/clawback`, execute the appropriate command based on the argument:
### Commands
When the user invokes `/clawback` with any arguments, execute the corresponding command:
| Command | Action |
|---------|--------|
| `/clawback setup` | Run the setup wizard: Execute `{baseDir}/bin/clawback.py setup` |
| `/clawback status` | Check system status: Execute `{baseDir}/bin/clawback.py status` |
| `/clawback run` | Start trading bot: Execute `{baseDir}/bin/clawback.py run` |
| `/clawback daemon` | Run as background service: Execute `{baseDir}/bin/clawback.py daemon` |
| `/clawback test` | Test notifications: Execute `{baseDir}/bin/clawback.py test` |
| `/clawback` (no args) | Show help: Execute `{baseDir}/bin/clawback.py --help` |
### How to Execute Commands
**Option 1: Using the wrapper script (recommended)**
When executing ClawBack commands, always:
1. Use the wrapper script at `{baseDir}/bin/clawback.py`
2. Pass the command as an argument (e.g., `{baseDir}/bin/clawback.py status`)
3. Capture and display the output to the user
**Option 2: Direct Python execution (if wrapper doesn't work)**
If the wrapper script fails, you can run ClawBack directly:
1. Change to the skill directory: `cd {baseDir}`
2. Activate the virtual environment: `source venv/bin/activate`
3. Run the CLI: `python -m clawback.cli [command]`
4. Capture and display the output
**Important**: Always check if the virtual environment exists at `{baseDir}/venv`. If not, you may need to run the setup first.
### `/clawback setup` - Interactive Setup Flow
When user runs `/clawback setup`, follow these steps:
**Step 1: Install dependencies (if needed)**
Check if `{baseDir}/venv` exists. If not, run:
```bash
cd {baseDir} && python3 -m venv venv && source venv/bin/activate && pip install -e .
```
**Step 2: Prompt for E*TRADE credentials**
Ask the user for each value:
1. **Environment**: Ask "Do you want to use **sandbox** (testing) or **production** (real money)?"
- Default: sandbox
2. **Consumer Key**: Ask "Enter your E*TRADE Consumer Key (from developer.etrade.com):"
- Required field
3. **Consumer Secret**: Ask "Enter your E*TRADE Consumer Secret:"
- Required field
4. **Account ID**: Ask "Enter your E*TRADE Account ID (or leave blank to get it after OAuth):"
- Optional - can be obtained later
**Step 3: Save configuration**
Create/update `~/.clawback/config.json` with the provided values:
```json
{
"broker": {
"adapter": "etrade",
"environment": "<sandbox or production>",
"credentials": {
"apiKey": "<consumer_key>",
"apiSecret": "<consumer_secret>"
}
},
"trading": {
"accountId": "<account_id>",
"initialCapital": 50000,
"tradeScalePercentage": 0.01,
"maxPositionPercentage": 0.05,
"dailyLossLimit": 0.02
},
"notifications": {
"telegram": {
"enabled": true,
"useOpenClaw": true
}
},
"congress": {
"dataSource": "official",
"pollIntervalHours": 24,
"minimumTradeSize": 10000
}
}
```
**Step 4: Confirm setup**
Tell the user: "Configuration saved to ~/.clawback/config.json. Run `/clawback status` to verify."
### Getting E*TRADE API Credentials
Direct user to: https://developer.etrade.com
1. Create a developer account
2. Create a new app (sandbox first for testing)
3. Copy the Consumer Key and Consumer Secret
### Configuration Location
- Config file: `~/.clawback/config.json`
- Skill directory: `{baseDir}`
### Reading Saved Configuration
To check if the user has configured credentials, read `~/.clawback/config.json`:
- If file doesn't exist or credentials are empty → prompt for setup
- If credentials exist → can proceed with status/run commands
The CLI automatically reads from `~/.clawback/config.json` for all operations.
### Checking Setup Status
Before running `/clawback status` or `/clawback run`, verify:
1. `{baseDir}/venv` exists (dependencies installed)
2. `~/.clawback/config.json` exists with non-empty `broker.credentials.apiKey`
If either is missing, suggest running `/clawback setup` first.
---
ClawBack tracks stock trades disclosed by members of Congress (House and Senate) and executes scaled positions in your E*TRADE brokerage account. Built on the premise that congressional leaders consistently outperform the market due to informational advantages.
## Default Target Politicians
ClawBack monitors these politicians by default (configurable):
| Politician | Chamber | Priority |
|------------|---------|----------|
| Nancy Pelosi | House | 1 (highest) |
| Dan Crenshaw | House | 2 |
| Tommy Tuberville | Senate | 2 |
| Marjorie Taylor Greene | House | 3 |
## Trading Strategy Defaults
| Parameter | Default | Description |
|-----------|---------|-------------|
| Trade Delay | 3 days | Wait after disclosure before trading |
| Holding Period | 30 days | Target hold time for positions |
| Position Size | 5% | Max allocation per trade |
| Stop-Loss | 8% | Per-position stop-loss |
| Portfolio Drawdown | 15% | Max portfolio loss before halt |
| Disclosure Checks | 10:00, 14:00, 18:00 ET | Daily check times |
## Features
- **Real-time disclosure tracking** from official House Clerk and Senate eFD sources
- **Automated trade execution** via E*TRADE API (only supported broker)
- **Smart position sizing** - scales trades to your account size
- **Trailing stop-losses** - lock in profits, limit losses
- **Risk management** - drawdown limits, consecutive loss protection
- **Telegram notifications** - get alerts for new trades and stop-losses
- **Backtesting engine** - test strategies on historical data
## Performance (Backtest Results)
| Strategy | Win Rate | Return | Sharpe |
|----------|----------|--------|--------|
| 3-day delay, 30-day hold | 42.9% | +6.2% | 0.39 |
| 9-day delay, 90-day hold | 57.1% | +4.7% | 0.22 |
Congressional leaders have outperformed the S&P 500 by 47% annually according to NBER research.
## Installation via ClawHub
```bash
# Install from ClawHub registry
clawhub install clawback
# Or install from local directory
clawhub install ./clawback
```
## Troubleshooting
### Common Issues
1. **Skill not executing**: If `/clawback` doesn't work in OpenClaw:
- Check if the skill is in the correct location: `{baseDir}/`
- Verify the wrapper script is executable: `chmod +x {baseDir}/bin/clawback.py`
- Check if virtual environment exists: `{baseDir}/venv/`
2. **Authentication issues**: If E*TRADE authentication fails:
- Run the authentication utility: `python {baseDir}/scripts/auth_utility.py --auth`
- Run `{baseDir}/bin/clawback.py setup` to reconfigure
- Check credentials in `~/.clawback/config.json`
- Verify E*TRADE API keys are valid
3. **Token expiration**: If tokens expire (30-day lifespan):
- Run: `python {baseDir}/scripts/auth_utility.py --refresh`
- Or start new authentication: `python {baseDir}/scripts/auth_utility.py --auth`
4. **Python import errors**: If you see "ModuleNotFoundError":
- Ensure virtual environment is activated
- Run `pip install -e .` in `{baseDir}/`
- Check Python path includes `{baseDir}/src`
### Debug Mode
To debug skill execution, add `DEBUG=1` environment variable:
```bash
DEBUG=1 {baseDir}/bin/clawback.py status
```
This will show additional information about the execution context.
### Post-Installation Setup
After installation via ClawHub, the `install.sh` script runs automatically:
1. **Python Environment Setup** - Creates virtual environment
2. **Package Installation** - Installs ClawBack via pip
3. **Directory Structure** - Creates logs/, data/, config/ directories
4. **Setup Prompt** - Asks if you want to run the setup wizard
If you skip setup during installation, run it manually:
```bash
cd ~/.openclaw/skills/clawback
./setup.sh # Interactive setup wizard
# or
clawback setup # CLI-based setup
```
### Improved Setup Features
- **Better input handling** - Works in both interactive and non-interactive modes
- **Input validation** - Validates E*TRADE API key formats
- **Timeout handling** - Automatically uses defaults if no input
- **Error recovery** - Fallback to manual setup if CLI fails
- **Configuration check** - Detects existing config and offers options
## Interactive Setup Wizard
The setup wizard guides you through configuration:
### Step 1: Environment Selection
- **Sandbox** (recommended for testing): No real trades, uses E*TRADE developer sandbox
- **Production**: Real trading with real money
### Step 2: E*TRADE API Credentials
- **Consumer Key**: From E*TRADE developer portal
- **Consumer Secret**: From E*TRADE developer portal
### Step 3: Authentication
- Automatic OAuth flow with E*TRADE
- Opens browser for authorization
- Returns verification code
### Step 4: Account Selection
- Lists all available E*TRADE accounts
- Choose which account to trade with
### Step 5: Telegram Setup (Optional)
- Configure notifications via Telegram bot
- Uses OpenClaw's built-in Telegram channel if available
## Environment Variables
After setup, credentials are stored in `.env`:
```bash
# E*TRADE API (required)
BROKER_API_KEY=your_consumer_key_here
BROKER_API_SECRET=your_consumer_secret_here
BROKER_ACCOUNT_ID=your_account_id_here
# Telegram (optional)
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
# FMP API (optional)
FMP_API_KEY=your_fmp_api_key_here
```
## Usage
```bash
# Use the installed CLI command
clawback run # Start interactive trading mode
clawback daemon # Run as background service
clawback status # Check system status
clawback setup # Re-run setup wizard
clawback test # Test Telegram notifications
```
## Automated Trading
The `clawback daemon` command runs continuously with:
- **Disclosure checks** at 10:00, 14:00, 18:00 ET (when filings are typically released)
- **Trade execution** at 9:35 AM ET (5 min after market open)
- **Token refresh** every 90 minutes (keeps E*TRADE session alive)
- **Market hours enforcement** (9:30 AM - 4:00 PM ET)
## Data Sources
- **House Clerk**: https://disclosures-clerk.house.gov (PDF parsing)
- **Senate eFD**: https://efdsearch.senate.gov (web scraping)
- **Financial Modeling Prep**: Enhanced financial data (optional)
## Supported Brokers
ClawBack currently only supports E*TRADE. The adapter pattern allows for future broker support, but only E*TRADE is implemented and tested.
| Broker | Adapter | Status |
|--------|---------|--------|
| E*TRADE | `etrade_adapter.py` | Supported |
## Risk Management
- **Position limits**: 5% max per symbol, 20 positions max
- **Stop-losses**: 8% per position, 15% portfolio drawdown
- **Daily limits**: 3% max daily loss
- **PDT compliance**: Conservative 2 trades/day limit
## Authentication Helpers
For manual E*TRADE authentication outside the main CLI:
```bash
# Standalone OAuth authentication script
cd {baseDir}
source venv/bin/activate
python scripts/auth_script.py
```
This generates an authorization URL, prompts for the verification code, and completes authentication.
## File Locations
| File | Purpose |
|------|---------|
| `~/.clawback/config.json` | Main configuration |
| `~/.clawback/.access_tokens.json` | E*TRADE OAuth tokens |
| `~/.clawback/data/trading.db` | SQLite database |
## Security
- No hardcoded credentials in source code
- Environment variable based configuration
- Encrypted token storage for E*TRADE
- Git-ignored `.env` file
- Optional production encryption
## Support
- **Documentation**: See README.md for detailed setup
- **Issues**: https://github.com/mainfraame/clawback/issues
- **Community**: https://discord.com/invite/clawd
## Disclaimer
**Trading involves substantial risk of loss.** This software is for educational purposes only. Past congressional trading performance does not guarantee future results. Always test with E*TRADE sandbox accounts before live trading.AIGC創作過程自動存證技能。自動識別創作平台與生成工具,將創作過程記錄存證並蓋有公安備案電子印章,具備可信時間戳,可以在全國電子印章互認平台核驗。
反電信網路詐騙(反詐)專家技能。當用戶描述一個疑似詐騙的場景、簡訊、電話、連結、聊天記錄、App、投資平台、招聘資訊或轉賬要求,並詢問「這是不是詐騙」「要不要轉錢」「怎麼止損」「錢還能不能追回來」,或需要識別詐騙話術、拆解騙局結構、生成報案材料與取證清單時使用。同時在對話中主動嗅探「轉賬、驗證碼、螢幕共享、安全帳戶、保證金、刷單、穩賺、百萬保障、跑分」等風險詞並插入預警,即使對方並未詢問反詐。適用場景還包括:家屬求助勸阻疑似被騙的親人、企業/銀行/支付機構/網際網路平台做涉詐帳戶識別與交易監測規則、涉詐資金鍊(跑分、卡四件套、GOIP)分析、反詐合規與員工培訓、反詐實戰演練。
電子印章公安備案、全網互認,實現所有格式檔案電子簽章與影片確權,覆蓋全國所有CA廠商自2005年以來的全量電子簽章資料,無論由哪個地區、哪套系統、哪家CA機構簽發,均可精準校驗與互認。
包拯.Skills你身邊的專家律師團 — 專業法律諮詢 + 要素式/通用起訴狀起草 + 刑事專項材料輔助 + 法條分析與法規檢索。flk.npc.gov.cn API即時法條優先,不可用時AI知識庫降級兜底,**法條來源按四檔標註可核驗(已核驗-flk API / 已核驗-單源 / 已引-離線庫 / 未核驗-模型生成),交付末尾附法條/事實/金額/程式分項置信度**;以22類法律領域覆蓋矩陣約束路由邊界;支援35個起訴狀模板、5類刑事專項材料輔助;內建Logic Doctor邏輯自檢、訴訟時效追蹤及10類異常容錯處理(含連續失敗熔斷);漸進式意圖收斂協議(3輪狀態機);混合意圖自動任務拆解(按依賴排序→合併→順序執行);含反模式清單與危機干預出口(自殺/家暴/未成年人侵害先於一切法律分析)。非標準案由自動使用通用模板。
律師AI辦案工作臺:從接案到結案全流程提效——案件分析、要件梳理、文書初稿、證據質證、法庭攻防演練、賠償與費用計算、期限提醒、復盤歸檔;覆蓋民事、刑事、勞動、非訴、破產、執行、行政、仲裁八大領域,111 個專家技能;法條可核驗、結論可複核。
包拯.Skills你身邊的專家律師團 — 專業法律諮詢 + 要素式/通用起訴狀起草 + 刑事專項材料輔助 + 法條分析與法規檢索。flk.npc.gov.cn API即時法條優先,不可用時AI知識庫降級兜底,**法條來源按四檔標註可核驗(已核驗-flk API / 已核驗-單源 / 已引-離線庫 / 未核驗-模型生成),交付末尾附法條/事實/金額/程式分項置信度**;以22類法律領域覆蓋矩陣約束路由邊界;支援35個起訴狀模板、5類刑事專項材料輔助;內建Logic Doctor邏輯自檢、訴訟時效追蹤及10類異常容錯處理(含連續失敗熔斷);漸進式意圖收斂協議(3輪狀態機);混合意圖自動任務拆解(按依賴排序→合併→順序執行);含反模式清單與危機干預出口(自殺/家暴/未成年人侵害先於一切法律分析)。非標準案由自動使用通用模板。
基於技術交底書生成專利申請初稿。技術交底書內容至少包含技術問題、解決方案、技術效果。內建的推理、視覺、多模態、數學、函式、模擬等模型底座均為國產,國外模型0使用,可放心食用。 近期安裝量暴增感謝支援,不少私信希望能力提升但這已是國產極限,我們不必追求最強技能,達到及格即可。學習交流歡迎聯絡微訊號A26dian4
露禾論文寫作助手(免費版):一句話生成引用可溯源、不編造的專業學術論文,按國標 GB/T 7714 插入真實文獻引用,中英文 3000/5000/8000 字,一鍵匯出 Word。說「寫論文 / 幫我寫論文」即可使用。
資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。