Skip to main content
skill CX Codex

fundamentals — Claude Code skill: data and installation

The fundamentals skill retrieves financial statements, earnings, and company metrics from Yahoo Finance. Use it when an agent needs fundamental analysis for a ticker.

MIT 188 installs ★ 417 updated 2026-10-21

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add staskh/trading_skills --skill fundamentals -a claude-code
Open on GitHub

What fundamentals does

The skill runs scripts that query Yahoo Finance for a ticker symbol. It can return key metrics, recent quarterly and annual income-statement data, plus historical and estimated earnings. The --type option selects all, financials, earnings, or info.

A second script computes Piotroski’s F-Score from 9 checks covering profitability, cash flow, leverage, liquidity, dilution, margins, and asset turnover. Its JSON includes the score, each pass/fail criterion, the values used, and a financial-health interpretation. Checks 5–9 compare annual figures across the latest and prior fiscal years.

The skill depends on pandas and yfinance, and the package declares trading-skills as a dependency. When uv or pyproject.toml is unavailable, use python in place of uv run python. Time-based calculations use America/New_York; generated JSON must include generated_at and data_delay. Without pandas and yfinance, the analysis scripts will not run.

What it helps with

  • retrieve company metrics for a ticker
  • inspect quarterly and annual financials
  • compare reported and estimated earnings
  • score a company with Piotroski F-Score

Example prompts for the agent

  • Fetch the fundamental data for SYMBOL and summarize its key metrics.
  • Compare reported earnings with estimates for SYMBOL.
  • Run the Piotroski F-Score for SYMBOL and explain every criterion.

How to install fundamentals

1Skills CLI (Vercel)

npx skills add staskh/trading_skills --skill fundamentals -a claude-code

2Manually: put the files in place

~/.claude/skills/fundamentals/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/fundamentals/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about fundamentals

How do I install fundamentals in Claude Code?

Run npx skills add staskh/trading_skills --skill fundamentals -a claude-code, then check ~/.claude/skills/fundamentals/SKILL.md.

What does fundamentals do?

It queries Yahoo Finance for ticker-level metrics, financial statements, and earnings. It can also calculate Piotroski’s F-Score with a criterion-by-criterion breakdown.

Which dependencies does the skill need?

The scripts use pandas and yfinance. The package also declares trading-skills as a dependency.

Source text

SKILL.md · MIT
---
name: fundamentals
description: Get fundamental financial data including financials, earnings, and key metrics. Use when user asks about financials, earnings, revenue, profit, balance sheet, income statement, or company fundamentals.
dependencies: ["trading-skills"]
---

# Fundamentals

Fetch fundamental financial data from Yahoo Finance.

## Instructions

> **Note:** If `uv` is not installed or `pyproject.toml` is not found, replace `uv run python` with `python` in all commands below.

```bash
uv run python scripts/fundamentals.py SYMBOL [--type TYPE]
```

## Arguments

- `SYMBOL` - Ticker symbol
- `--type` - Data type: all, financials, earnings, info (default: all)

## Output

Returns JSON with:
- `info` - Key metrics (market cap, PE, EPS, dividend, etc.)
- `financials` - Recent quarterly/annual income statement data
- `earnings` - Historical and estimated earnings

Present key metrics clearly. Compare actual vs estimated earnings if relevant.

---

## Piotroski F-Score

Calculate Piotroski's F-Score to evaluate a company's financial strength using 9 fundamental criteria.

### Instructions

```bash
uv run python scripts/piotroski.py SYMBOL
```

### What is Piotroski F-Score?

Piotroski's F-Score is a fundamental analysis tool developed by Joseph Piotroski that evaluates a company's financial strength using 9 criteria. Each criterion scores 1 point if passed, 0 if failed, for a maximum score of 9.

### The 9 Criteria

1. **Positive Net Income** - Company is profitable
2. **Positive ROA** - Assets are generating returns
3. **Positive Operating Cash Flow** - Company generates cash from operations
4. **Cash Flow > Net Income** - High-quality earnings (cash exceeds accounting profit)
5. **Lower Long-Term Debt** - Decreasing leverage (improving financial position)
6. **Higher Current Ratio** - Improving liquidity
7. **No New Shares Issued** - No dilution (or share buybacks)
8. **Higher Gross Margin** - Improving profitability efficiency
9. **Higher Asset Turnover** - More efficient use of assets

### Score Interpretation

- **8-9:** Excellent - Very strong financial health
- **6-7:** Good - Strong financial health
- **4-5:** Fair - Moderate financial health
- **0-3:** Poor - Weak financial health

### Output

Returns JSON with:
- `score` - F-Score (0-9)
- `max_score` - Maximum possible score (9)
- `criteria` - Detailed breakdown of each criterion with pass/fail status and values
- `interpretation` - Text description of financial health level
- `data_available` - Boolean indicating if year-over-year comparison data is available for criteria 5-9

### Implementation Details

- Criteria 1-4 use quarterly financial data (most recent year)
- Criteria 5-9 use annual financial data for year-over-year comparisons
- Compares most recent fiscal year vs previous fiscal year

### Use Cases

Use Piotroski F-Score when:
- Evaluating fundamental financial strength
- Screening for value stocks with improving fundamentals
- Assessing financial health trends
- Comparing financial strength across companies
- Identifying companies with strong fundamentals but undervalued prices

## Dependencies

- `pandas`
- `yfinance`


## Timezone

All timestamps and time-based calculations must use the `America/New_York` timezone. All JSON output must include `generated_at` (NY time string) and `data_delay` fields.

© staskh · MIT · staskh/trading_skills

Similar skills

All skills for Finance and business →

From the same set12

The whole set →
technical-analysis technical-analysis is a Claude Code skill that calculates stock indicators and signals. It activates for requests about RSI, MACD, moving averages, or chart analysis. CX Codex +1 618installs news-sentiment The news-sentiment skill fetches recent stock news from Yahoo Finance and gauges market sentiment. Use it to find out what's in the headlines and how it might sway the stock price. CX Codex +1 253installs stock-quote stock-quote is a Claude Code skill that fetches current price, volume, change, and 52-week range for any ticker. CX Codex +1 138installs greeks Skill computes option Greeks (delta, gamma, theta, vega) and implied volatility using the Black-Scholes model. Use it to understand how your position reacts to price changes, time decay, and shifts in volatility. CX Codex +1 137installs report-stock report-stock builds stock research reports in Markdown or PDF covering market trends, PMCC viability, and company fundamentals. CX Codex +1 123installs option-chain Skill pulls option chain data from Yahoo Finance: calls and puts with strike prices, bids, asks, volumes, and implied volatility. Use it to check option quotes for a specific expiration date. CX Codex +1 117installs risk-assessment risk-assessment calculates risk metrics for stocks and positions: volatility, beta, Value at Risk, and maximum drawdown. Use it to assess position risk and determine sizing. CX Codex +1 113installs ib-portfolio ib-portfolio — a skill for Claude Code fetches open positions and holdings from Interactive Brokers. The agent invokes it when asked about current stocks, portfolio value, or account assets. CX Codex +1 107installs

Project sponsors

Companies that keep this analytics open