Tododeia — Investment Analysis Skill for Claude Code
by @quebert · modCarlos/maia-skill
A Claude Code skill that pre-fetches real market data for 60+ tickers using Python tools, then spawns a single MegaAgent to produce a risk-adjusted portfolio with investment theses, carry-forward of active positions, and a Next.js dashboard.
Leer en Español
How It Works
"run tododeia" / "analyze markets"
│
▼
┌─────────────────────┐
│ Risk profile prompt │ conservative / moderate / aggressive
└────────┬────────────┘
│
▼ Python tools (no LLM needed)
┌─────────────────────────────────────────────────────┐
│ pre_fetch.py — yfinance data for 60 tickers │
│ news_fetch.py ┐ │
│ sec_risk_fetch ┘ parallel — headlines + 10-K risks │
│ accuracy_windows.py — 1d/5d/30d pick accuracy │
│ update_stops.py — ATR trailing stops │
│ compress_context.py — compact ~7,500 char context │
└────────────────────────┬────────────────────────────┘
│ /tmp/mega_context.txt
▼
┌────────────────────────┐
│ MegaAgent │
│ (Claude Sonnet 4.x) │
│ │
│ • Applies CORRELATION │
│ LIMITS (hard rules) │
│ • Carry-forward of │
│ active positions │
│ • 13 risk-adj. picks │
│ with thesis + │
│ invalidators │
└────────────┬───────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
output/history/ active_positions dashboard/
YYYY-MM-DD.json .json public/data/
│
▼
Next.js localhost:3420
What Changed from the Original
This fork diverged significantly from the upstream project:
| Feature | Original | This fork |
|---|
| Architecture | 5 parallel AI agents (4 sector + 1 strategy) | Pre-fetch tools + 1 MegaAgent |
| Asset universe | Dynamic discovery by agents | Fixed 60-ticker screened list |
| Data source | Agent web searches | yfinance (real market data, no LLM searches) |
| Sectors | Crypto, Stocks, Forex, Commodities | Stocks + commodities/gold integrated |
| Active positions | None | Carry-forward between sessions |
| Split detection | None | Hard exclusion when split detected (±60 days) |
| Accuracy tracking | Basic | 1d / 5d / 30d windows with outlier filtering |
| Trailing stops | None | ATR-based, updated every run |
| Context to LLM | Raw per-sector JSON | Compressed 7,500-char structured block |
Features
- Pre-fetched real data: RSI, trend, support/resistance, ATR, Altman Z, Piotroski score, insider signals — all from yfinance, zero LLM web searches for technicals
- Risk profiles: Conservative, moderate, aggressive — position sizes and allocation change accordingly
- Carry-forward: Active positions persist between sessions; excluded only when thesis explicitly invalidated
- Split detection: Tickers with recent stock splits are automatically excluded from the screener
- Multi-window accuracy: 1-day, 5-day, 30-day accuracy tracked per session — fed back to the MegaAgent
- Trailing stops: ATR-14 based stops that only move up, updated every run
- Interactive dashboard: Next.js on
localhost:3420 with bilingual support (EN/ES)
- History: Every session saved to
output/history/YYYY-MM-DD.json for backtesting and accuracy tracking
Requirements
- Claude Code
- Python 3.9+ with
yfinance (pip install yfinance)
- Node.js 18+ (for the dashboard)
- Internet connection (yfinance + news fetch need it)
Installation
Option A: One-liner
curl -sL https://raw.githubusercontent.com/modCarlos/maia-skill/main/install.sh | bash
Clones the repo, symlinks the skill into Claude Code, and installs dashboard dependencies.
Option B: Manual
# 1. Clone
git clone https://github.com/modCarlos/maia-skill.git
# 2. Symlink into Claude Code
mkdir -p ~/.claude/plugins
ln -s "$(pwd)/maia-skill" ~/.claude/plugins/maia-skill
# 3. Install Python dependencies
pip install yfinance pandas numpy requests
# 4. Install dashboard dependencies
npm install --prefix maia-skill/dashboard
Usage
In any Claude Code conversation:
"run tododeia"
"run tododeia moderate"
"analyze markets aggressive"
"investment analysis conservative"
You'll be asked your risk profile if not provided, then the pipeline runs. The report opens at http://localhost:3420.