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 post-earnings analysis for any stock using Yahoo

Earnings Recap Skill

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

Earnings Recap Skill cover

Generate 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.

---
name: earnings-recap
description: >
  Generate 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".
---

# Earnings Recap Skill

Overview

Generates a post-earnings analysis using Yahoo Finance data via yfinance. Covers the actual vs estimated numbers, surprise magnitude, stock price reaction, and financial context — a complete picture of what happened.

Manual install (npx, ZIP)
Claude Codenpx skills add himself65/finance-skills --skill earnings-recap -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-recap
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/6c8dcd1a800e24553100/earnings-recap.zip" -OutFile "$env:TEMP\earnings-recap.zip"; Expand-Archive "$env:TEMP\earnings-recap.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.md7.2 KB
  • README.md1.1 KB
  • references/1 file · 4.2 KB
Read the files here
himself65/0a5759b3 files
SKILL.md
Show the full text190 lines

Earnings Recap Skill

Generates a post-earnings analysis using Yahoo Finance data via yfinance. Covers the actual vs estimated numbers, surprise magnitude, stock price reaction, and financial context — a complete picture of what happened.

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 Data

Extract the ticker from the user's request. Fetch all relevant post-earnings data in one script.

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

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

# --- Earnings result ---
earnings_hist = ticker.earnings_history

# --- Financial statements ---
quarterly_income = ticker.quarterly_income_stmt
quarterly_cashflow = ticker.quarterly_cashflow
quarterly_balance = ticker.quarterly_balance_sheet

# --- Price reaction ---
# Get ~30 days of history to capture the reaction window
hist = ticker.history(period="1mo")

# --- Context ---
info = ticker.info
news = ticker.news
recommendations = ticker.recommendations
What to extract
Data Source Key Fields Purpose
earnings_history epsEstimate, epsActual, epsDifference, surprisePercent Beat/miss result
quarterly_income_stmt TotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPS Actual financials
history() Close prices around earnings date Stock price reaction
info currentPrice, marketCap, forwardPE Current context
news Recent headlines Earnings-related news

Step 3: Determine the Most Recent Earnings

The most recent earnings result is the first row (most recent date) in earnings_history. Use its date to:

  1. Identify the earnings date for the price reaction analysis
  2. Match to the corresponding quarter in the financial statements
  3. Calculate stock price reaction — compare the close before earnings to the next trading day's close (or open, depending on whether earnings were before/after market)
Price reaction calculation
import numpy as np

# Find the earnings date from earnings_history index
earnings_date = earnings_hist.index[0]  # most recent

# Get daily prices around the earnings date
hist_extended = ticker.history(start=earnings_date - timedelta(days=5),
                                end=earnings_date + timedelta(days=5))

# The reaction is typically measured as:
# - Close on the last trading day before earnings -> Close on the first trading day after
# Be careful with before/after market reports
if len(hist_extended) >= 2:
    pre_price = hist_extended['Close'].iloc[0]
    post_price = hist_extended['Close'].iloc[-1]
    reaction_pct = ((post_price - pre_price) / pre_price) * 100

Note: The exact reaction window depends on when the company reported (before market open vs after close). The price data will reflect this — look for the biggest gap between consecutive closes near the earnings date.


Step 4: Build the Earnings Recap

Section 1: Headline Result

Lead with the key numbers:

  • EPS: Actual vs. Estimate, beat/miss by how much, surprise %
  • Revenue: Actual vs. prior year (from quarterly_income_stmt TotalRevenue)
  • Stock reaction: % move on earnings day

Example: "AAPL beat Q3 EPS estimates by 3.7% ($1.40 actual vs $1.35 expected). Revenue grew 5.4% YoY to $94.3B. The stock rose +2.1% on the report."

Section 2: Earnings vs. Estimates Detail
Metric Estimate Actual Surprise
EPS $1.35 $1.40 +$0.05 (+3.7%)

If the user asked about a specific quarter (not the most recent), look further back in earnings_history.

Show the last 4 quarters of key metrics from quarterly_income_stmt:

Quarter Revenue YoY Growth Gross Margin Operating Margin EPS
Q3 2024 $94.3B +5.4% 46.2% 30.1% $1.40
Q2 2024 $85.8B +4.9% 46.0% 29.8% $1.33
Q1 2024 $119.6B +2.1% 45.9% 33.5% $2.18
Q4 2023 $89.5B -0.3% 45.2% 29.2% $1.26

Calculate margins from the raw financials:

  • Gross Margin = GrossProfit / TotalRevenue
  • Operating Margin = OperatingIncome / TotalRevenue
Section 4: Stock Price Reaction
  • The % move on the earnings day/next session
  • How it compares to the stock's average earnings-day move (calculate the average absolute move from the last 4 earnings dates in earnings_history)
  • Where the stock is now relative to the earnings-day move (has it held, given back gains, extended further?)
Section 5: Context & What Changed

