К основному содержанию
скилл CX Codex

earnings-preview · himself65 — скилл для Claude Code: что делает и как установить

Собирает брифинг перед отчётом компании: дата и время публикации, консенсус по EPS и выручке, история beat/miss, оценки аналитиков.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add himself65/finance-skills --skill earnings-preview -a claude-code
Открыть на GitHub

Что делает earnings-preview

Скилл тянет данные Yahoo Finance через библиотеку yfinance и складывает из них briefing перед квартальным отчётом. На выходе дата публикации и время — до открытия или после закрытия, консенсус по EPS и выручке с минимумом, максимумом и числом аналитиков, история beat/miss за последние четыре квартала, распределение рейтингов от strong buy до strong sell и ценовые цели. Отдельный блок «на что смотреть» агент пишет сам, опираясь на динамику выручки и маржи конкретной компании. Широкий разброс оценок — больше примерно 20% от консенсуса — скилл велит отмечать как признак необычной неопределённости.

Перед первым запуском нужен установленный yfinance. Скилл проверяет его пробой через python3 и при отсутствии ставит командой pip install yfinance. В хостах без предварительного выполнения проб, например в Codex, те же команды идут через инструмент оболочки. Доступа к шеллу нет — агент обязан сказать об этом, а не додумывать цифры. Есть и содержательное ограничение: консенсус Yahoo Finance может отставать от провайдеров реального времени на несколько часов, поэтому свежая правка прогноза в брифинг не попадёт. Данные здесь для исследования, а не рекомендация к сделке.

Какие задачи решает

  • собрать брифинг перед отчётом по тикеру
  • сверить консенсус по EPS и выручке с прошлогодними значениями
  • посчитать, сколько раз компания била прогноз за четыре квартала
  • посмотреть разброс ценовых целей и потенциал от среднего значения
  • наметить, за чем следить в самом отчёте

Примеры запросов агенту

  • Собери превью к отчёту AAPL: когда публикация и что ждёт улица?
  • Что консенсус ждёт от NVDA по EPS и выручке в этом квартале?
  • Пройдись по истории beat/miss у TSLA за последние четыре квартала и покажи ценовые цели аналитиков.

Как установить earnings-preview

1Через Skills CLI (Vercel)

npx skills add himself65/finance-skills --skill earnings-preview -a claude-code

2Вручную: положить файлы

~/.claude/skills/earnings-preview/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/earnings-preview/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора22

stock-correlation Скилл находит бумаги, которые ходят вместе с выбранным тикером, и меряет связь: корреляция, бета, спред, матрица по группе. Нужен, когда непонятно, что потянет за собой акцию. CX Codex +1 3 400установок options-payoff Строит интерактивный график доходности опционной позиции с расчётом на экспирацию и теоретической стоимостью по Black–Scholes. CX Codex +1 3 400установок generative-ui Задаёт правила дизайн-системы для интерактивных HTML- и SVG-виджетов. Нужен, когда вместо текста агенту поручают показать графики, диаграммы или калькуляторы. CX Codex +1 3 200установок earnings-recap Разбирает опубликованный квартальный отчёт компании: EPS, выручку, маржи и реакцию акций. Нужен для вопросов о результате, сюрпризе и движении после отчёта. CX Codex +1 3 200установок twitter-reader Скилл читает Twitter/X через opencli: лента, поиск твитов, тренды, закладки, профили и уведомления. Только чтение, для финансовых исследований. CX Codex +1 3 100установок etf-premium Считает премию или дисконт ETF к NAV по данным Yahoo Finance, сравнивает фонды между собой и раскладывает резкий скачок цены на причины. CX Codex +1 3 100установок stock-liquidity Оценивает ликвидность акций через библиотеку yfinance: спреды bid-ask, объёмы торгов и рыночный импакт. Помогает рассчитать издержки перед входом в позицию. CX Codex +1 3 100установок estimate-analysis Скилл собирает консенсус-оценки аналитиков по тикеру из Yahoo Finance и показывает, как они менялись за 7, 30, 60 и 90 дней. Пригодится, когда нужен не один прогноз, а динамика ревизий. CX Codex +1 3 200установок

Другие версии earnings-preview

Похожие

