New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Generate a pre-earnings briefing for any stock using Yahoo

Earnings Preview Skill

by himself65 · MIT license · ★ 3,347 on GitHub · updated Aug 27

Earnings Preview Skill cover

Generate a pre-earnings briefing for any stock using Yahoo Finance data. Use this skill whenever the user wants to prepare for an upcoming earnings report, understand what analysts expect, review a company's beat/miss track record, or…

---
name: earnings-preview
description: >
  Generate a pre-earnings briefing for any stock using Yahoo Finance data.
  Use this skill whenever the user wants to prepare for an upcoming earnings report,
  understand what analysts expect, review a company's beat/miss track record,
  or get a quick overview before an earnings call.
  Triggers include: "earnings preview for AAPL", "what to expect from TSLA earnings",
  "MSFT reports next week", "earnings preview", "pre-earnings analysis",
  "what are analysts expecting for NVDA", "earnings estimates for",
  "will GOOGL beat earnings", "earnings beat/miss history",
  "upcoming earnings", "before earnings", "earnings setup",
  "consensus estimates", "earnings whisper", "EPS expectations",
  "what's the street expecting", "earnings season preview",
  any mention of preparing for or previewing an earnings report,
  or any request to understand expectations ahead of a company's earnings date.
  Always use this skill when the user mentions a ticker in context of upcoming earnings,
  even if they don't say "preview" explicitly.

Overview

Generates a pre-earnings briefing using Yahoo Finance data via yfinance. Pulls together upcoming earnings date, consensus estimates, historical accuracy, analyst sentiment, and key financial context — everything you need before an earnings call.

Manual install (npx, ZIP)
Claude Codenpx skills add himself65/finance-skills --skill earnings-preview -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/himself65/finance-skills/tar.gz/0a5759bca1ea \ | tar -xz -C ~/.claude/skills --strip-components=4 finance-skills-0a5759bca1ea/plugins/market-analysis/skills/earnings-preview
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/ba1dd4f2365881341d20/earnings-preview.zip" -OutFile "$env:TEMP\earnings-preview.zip"; Expand-Archive "$env:TEMP\earnings-preview.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md6.4 KB
  • README.md1.1 KB
  • references/1 file · 4.1 KB
Read the files here
himself65/0a5759b3 files
SKILL.md
Show the full text170 lines

Earnings Preview Skill

Generates a pre-earnings briefing using Yahoo Finance data via yfinance. Pulls together upcoming earnings date, consensus estimates, historical accuracy, analyst sentiment, and key financial context — everything you need before an earnings call.

Important: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.


Step 1: Ensure yfinance Is Available

Current environment status:

!`python3 -c "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'YFINANCE_NOT_INSTALLED\')')"`

If YFINANCE_NOT_INSTALLED, install it:

import subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])

If already installed, skip to the next step.


Step 2: Identify the Ticker and Gather All Data

Extract the ticker symbol from the user's request. If they mention a company name without a ticker, look it up. Then fetch all relevant data in one script to minimize API calls.

import yfinance as yf
import pandas as pd
from datetime import datetime

ticker = yf.Ticker("AAPL")  # replace with actual ticker

# --- Core data ---
info = ticker.info
calendar = ticker.calendar

# --- Estimates ---
earnings_est = ticker.earnings_estimate
revenue_est = ticker.revenue_estimate

# --- Historical track record ---
earnings_hist = ticker.earnings_history

# --- Analyst sentiment ---
price_targets = ticker.analyst_price_targets
recommendations = ticker.recommendations

# --- Recent financials for context ---
quarterly_income = ticker.quarterly_income_stmt
quarterly_cashflow = ticker.quarterly_cashflow
What to extract from each source
Data Source Key Fields Purpose
calendar Earnings Date, Ex-Dividend Date When earnings are and key dates
earnings_estimate avg, low, high, numberOfAnalysts, yearAgoEps, growth (for 0q, +1q, 0y, +1y) Consensus EPS expectations
revenue_estimate avg, low, high, numberOfAnalysts, yearAgoRevenue, growth Revenue expectations
earnings_history epsEstimate, epsActual, epsDifference, surprisePercent Beat/miss track record
analyst_price_targets current, low, high, mean, median Street price targets
recommendations Buy/Hold/Sell counts Sentiment distribution
quarterly_income_stmt TotalRevenue, NetIncome, BasicEPS Recent trajectory

Step 3: Build the Earnings Preview

Assemble the data into a structured briefing. The goal is to give the user everything they need in one glance.