Based on the data, note:

  • Whether margins expanded or compressed vs prior quarter
  • Any notable changes in revenue growth trajectory
  • How the beat/miss compares to the stock's historical pattern (from the full earnings_history)
  • Current analyst sentiment from recommendations if available

Step 5: Respond to the User

Present the recap as a clean, structured summary:

  1. Lead with the headline: "AAPL reported Q3 2024 earnings on [date]: Beat EPS by 3.7%, revenue +5.4% YoY."
  2. Show the tables for detail
  3. Highlight what matters: Was this a meaningful beat or a low-bar situation? Is the trend improving or deteriorating?
  4. Keep it factual — present the data, avoid making investment recommendations
Caveats to include
  • Yahoo Finance data may not include all details from the earnings call (guidance, segment breakdowns)
  • Revenue estimates are harder to compare precisely — yfinance provides YoY comparison from financial statements
  • Price reaction may be influenced by broader market moves on the same day
  • This is not financial advice

Reference Files

  • references/api_reference.md — Detailed yfinance API reference for earnings history and financial statement methods

Read the reference file when you need exact method signatures or to handle edge cases in the financial data.

1---
2name: earnings-recap
3description: >
4 Generate a post-earnings analysis for any stock using Yahoo Finance data.
5 Use when the user wants to review what happened after earnings,
6 understand beat/miss results, see stock reaction, or get an earnings recap.
7 Triggers: "AAPL earnings recap", "how did TSLA earnings go", "MSFT earnings results",
8 "did NVDA beat earnings", "post-earnings analysis", "earnings surprise",
9 "what happened with GOOGL earnings", "earnings reaction",
10 "stock moved after earnings", "EPS beat or miss", "revenue beat or miss",
11 "quarterly results for", "how were earnings", "AMZN reported last night",
12 "earnings call recap", or any request about a company's recent earnings outcome.
13 Use this skill when the user references a past earnings event,
14 even if they just say "AAPL reported" or "how did they do".
15---
16 
17# Earnings Recap Skill
18 
19Generates a post-earnings analysis using Yahoo Finance data via [yfinance](https://github.com/ranaroussi/yfinance). Covers the actual vs estimated numbers, surprise magnitude, stock price reaction, and financial context — a complete picture of what happened.
20 
21**Important**: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.
22 
23---
24 
25## Step 1: Ensure yfinance Is Available
26 
27**Current environment status:**
28 
29```
30!`python3 -c "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'YFINANCE_NOT_INSTALLED\')')"`
31```
32 
33If `YFINANCE_NOT_INSTALLED`, install it:
34 
35```python
36import subprocess, sys
37subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
38```
39 
40If already installed, skip to the next step.
41 
42---
43 
44## Step 2: Identify the Ticker and Gather Data
45 
46Extract the ticker from the user's request. Fetch all relevant post-earnings data in one script.
47 
48```python
49import yfinance as yf
50import pandas as pd
51from datetime import datetime, timedelta
52 
53ticker = yf.Ticker("AAPL") # replace with actual ticker
54 
55# --- Earnings result ---
56earnings_hist = ticker.earnings_history
57 
58# --- Financial statements ---
59quarterly_income = ticker.quarterly_income_stmt
60quarterly_cashflow = ticker.quarterly_cashflow
61quarterly_balance = ticker.quarterly_balance_sheet
62 
63# --- Price reaction ---
64# Get ~30 days of history to capture the reaction window
65hist = ticker.history(period="1mo")
66 
67# --- Context ---
68info = ticker.info
69news = ticker.news
70recommendations = ticker.recommendations
71```
72 
73### What to extract
74 
75| Data Source | Key Fields | Purpose |
76|---|---|---|
77| `earnings_history` | epsEstimate, epsActual, epsDifference, surprisePercent | Beat/miss result |
78| `quarterly_income_stmt` | TotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPS | Actual financials |
79| `history()` | Close prices around earnings date | Stock price reaction |
80| `info` | currentPrice, marketCap, forwardPE | Current context |
81| `news` | Recent headlines | Earnings-related news |
82 
83---
84 
85## Step 3: Determine the Most Recent Earnings
86 
87The most recent earnings result is the first row (most recent date) in `earnings_history`. Use its date to:
88 
891. **Identify the earnings date** for the price reaction analysis
902. **Match to the corresponding quarter** in the financial statements
913. **Calculate stock price reaction** — compare the close before earnings to the next trading day's close (or open, depending on whether earnings were before/after market)
92 
93### Price reaction calculation
94 
95```python
96import numpy as np
97 
98# Find the earnings date from earnings_history index
99earnings_date = earnings_hist.index[0] # most recent
100 
101# Get daily prices around the earnings date
102hist_extended = ticker.history(start=earnings_date - timedelta(days=5),
103 end=earnings_date + timedelta(days=5))
104 
105# The reaction is typically measured as:
106# - Close on the last trading day before earnings -> Close on the first trading day after
107# Be careful with before/after market reports
108if len(hist_extended) >= 2:
109 pre_price = hist_extended['Close'].iloc[0]
110 post_price = hist_extended['Close'].iloc[-1]
111 reaction_pct = ((post_price - pre_price) / pre_price) * 100
112```
113 
114**Note**: The exact reaction window depends on when the company reported (before market open vs after close). The price data will reflect this — look for the biggest gap between consecutive closes near the earnings date.
115 
116---
117 
118## Step 4: Build the Earnings Recap
119 
120### Section 1: Headline Result
121 
122Lead with the key numbers:
123- **EPS**: Actual vs. Estimate, beat/miss by how much, surprise %
124- **Revenue**: Actual vs. prior year (from quarterly_income_stmt TotalRevenue)
125- **Stock reaction**: % move on earnings day
126 
127Example: "AAPL beat Q3 EPS estimates by 3.7% ($1.40 actual vs $1.35 expected). Revenue grew 5.4% YoY to $94.3B. The stock rose +2.1% on the report."
128 
129### Section 2: Earnings vs. Estimates Detail
130 
131| Metric | Estimate | Actual | Surprise |
132|---|---|---|---|
133| EPS | $1.35 | $1.40 | +$0.05 (+3.7%) |
134 
135If the user asked about a specific quarter (not the most recent), look further back in `earnings_history`.
136 
137### Section 3: Quarterly Financial Trends
138 
139Show the last 4 quarters of key metrics from `quarterly_income_stmt`:
140 
141| Quarter | Revenue | YoY Growth | Gross Margin | Operating Margin | EPS |
142|---|---|---|---|---|---|
143| Q3 2024 | $94.3B | +5.4% | 46.2% | 30.1% | $1.40 |
144| Q2 2024 | $85.8B | +4.9% | 46.0% | 29.8% | $1.33 |
145| Q1 2024 | $119.6B | +2.1% | 45.9% | 33.5% | $2.18 |
146| Q4 2023 | $89.5B | -0.3% | 45.2% | 29.2% | $1.26 |
147 
148Calculate margins from the raw financials:
149- Gross Margin = GrossProfit / TotalRevenue
150- Operating Margin = OperatingIncome / TotalRevenue
151 
152### Section 4: Stock Price Reaction
153 
154- The % move on the earnings day/next session
155- How it compares to the stock's average earnings-day move (calculate the average absolute move from the last 4 earnings dates in `earnings_history`)
156- Where the stock is now relative to the earnings-day move (has it held, given back gains, extended further?)
157 
158### Section 5: Context & What Changed
159 
160Based on the data, note:
161- Whether margins expanded or compressed vs prior quarter
162- Any notable changes in revenue growth trajectory
163- How the beat/miss compares to the stock's historical pattern (from the full `earnings_history`)
164- Current analyst sentiment from `recommendations` if available
165 
166---
167 
168## Step 5: Respond to the User
169 
170Present the recap as a clean, structured summary:
171 
1721. **Lead with the headline**: "AAPL reported Q3 2024 earnings on [date]: Beat EPS by 3.7%, revenue +5.4% YoY."
1732. **Show the tables** for detail
1743. **Highlight what matters**: Was this a meaningful beat or a low-bar situation? Is the trend improving or deteriorating?
1754. **Keep it factual** — present the data, avoid making investment recommendations
176 
177### Caveats to include
178- Yahoo Finance data may not include all details from the earnings call (guidance, segment breakdowns)
179- Revenue estimates are harder to compare precisely — yfinance provides YoY comparison from financial statements
180- Price reaction may be influenced by broader market moves on the same day
181- This is not financial advice
182 
183---
184 
185## Reference Files
186 
187- `references/api_reference.md` — Detailed yfinance API reference for earnings history and financial statement methods
188 
189Read the reference file when you need exact method signatures or to handle edge cases in the financial data.
190 
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 →
SkillReverse engineer native, managed, Electron/JavaScriptREAmorluto/rea · by morlutoReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.★ 316k GitHub starsSkillBrainstorms ideas into designs before any creative workBrainstorming Ideas Into Designsobra/superpowers · by obraYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.★ 290k GitHub starsSkillRequires technical rigor and verificationCode Review Receptionobra/superpowers · by obraUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation★ 290k GitHub starsSkillDiagnosis loop for hard bugs and performance regressionsDiagnosing bugsmattpocock/skills · by mattpocockDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.★ 267k GitHub starsSkillImplement the result of /to-spec and /to-tickets in codeImplement specmattpocock/skills · by mattpocockImplement the result of /to-spec and /to-tickets in code.★ 267k GitHub starsSkillWriting a PR bodymattpocock/skills · by mattpocockUse when writing a PR body.★ 267k 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 pre-earnings briefing for any stock using YahooEarnings Preview Skillhimself65/finance-skills · by himself65Generate 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.★ 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