mainfraame

Clawback

専門分野v1.1.1
作者:mainfraame更新日 2026-05-18全 18 バージョン · 最新版の公開日 2026-02-21clawback@clawhub_mainfraame/clawback
金融分析#Stock

AlphaMoatによると、2026-10時点でClawbackのダウンロード数は7,100、スター数は0で、累計ダウンロード数で今回のランキング対象AIスキル10,914件中3,970位、専門分野では1,228件中441位です。

一覧の初期表示は累計ダウンロード数順で、スター数順にも並べ替えできます。詳細ページの順位は累計ダウンロード数で計算しています。

ダウンロード数
7100
スター数
-
累計ダウンロード順位
#3,970
全体の上位 37% · 専門分野の上位 36%
プラットフォームダウンロード数スター数コメント
ClawHub ↗4901--
SkillHub ↗7100-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

文書の情報源は下院Clerkと上院eFDで、実装・検証済みと記載されたブローカーはE*TRADEのみです。設定、認証、口座選択、通知、デーモン操作と、建玉・損失・日次取引制限を説明します。自動取引は重大な損失を伴い、過去の実績は将来を保証しません。実口座を検討する前に十分に審査し、sandboxで試験します。 実装・検証済みという説明は発行者の記述で、本レビューの実接続検証ではありません。主文の安全性主張に反し、カードはローカルtokenの問題を報告します。修正までsandbox口座のみとし、使用済み資格情報を更新し、特権のグローバルリンクを作る前に導入スクリプトを審査します。Python/pip、確認済み依存関係、E*TRADE資格情報とOAuthが必要で、Telegram・FMPは任意です。実運用有効化前に口座とリスク設定を人が確認します。

資料公開日 2026-10-27

できること

  • 議員取引の公開情報を取得・追跡する仕組みを確認する

使う場面

  • E*TRADE の設定、認証、自動実行フローを評価する

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

このスキルの取引情報源、実装済みブローカー、主な損失リスクをまとめてください。

月次の推移

ダウンロード数7100
3902562073372026-05 · ダウンロード数 41392026-06 · ダウンロード数 42602026-07 · ダウンロード数 45862026-08 · ダウンロード数 47182026-09 · ダウンロード数 53252026-10 · ダウンロード数 710026-0526-0926-10
スター数-
0112026-05 · スター数 -2026-06 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -2026-10 · スター数 -26-0526-0926-10

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-107100—-
2026-095325—-
2026-084718+2.9%-
2026-074586+7.7%-
2026-064260+2.9%-
2026-054139—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

12 KB・ClawHub v1.1.1
---
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"}}
---
すべて表示(全 371 行)
# 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过程存证服务専門分野

AIGC创作过程自动存证技能。自动识别创作平台与生成工具,将创作过程记录存证并盖有公安备案电子印章,具备可信时间戳,可以在全国电子印章互认平台核验。

↓ 390万★ 7u_c2c77b5f
防诈专家専門分野

反电信网络诈骗(反诈)专家技能。当用户描述一个疑似诈骗的场景、短信、电话、链接、聊天记录、App、投资平台、招聘信息或转账要求,并询问「这是不是诈骗」「要不要转钱」「怎么止损」「钱还能不能追回来」,或需要识别诈骗话术、拆解骗局结构、生成报案材料与取证清单时使用。同时在对话中主动嗅探「转账、验证码、屏幕共享、安全账户、保证金、刷单、稳赚、百万保障、跑分」等风险词并插入预警,即使对方并未询问反诈。适用场景还包括:家属求助劝阻疑似被骗的亲人、企业/银行/支付机构/互联网平台做涉诈账户识别与交易监测规则、涉诈资金链(跑分、卡四件套、GOIP)分析、反诈合规与员工培训、反诈实战演练。

↓ 168.7万★ 4user_e9185b15
全国电子印章互认平台専門分野