earnings-preview-single официальный anthropics Генерирует HTML-отчёт equity research на 4–5 страниц по одной компании: анализирует транскрипт последнего earnings call, конкурентов, мультипликаторы и новости. CX Codex +1 1 800установок earnings-trade-analyzer tradermonty Скилл оценивает акции после отчётов по пяти факторам, ставит балл 0–100 и буквенную оценку A/B/C/D. CX Codex +1 3 400установок earnings-analysis официальный anthropics Скилл собирает отчёт по квартальным результатам компании: сравнивает факты с ожиданиями, обновляет оценки и показывает влияние на инвестиционный тезис. CX Codex +1 3 400установок earnings-calendar tradermonty Скилл достаёт из Financial Modeling Prep расписание квартальных отчётов по акциям США и собирает его в markdown-таблицу по датам и времени публикации. CX Codex +1 3 500установок stock-market-pro sundial-org Скилл для анализа акций, крипты и форекса: тянет котировки, фундаментальные метрики и рисует свечные графики прямо в терминале. CX Codex +1 4 100установок alphaear-stock RKiding Ищет тикеры рынков A-Share, HK и US, выгружает котировки OHLCV и фундаментальные показатели компании. CX Codex +1 1 200установок

Рядом в теме «Финансы и бизнес»

Всё по теме «Финансы и бизнес» →

Вопросы о earnings-preview

Как установить earnings-preview в Claude Code?

Одной командой: npx skills add himself65/finance-skills --skill earnings-preview -a claude-code. Файл скилла окажется в ~/.claude/skills/earnings-preview/SKILL.md.

Что делает earnings-preview?

Собирает предотчётный брифинг по акции из данных Yahoo Finance: дата и время отчёта, консенсус по EPS и выручке, история beat/miss, рейтинги и ценовые цели, плюс разбор того, на что будет смотреть рынок.

Что нужно, чтобы скилл заработал?

Python с библиотекой yfinance — скилл ставит её сам через pip install yfinance, если не найдёт. Ещё нужен доступ к оболочке: без него агент сообщит об ограничении, а не выдаст цифры.

Исходный текст

SKILL.md · MIT
---
name: earnings-preview
description: >
  Build a pre-earnings briefing for a stock from Yahoo Finance data (yfinance): the
  upcoming report date and timing, consensus EPS and revenue estimates with their range,
  the beat/miss track record, analyst ratings and price targets, and what to watch in
  the print. Use this skill whenever the user is preparing for an upcoming earnings
  report or asks what the street expects — consensus or whisper numbers, EPS
  expectations, whether a company will beat, an earnings setup, or an earnings-season
  preview — and whenever a ticker comes up in the context of upcoming earnings, even
  without the word "preview". For results that are already out, use earnings-recap.
---

# Earnings Preview Skill

If your host has not already executed the shell probes below (for example, in Codex), run the commands inside the `!` wrappers with its shell tool before choosing a setup path. Use the actual output; if shell access is unavailable, report that limitation.

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

**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:

```python
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.

```python
import yfinance as yf

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

# --- Core data ---
info = ticker.info
calendar = ticker.calendar
earnings_dates = ticker.get_earnings_dates(limit=8)  # report timestamps; the upcoming one has no Reported EPS yet
hist = ticker.history(period="1mo")                  # recent price performance

# --- 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 |
| `get_earnings_dates()` | Earnings Date (tz-aware timestamp), EPS Estimate, Reported EPS | Report timing: the upcoming row has no Reported EPS; a time at or after 16:00 ET means after the close, earlier times mean before the open |
| `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 (indexed by fiscal quarter-end, oldest first) |
| `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

The briefing should let the user see the setup at a glance. Cover these five areas; if the data for one is missing, say so in a line rather than dropping it.

1. **Date and context** — company, ticker, sector and industry; the report date and whether it lands before the open or after the close; current price with 1-week and 1-month performance; market cap.
2. **Consensus estimates** — a table of this quarter's EPS and revenue consensus with low, high, analyst count, year-ago value, and expected growth. A high/low spread wider than about 20% of consensus signals unusual uncertainty; say so when you see it.
3. **Beat/miss track record** — the last four quarters of estimated vs actual EPS with surprise %, summarized as a beat count and average surprise.
4. **Analyst sentiment** — the rating distribution (strong buy through strong sell) and the price-target range (low, mean, median, high), with the implied upside or downside from the mean target.
5. **What to watch** — the few things the market will focus on in this print, chosen for this company and sector: revenue growth accelerating or decelerating, margins expanding or compressing, line items that moved sharply quarter over quarter, and segment trends where the data has them. This is the judgment part of the briefing.

---

## Step 4: Respond to the User

Open with the headline — the report date and a one-line read of the setup — then the five areas above, using tables where they help. Close with a short read of the overall setup drawn from the estimates, track record, and sentiment, framed as what the street expects rather than a recommendation.

Include the caveats that apply: estimates can change until the report date, past beats don't guarantee future ones, Yahoo Finance consensus can lag real-time providers by a few hours, and 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.

© himself65 · MIT · himself65/finance-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой