stock-compare
Skill2 starsChanged 5 months agoMITView on GitHub
Run a head-to-head comparison between two tickers (A vs B) for a growth, income, or value investor over a stated horizon. Use when the user asks "X vs Y", "which is better A or B?", "should I pick X or Y?", or wants a side-by-side fundamentals + technicals + valuation matchup.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-researchSkill
- auto-rebalanceSkill
- cash-deploymentSkill
- daily-briefingSkill
- dividend-strategySkill
- earnings-analyzerSkill
- earnings-postmortemSkill
- employer-stockSkill
- health-checkSkill
- macro-impactSkill
- momentum-scannerSkill
- optimize-allocationSkill
- pead-trackerSkill
- perf-optimizerSkill
- portfolio-healthSkill
- portfolio-reviewSkill
- position-reviewSkill
- pre-trade-checkSkill
- profile-setupSkill
- risk-assessmentSkill
- sector-rotationSkill
- stock-analysisSkill
- tax-loss-reviewSkill
- top-trades-todaySkill
- trade-journalSkill
- trading-deskSkill
- weekly-mirrorSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Before fetching market data, load prior decisions on each ticker (A and B) so the verdict stays consistent across sessions:
- Very specific: line 19
Call mcp__aifolimizer__get_profile - account types, capital, tax context.
- Very specific: line 21
Call mcp__aifolimizer__get_portfolio - flag which tickers user already holds, with current weight and cost basis
- Very specific: line 22
Call mcp__aifolimizer__get_fundamentals with symbols=[A, B] in one call - P/E, EPS, dividend yield, payout, market cap, analyst target, beta
- Very specific: line 23
Call mcp__aifolimizer__get_technicals with symbols=[A, B] in one call - SMA20/50/200, RSI, MACD, Bollinger Bands, trend, Minervini stage + …
- Very specific: line 24
Call mcp__aifolimizer__get_news_headlines for each ticker - recent catalyst differential
- Distinctive: line 77
If loser still has setup worth noting, mention as fallback
- Very specific: line 80
Before recommending an add/initiate on the winner, call mcp__aifolimizer__get_positioning_signals with symbols=[winner].
- Very specific: line 81
If user already holds one: hold/add/trim decision
- Distinctive: line 82
If user holds neither: which to initiate, sizing as % of portfolio
- Distinctive: line 95
Always render side-by-side matrix - verbal-only comparison not acceptable
- Distinctive: line 98
Never invent metrics - quote from MCP or state "MCP gap.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stock Compare (Head-to-Head)
Stage 0 - Decision Memory (load BEFORE forming any verdict)
Before fetching market data, load prior decisions on each ticker (A and B) so the verdict stays consistent across sessions:
mcp__aifolimizer__get_ticker_decision_historywithticker=Athenticker=B(max_decisions=5) - prior actions, outcomes, reflectionsmcp__aifolimizer__get_ticker_reflectionwithsymbol=A/symbol=B(n=3) - prior recs + realized alphamcp__aifolimizer__get_cross_ticker_lessonswithmax_lessons=3- portfolio-level win/loss patterns
Reconciliation rule: if a prior decision exists and your new read flips it, state explicitly WHY it changed (new data / catalyst / price move). Never silently contradict a logged decision - that drift is exactly what this prevents.
How to run
- Call
mcp__aifolimizer__get_profile- account types, capital, tax context. Frame placement recommendation at end (TFSA vs RRSP vs Non-Reg) - Identify two tickers from user query (Ticker A, Ticker B). If user names only one and asks "vs sector leader", pick obvious peer and state choice explicitly
- Call
mcp__aifolimizer__get_portfolio- flag which tickers user already holds, with current weight and cost basis - Call
mcp__aifolimizer__get_fundamentalswithsymbols=[A, B]in one call - P/E, EPS, dividend yield, payout, market cap, analyst target, beta - Call
mcp__aifolimizer__get_technicalswithsymbols=[A, B]in one call - SMA20/50/200, RSI, MACD, Bollinger Bands, trend, Minervini stage + score, 52-week context - Call
mcp__aifolimizer__get_news_headlinesfor each ticker - recent catalyst differential - WebSearch only for: sector peer multiples, recent analyst upgrade/downgrade asymmetry, or gaps in MCP response
Investor profile
- Canadian retail investor
- Time horizons: short-term trading + long-term (10yr+) holding
- Strategy lens: confirm with user (growth / income / value); default to growth if unstated
- Account types and capital: always read from
get_profile- never hardcode
Output structure
1. Verdict (top, one paragraph)
- Winner: A or B (or "tie / context-dependent" with conditions)
- Strategy + horizon assumed (echo back what user asked for)
- One-sentence why
2. Side-by-side matrix
Render markdown table. Columns: Metric | Ticker A | Ticker B | Edge. Rows (minimum):
- Market cap
- Revenue growth (TTM YoY if available, else flag gap)
- Operating margin
- P/E (trailing) and forward P/E
- P/S
- EV/EBITDA (if available)
- Dividend yield and payout ratio
- Beta
- Analyst target (% upside vs current)
- Institutional ownership %
- 52-week position (% from high / % from low)
- Trend (Minervini stage)
- Minervini score (/7)
- RSI (overbought/neutral/oversold)
- MACD signal
3. Moat and business model
- One paragraph each - A then B
- Key differentiators
- Where they compete head-to-head, where they don't
4. Catalysts and risks (next 12 months)
- A: catalysts, then risks
- B: catalysts, then risks
5. Valuation conclusion
- Which is cheaper on absolute multiples
- Which is cheaper relative to own growth (PEG-style, even if rough)
- Sector context
6. Technical setup
- Which has better entry RIGHT NOW (or "neither - wait")
- Entry zone, stop-loss, profit target for winner
- If loser still has setup worth noting, mention as fallback
7. Recommendation (Canadian tax + holdings aware)
- Before recommending an add/initiate on the winner, call
mcp__aifolimizer__get_positioning_signalswithsymbols=[winner]. Gate the size on crowding: score >=70 (consensus-crowded) → defer the add or favor the contrarian leg; score <=30 (contrarian) → edge supports sizing up if fundamentals agree. - If user already holds one: hold/add/trim decision
- If user holds neither: which to initiate, sizing as % of portfolio
- Account placement: TFSA / RRSP / Non-Reg with reasoning
- US dividend payers → RRSP (no 15% withholding)
- High-growth no-div → TFSA (tax-free gains)
- Canadian dividend payers → Non-Reg (dividend tax credit) or TFSA
After output - log decision
For winner ticker (and loser if user holds it), call mcp__aifolimizer__log_recommendation with action (BUY/HOLD/SELL/ADD/TRIM/PASS), conviction (HIGH/MED/LOW), target_pct + stop_pct (percent from entry; entry captured live at call time), 1-line thesis as rationale citing the head-to-head edge, skill="stock-compare". Feeds forward win-rate / track-record loop.
Rules
- Under 700 words
- Always render side-by-side matrix - verbal-only comparison not acceptable
- Cite cost basis if user holds either ticker
- For .TO suffix tickers, flag TSX coverage gaps explicitly rather than fabricating
- Never invent metrics - quote from MCP or state "MCP gap; WebSearch confirmed:
<source>"
Gotchas
get_fundamentalscached 6h - both tickers share same staleness window, comparison internally consistent even if absolute numbers lag. Note cache timestamp.get_technicalscached 1h - Minervini scores and entries stale on high-volatility days. Mention if comparing during earnings week.- Mismatched fiscal year-ends (e.g. AAPL vs MSFT) - TTM windows differ; flag when revenue growth comparison spans different quarters.
analyst_targetupside % is asymmetric noise: $5 stock with $6 target is +20% but lower-conviction than $200 stock with $220 target. Don't rank purely on % upside.- One US ticker + one .TO ticker: yfinance fundamentals gap on TSX side will skew matrix. Use WebSearch to fill or mark "TSX gap" in cell.
- Both tickers crypto or one is crypto:
get_fundamentalsreturns empty - useget_crypto_datafor crypto leg, adjust matrix rows. - Dividend yield across borders: 4% US yield in Non-Reg loses 15% withholding → real yield 3.4%. Apply before declaring income winner.
- Beta from yfinance uses 5-year monthly vs S&P 500 - for .TO ticker relevant benchmark is TSX, beta not strictly comparable. Note in row.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