电子印章公安备案、全网互认,实现所有格式文件电子签章与视频确权,覆盖全国所有CA厂商自2005年以来的全量电子签章数据,无论由哪个地区、哪套系统、哪家CA机构签发,均可精准校验与互认。

↓ 141.6万★ 8u_c2c77b5f
baozheng-skills専門分野

包拯.Skills你身边的专家律师团 — 专业法律咨询 + 要素式/通用起诉状起草 + 刑事专项材料辅助 + 法条分析与法规检索。flk.npc.gov.cn API实时法条优先,不可用时AI知识库降级兜底,**法条来源按四档标注可核验(已核验-flk API / 已核验-单源 / 已引-离线库 / 未核验-模型生成),交付末尾附法条/事实/金额/程序分项置信度**;以22类法律领域覆盖矩阵约束路由边界;支持35个起诉状模板、5类刑事专项材料辅助;内置Logic Doctor逻辑自检、诉讼时效追踪及10类异常容错处理(含连续失败熔断);渐进式意图收敛协议(3轮状态机);混合意图自动任务拆解(按依赖排序→合并→顺序执行);含反模式清单与危机干预出口(自杀/家暴/未成年人侵害先于一切法律分析)。非标准案由自动使用通用模板。

↓ 52.7万★ 2user_814dbe54
律师助手専門分野

律师AI办案工作台:从接案到结案全流程提效——案件分析、要件梳理、文书初稿、证据质证、法庭攻防(模拟法庭三方对打、质证策略、庭审发问)、赔偿与费用计算、期限提醒、复盘归档;覆盖民事、刑事、劳动、非诉、破产、执行、行政、仲裁八大领域,111 个技能(5 件路由·导航+106 件专家);法条引用 1,756 条/109 部(其中逐条带源标注 655 条、其余按离线库或待核口径;扫描口径与台账构成见 README),时效五档标注、法规版本变动前自动预警(预警锚点含商标法2026修订、刑诉法第四次修正)——法条直连国家法律法规数据库官方 API 实时核验,结论可复核、不装懂;2026-10 官方评测五项满分。不用记命令或技能名,直接说人话:欠钱不还、被车撞、被辞退、离婚分财产、合同违约。

↓ 50.7万★ 77user_cd0fcd93
包拯.SKILL専門分野

包拯.Skills你身边的专家律师团 — 专业法律咨询 + 要素式/通用起诉状起草 + 刑事专项材料辅助 + 法条分析与法规检索。flk.npc.gov.cn API实时法条优先,不可用时AI知识库降级兜底,**法条来源按四档标注可核验(已核验-flk API / 已核验-单源 / 已引-离线库 / 未核验-模型生成),交付末尾附法条/事实/金额/程序分项置信度**;以22类法律领域覆盖矩阵约束路由边界;支持35个起诉状模板、5类刑事专项材料辅助;内置Logic Doctor逻辑自检、诉讼时效追踪及10类异常容错处理(含连续失败熔断);渐进式意图收敛协议(3轮状态机);混合意图自动任务拆解(按依赖排序→合并→顺序执行);含反模式清单与危机干预出口(自杀/家暴/未成年人侵害先于一切法律分析)。非标准案由自动使用通用模板。

↓ 42.4万★ 41user_741dc82b
专利初稿助手専門分野

当用户上传交底材料、研发报告、技术方案文档,并要求撰写专利、撰写初稿,或请专利代理师视角输出可申请的专利文件时触发。也涵盖如下说法:'帮我把这份交底写成专利''生成专利文件''生成初稿''专利撰写'等,无论是否明确说'生成专利文件'。

↓ 36.9万★ 48user_9c63fdb4
露禾论文写作助手(免费版pro)専門分野

露禾论文写作助手(免费版):一句话生成引用可溯源、不编造的专业学术论文,按国标 GB/T 7714 插入真实文献引用,中英文 3000/5000/8000 字,一键导出 Word。说「写论文 / 帮我写论文」即可使用。

↓ 35万★ 18u_a3c224a2

データ月:2026-10 · ダウンロード数とスター数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。