Section 1: Earnings Date & Key Info

Report the upcoming earnings date from calendar. Include:

  • Company name, ticker, sector, industry
  • Upcoming earnings date (and whether it's before/after market)
  • Current stock price and recent performance (1-week, 1-month)
  • Market cap
Section 2: Consensus Estimates

Present the current quarter estimates from earnings_estimate and revenue_estimate:

Metric Consensus Low High # Analysts Year Ago Growth
EPS $1.42 $1.35 $1.50 28 $1.26 +12.7%
Revenue $94.3B $92.1B $96.8B 25 $89.5B +5.4%

If the estimate range is unusually wide (high/low spread > 20% of consensus), note that as a sign of high uncertainty.

Section 3: Historical Beat/Miss Track Record

From earnings_history, show the last 4 quarters:

Quarter EPS Est EPS Actual Surprise Beat/Miss
Q3 2024 $1.35 $1.40 +3.7% Beat
Q2 2024 $1.30 $1.33 +2.3% Beat
Q1 2024 $1.52 $1.53 +0.7% Beat
Q4 2023 $2.10 $2.18 +3.8% Beat

Summarize: "AAPL has beaten EPS estimates in 4 of the last 4 quarters by an average of 2.6%."

Section 4: Analyst Sentiment

From recommendations and analyst_price_targets:

  • Current recommendation distribution (Strong Buy / Buy / Hold / Sell / Strong Sell)
  • Price target range: low, mean, median, high vs. current price
  • Implied upside/downside from mean target
Section 5: Key Metrics to Watch

Based on the quarterly financials, highlight 3-5 things the market will focus on:

  • Revenue growth trend (accelerating or decelerating?)
  • Margin trajectory (expanding or compressing?)
  • Any notable line items that changed significantly quarter-over-quarter
  • Segment breakdowns if available in the data

This section requires judgment — think about what matters for this specific company/sector.


Step 4: Respond to the User

Present the preview as a clean, structured briefing:

  1. Lead with the headline: "AAPL reports earnings on [date]. Here's what to expect."
  2. Show all 5 sections with clear headers and tables
  3. End with a brief summary: 2-3 sentences capturing the overall setup (bullish/bearish lean based on estimates, track record, and sentiment — frame as "the street expects" not personal recommendation)
Caveats to include
  • Estimates can change up until the report date
  • Historical beats don't guarantee future beats
  • Yahoo Finance data may lag real-time consensus by a few hours
  • This is not financial advice

Reference Files

  • references/api_reference.md — Detailed yfinance API reference for earnings and estimate methods

Read the reference file when you need exact method signatures or edge case handling.

1---
2name: earnings-preview
3description: >
4 Generate a pre-earnings briefing for any stock using Yahoo Finance data.
5 Use this skill whenever the user wants to prepare for an upcoming earnings report,
6 understand what analysts expect, review a company's beat/miss track record,
7 or get a quick overview before an earnings call.
8 Triggers include: "earnings preview for AAPL", "what to expect from TSLA earnings",
9 "MSFT reports next week", "earnings preview", "pre-earnings analysis",
10 "what are analysts expecting for NVDA", "earnings estimates for",
11 "will GOOGL beat earnings", "earnings beat/miss history",
12 "upcoming earnings", "before earnings", "earnings setup",
13 "consensus estimates", "earnings whisper", "EPS expectations",
14 "what's the street expecting", "earnings season preview",
15 any mention of preparing for or previewing an earnings report,
16 or any request to understand expectations ahead of a company's earnings date.
17 Always use this skill when the user mentions a ticker in context of upcoming earnings,
18 even if they don't say "preview" explicitly.
19---
20 
21# Earnings Preview Skill
22 
23Generates a pre-earnings briefing using Yahoo Finance data via [yfinance](https://github.com/ranaroussi/yfinance). Pulls together upcoming earnings date, consensus estimates, historical accuracy, analyst sentiment, and key financial context — everything you need before an earnings call.
24 
25**Important**: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.
26 
27---
28 
29## Step 1: Ensure yfinance Is Available
30 
31**Current environment status:**
32 
33```
34!`python3 -c "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'YFINANCE_NOT_INSTALLED\')')"`
35```
36 
37If `YFINANCE_NOT_INSTALLED`, install it:
38 
39```python
40import subprocess, sys
41subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
42```
43 
44If already installed, skip to the next step.
45 
46---
47 
48## Step 2: Identify the Ticker and Gather All Data
49 
50Extract the ticker symbol from the user's request. If they mention a company name without a ticker, look it up. Then fetch all relevant data in one script to minimize API calls.
51 
52```python
53import yfinance as yf
54import pandas as pd
55from datetime import datetime
56 
57ticker = yf.Ticker("AAPL") # replace with actual ticker
58 
59# --- Core data ---
60info = ticker.info
61calendar = ticker.calendar
62 
63# --- Estimates ---
64earnings_est = ticker.earnings_estimate
65revenue_est = ticker.revenue_estimate
66 
67# --- Historical track record ---
68earnings_hist = ticker.earnings_history
69 
70# --- Analyst sentiment ---
71price_targets = ticker.analyst_price_targets
72recommendations = ticker.recommendations
73 
74# --- Recent financials for context ---
75quarterly_income = ticker.quarterly_income_stmt
76quarterly_cashflow = ticker.quarterly_cashflow
77```
78 
79### What to extract from each source
80 
81| Data Source | Key Fields | Purpose |
82|---|---|---|
83| `calendar` | Earnings Date, Ex-Dividend Date | When earnings are and key dates |
84| `earnings_estimate` | avg, low, high, numberOfAnalysts, yearAgoEps, growth (for 0q, +1q, 0y, +1y) | Consensus EPS expectations |
85| `revenue_estimate` | avg, low, high, numberOfAnalysts, yearAgoRevenue, growth | Revenue expectations |
86| `earnings_history` | epsEstimate, epsActual, epsDifference, surprisePercent | Beat/miss track record |
87| `analyst_price_targets` | current, low, high, mean, median | Street price targets |
88| `recommendations` | Buy/Hold/Sell counts | Sentiment distribution |
89| `quarterly_income_stmt` | TotalRevenue, NetIncome, BasicEPS | Recent trajectory |
90 
91---
92 
93## Step 3: Build the Earnings Preview
94 
95Assemble the data into a structured briefing. The goal is to give the user everything they need in one glance.
96 
97### Section 1: Earnings Date & Key Info
98 
99Report the upcoming earnings date from `calendar`. Include:
100- Company name, ticker, sector, industry
101- Upcoming earnings date (and whether it's before/after market)
102- Current stock price and recent performance (1-week, 1-month)
103- Market cap
104 
105### Section 2: Consensus Estimates
106 
107Present the current quarter estimates from `earnings_estimate` and `revenue_estimate`:
108 
109| Metric | Consensus | Low | High | # Analysts | Year Ago | Growth |
110|---|---|---|---|---|---|---|
111| EPS | $1.42 | $1.35 | $1.50 | 28 | $1.26 | +12.7% |
112| Revenue | $94.3B | $92.1B | $96.8B | 25 | $89.5B | +5.4% |
113 
114If the estimate range is unusually wide (high/low spread > 20% of consensus), note that as a sign of high uncertainty.
115 
116### Section 3: Historical Beat/Miss Track Record
117 
118From `earnings_history`, show the last 4 quarters:
119 
120| Quarter | EPS Est | EPS Actual | Surprise | Beat/Miss |
121|---|---|---|---|---|
122| Q3 2024 | $1.35 | $1.40 | +3.7% | Beat |
123| Q2 2024 | $1.30 | $1.33 | +2.3% | Beat |
124| Q1 2024 | $1.52 | $1.53 | +0.7% | Beat |
125| Q4 2023 | $2.10 | $2.18 | +3.8% | Beat |
126 
127Summarize: "AAPL has beaten EPS estimates in 4 of the last 4 quarters by an average of 2.6%."
128 
129### Section 4: Analyst Sentiment
130 
131From `recommendations` and `analyst_price_targets`:
132 
133- Current recommendation distribution (Strong Buy / Buy / Hold / Sell / Strong Sell)
134- Price target range: low, mean, median, high vs. current price
135- Implied upside/downside from mean target
136 
137### Section 5: Key Metrics to Watch
138 
139Based on the quarterly financials, highlight 3-5 things the market will focus on:
140- Revenue growth trend (accelerating or decelerating?)
141- Margin trajectory (expanding or compressing?)
142- Any notable line items that changed significantly quarter-over-quarter
143- Segment breakdowns if available in the data
144 
145This section requires judgment — think about what matters for this specific company/sector.
146 
147---
148 
149## Step 4: Respond to the User
150 
151Present the preview as a clean, structured briefing:
152 
1531. **Lead with the headline**: "AAPL reports earnings on [date]. Here's what to expect."
1542. **Show all 5 sections** with clear headers and tables
1553. **End with a brief summary**: 2-3 sentences capturing the overall setup (bullish/bearish lean based on estimates, track record, and sentiment — frame as "the street expects" not personal recommendation)
156 
157### Caveats to include
158- Estimates can change up until the report date
159- Historical beats don't guarantee future beats
160- Yahoo Finance data may lag real-time consensus by a few hours
161- This is not financial advice
162 
163---
164 
165## Reference Files
166 
167- `references/api_reference.md` — Detailed yfinance API reference for earnings and estimate methods
168 
169Read the reference file when you need exact method signatures or edge case handling.
170 
View all files on GitHub →

Details

Updated
Aug 27, 2026
License
MIT
Stars on the repo
★ 3,347
Checked
Source
himself65/finance-skills ↗
Creator
himself65 · 24 listings
View creator

Similar skills

See all →
SkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillTurn a LinkedIn Analytics exportAnalytics dashboardcharlie947/social-media-skills · by charlie947Turn a LinkedIn Analytics export into an interactive dark-themed React dashboard plus a written strategic analysis with 5 data-backed content recommendations. Reads every sheet in the export, builds charts for engagement trend, follower growth, post performance scatter, day-of-week heatmap, and audience breakdown. Use this skill whenever the user says "analyse my linkedin", "linkedin analytics", "build my dashboard", "review my performance", or uploads a LinkedIn Analytics export file. Requires the user's LinkedIn Analytics export (xlsx) as input.★ 3.7k GitHub starsSkillVet a perf measurement before you report or act on itBenchmark checklistmichael-denyer/pstack-claude · by michael-denyerVet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you run a benchmark or report a speedup or regression you measured.★ 1k GitHub starsSkillReport a bug, file an issue, submit a bug reportReport Issue — mobile-appmicrosoft/power-platform-skills · by microsoftUse when the user wants to report a bug, file an issue, submit a bug report, or report any problem with the mobile-app plugin.★ 954 GitHub starsSkillBuild the agency dashboard across all client brands: health/digital-marketing-pro:agency-dashboardindranilbanerjee/digital-marketing-pro · by indranilbanerjeeBuild the agency dashboard across all client brands: health, pacing, risk. "how are all our clients doing"★ 866 GitHub starsSkillMonthly CFO workflow for a company or agency/company-cfo — Monthly company CFO workflowcoreyhaines31/makerskills · by coreyhaines31Monthly CFO workflow for a company or agency — pull raw data from bank + payment processor + payroll + expense management, categorize and reconcile, compute end-of-month cash via transaction-sum method, update a scenario projector for forward forecasting, write the monthly snapshot report, surface decisions to leadership. Modes — monthly (default; the standing report), weekly (thin cash pulse), scenario (ad-hoc modeling in the projector), pickup (resume where the prior run left off). Anonymized team-scope sibling to personal-cfo (which handles personal household finances). Composes with company-brain (report gets stored + wiki-indexed there), toolify (wire company-specific data sources), loopify (schedule the monthly + weekly runs). Triggers on "/company-cfo," "/cfo," "monthly cash report," "do the CFO snapshot," "CFO monthly," "let's run CFO," "cash projection," "runway forecast," "monthly financials," "cash pulse.★ 855 GitHub stars

More from himself65

SkillEstimate the intrinsic value of a public company using DCFCompany valuationhimself65/finance-skills · by himself65Estimate the intrinsic value of a public company using DCF, relative (peer multiple) and sum-of-parts (SOTP) methods, then triangulate to an implied share price with upside/downside versus the current market price. Use this skill whenever the user asks: what is AAPL worth", "valuation of NVDA", "fair value of TSLA", "intrinsic value", DCF for MSFT", "build a DCF", "discounted cash flow", "WACC", "terminal value", implied share price", "upside to fair value", "is X overvalued/undervalued", relative valuation", "peer comparison valuation", "EV/EBITDA target", "SOTP", sum of the parts", "how much is [company] worth", "price target from fundamentals", value this company", or any ticker in the context of computing intrinsic or relative valuation. Default to running ALL three methods (DCF + relative + SOTP-if-applicable) and presenting a blended implied price with a sensitivity table. Do not answer valuation questions from memory — always run the workflow.★ 3.3k GitHub starsSkillRead Discord for financial research using opencliDiscord Skill (Read-Only)himself65/finance-skills · by himself65Read Discord for financial research using opencli (read-only). Use this skill whenever the user wants to read Discord channels, search for messages in trading servers, view guild/channel info, monitor crypto or market discussion groups, or gather financial sentiment from Discord. Triggers include: "check my Discord", "search Discord for", "read Discord messages", what's happening in the trading Discord", "show Discord channels", "list my servers", Discord sentiment on BTC", "what are people saying in Discord about AAPL", monitor crypto Discord", any mention of Discord in context of reading financial news, market research, or trading community discussions. This skill is READ-ONLY — it does NOT support sending messages, reacting, or any write operations.★ 3.3k GitHub starsSkillGenerate a post-earnings analysis for any stock using YahooEarnings Recap Skillhimself65/finance-skills · by himself65Generate a post-earnings analysis for any stock using Yahoo Finance data. Use when the user wants to review what happened after earnings, understand beat/miss results, see stock reaction, or get an earnings recap. Triggers: "AAPL earnings recap", "how did TSLA earnings go", "MSFT earnings results", did NVDA beat earnings", "post-earnings analysis", "earnings surprise", what happened with GOOGL earnings", "earnings reaction", stock moved after earnings", "EPS beat or miss", "revenue beat or miss", quarterly results for", "how were earnings", "AMZN reported last night", earnings call recap", or any request about a company's recent earnings outcome. Use this skill when the user references a past earnings event, even if they just say "AAPL reported" or "how did they do".★ 3.3k GitHub starsSkillDeep-dive into analyst estimates and revision trends for anyEstimate Analysis Skillhimself65/finance-skills · by himself65Deep-dive into analyst estimates and revision trends for any stock using Yahoo Finance data. Use when the user wants to understand analyst estimate direction, how EPS or revenue forecasts changed over time, compare estimate distributions, or analyze growth projections across periods. Triggers: "estimate analysis for AAPL", "analyst estimate trends for NVDA", EPS revisions for TSLA", "how have estimates changed for MSFT", estimate revisions", "EPS trend", "revenue estimates", consensus changes", "analyst estimates", "estimate distribution", growth estimates for", "estimate momentum", "revision trend", forward estimates", "next quarter estimates", "annual estimates", estimate spread", "bull vs bear estimates", "estimate range", or any request about tracking or comparing analyst estimates/revisions. Use this skill when the user asks about estimates beyond a simple lookup — if they want context, trends, or analysis, this is the right skill.★ 3.3k GitHub starsSkillCalculate ETF premium/discount vs NAV via Yahoo FinanceETF Premium/Discount Analysis Skillhimself65/finance-skills · by himself65Calculate ETF premium/discount vs NAV via Yahoo Finance, and decompose single-day surges into NAV-driven vs structural components (gamma squeeze, dealer hedging, blocked AP arbitrage). Use whenever the user asks about an ETF's premium or discount, NAV comparison, why an ETF diverged from its holdings, or how much of a move is dealer-hedging-driven. Triggers: "ETF premium", "ETF discount", "NAV premium", "is SPY at a premium", "BITO premium", IBIT premium", "bond ETF discount", "trading above/below NAV", "ETF premium screener", biggest discount", "compare ETF NAV", "ETF arbitrage", "ETF gamma squeeze", ETF premium surge", "decompose ETF move", "dealer gamma exposure", "GEX for ETF", why did this ETF jump", "premium convergence", "AP arbitrage blocked", or any request about the gap between an ETF's price and underlying value. Especially relevant for leveraged, inverse, international, bond, commodity, and crypto ETFs.★ 3.3k GitHub starsSkillDesign system and guidelines for Claude's built-inGenerative UI Skillhimself65/finance-skills · by himself65Design system and guidelines for Claude's built-in generative UI — the show_widget tool that renders interactive HTML/SVG widgets inline in claude.ai conversations. This skill provides the complete Anthropic "Imagine" design system so Claude produces high-quality widgets without needing to call read_me first. Use this skill whenever the user asks to visualize data, create an interactive chart, build a dashboard, render a diagram, draw a flowchart, show a mockup, create an interactive explainer, or produce any visual content beyond plain text or markdown. Triggers include: "show me", "visualize", draw", "chart", "dashboard", "diagram", "flowchart", "widget", "interactive", "mockup", "illustrate", explain how X works" (with visual), or any request for visual/interactive output. Also triggers when the user wants to display financial data visually, create comparison grids, or build tools with sliders, toggles, or live-updating displays.★ 3.3k GitHub stars