Agent skill

Yfinance

by SilvioBaratto in SilvioBaratto/optimizer

Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time…

Custom licenceAuto-check: notesBusiness, Finance & HR

Install Yfinance

skills CLI
$ npx skills add SilvioBaratto/optimizer --skill yfinance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SilvioBaratto/optimizer yfinance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SilvioBaratto/optimizer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/yfinance .claude/skills/yfinance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
yfinance
GitHub stars
176
Token cost
~4k tokens
SKILL.md length
1,424 words
Files
11 (incl. references)
Skills in repo
10
Repo updated
First seen
Licence
Custom licence

At a glance

Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time…

  • Works in 12 steps: Period ↔ interval limits are enforced… → download() defaults differ from… → Multi-level columns when tickers is a… → …
  • Works with yfinance
  • SKILL.md covers Where to look, Official documentation, Architecture and Decision guide, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Yfinance is an agent skill from SilvioBaratto/optimizer. Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time quotes, or inspecting sector, industry, or fund rollups. Do not wait to be asked; apply this skill automatically whenever the user mentions yfinance, Yahoo Finance, OHLCV, stock data, ticker info, earnings estimates, valuation measures, an equity or ETF screener, or real-time quote streaming. Covers yfinance 1.6.0 (Aug…

Its SKILL.md is about 4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `PATTERNS.md`, `references/analysis.md` and `references/config.md`).

It sits in Business, Finance & HR, covering Stock and market analysis. It works with yfinance. The repository describes itself as: Quantitative portfolio construction and optimization platform built on skfolio and scikit-learn.

When your agent uses it

  • Works with yfinance
  • Yahoo Finance data — pulling price history
  • Fetching financials
  • Screening stocks / funds / ETFs

Example prompts

  • “/yfinance”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Glob, Grep, Bash, WebFetch, WebSearch, mcp__ide__getDiagnostics

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Period ↔ interval limits are enforced silently. 1m → max 7 days, 2m–90m → 60 days, 1h → 730 days, 1d+ → full history. Intraday cannot…
  2. download() defaults differ from history(). download() uses actions=False (no dividends/splits columns unless you pass actions=True)…
  3. Multi-level columns when tickers is a list. multi_level_index=True by default (even for a single ticker in download). Use…
  4. pandas 3+ read-only errors: history() output is memory-consolidated since v1.2.0. Call .copy() before mutating in place. (1.6.0 fixed an…
  5. Screener fields don't cross classes. Passing an equity field to FundQuery raises ValueError. Pick the right *Query class first; inspect…
  6. screen() uses camelCase sort params and split size/count. It is screen(query, sortField=…, sortAsc=…, size=…, count=…, offset=…) — not…
  7. WebSocket — no run() / on_message attribute. Use ws.subscribe([...]) then ws.listen(handler) (handler is an optional arg to listen, not an…
  8. Fund data lives under ticker.funds_data (a FundsData object), not flat ticker.fund_* properties. Populated only for ETFs / mutual funds…
  9. proxy is no longer a per-call or constructor argument (removed across the 1.4.x–1.6.0 line). Configure proxy globally via yfinance config…
  10. curl_cffi is OPTIONAL since v1.4.0 — yfinance falls back to requests if it's absent. Do not treat it as required. If you do install it…
  11. download() is reentrant since v1.4.0 (shared module globals removed) — safe from async workers / worker pools. ignore_tz=False returns the…
  12. ticker.info is slow and flaky — it scrapes Yahoo's quote page. Prefer fast_info, valuation, or the dedicated financials/analysis…

What it can do on your machine

Read from SKILL.md and the folder at commit 63e897b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Glob
    • Grep
    • Bash
    • WebFetch
    • WebSearch
    • mcp__ide__getDiagnostics

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • ranaroussi.github.io
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Yfinance loads about 4k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 228 tokens; SKILL.md has 1,424 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~228
When it runs · the whole SKILL.md, loaded when a task matches
~4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch, WebSearch, mcp__ide__getDiagnostics

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,424 words (~3,961 tokens).

“Expert guidance for yfinance — a Python library for retrieving financial data from Yahoo Finance.”

— opening of SKILL.md by SilvioBaratto, Custom licence
name
yfinance
allowed-tools
Read, Write, Edit, Glob, Grep, Bash, WebFetch, WebSearch, mcp__ide__getDiagnostics

Read the full SKILL.md on GitHub

Files

SKILL.md and 10 other files (references) in .claude/skills/yfinance of SilvioBaratto/optimizer.

  • SKILL.md
  • PATTERNS.md
  • references/analysis.md
  • references/config.md
  • references/financials.md
  • references/funds.md
  • references/market_search.md
  • references/price_history.md
  • references/screener.md
  • references/ticker.md
  • references/websocket.md

Open the folder on GitHubat commit 63e897b

Compare with similar skills

Yfinance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Yfinance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yfinance this skillSilvioBaratto/optimizer176—~4kAutomated safety check: NotesCustom licence
Stock Analysis24mlight/StockClaw1012 repos~2kAutomated safety check: NotesMIT
Regimejackson-video-resources/markov-hedge-fund-method483—~1.6kAutomated safety check: PassCustom licence
Stock Value AnalyzerFunnyKun/stock-value-analyzer140—~3.3kAutomated safety check: PassNone
Yahoo Finance24mlight/StockClaw1012 repos~1.1kAutomated safety check: NotesMIT
Stock Analysisliusai0820/Stock-Analysis-Skill141—~904Automated safety check: NotesNone

Similar skills

  • Stock Analysis

    24mlight/StockClaw

    Analyze stocks and cryptocurrencies using Yahoo Finance data.

    101 GitHub starsUsed in 2 repos~2k tokens
    Business, Finance & HRAuto-check: notes
  • Regime

    jackson-video-resources/markov-hedge-fund-method

    Detect the market regime (Bull / Bear / Sideways) for ANY asset and turn it into a tradeable signal or a risk filter.

    483 GitHub stars~1.6k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Stock Value Analyzer

    FunnyKun/stock-value-analyzer

    基于邱国鹭《投资中最简单的事》方法论的股票价值分析器(v2.0 双层架构)。通过"三好原则"(好行业、好公司、好价格)系统评估一只股票是否值得投资。v2.0 在原定性框架之上注入一套可量化、可复现的硬模型层——反向 DCF 反解市场隐含增速、情景概率加权估值、EPV 盈利能力价值、分行业估值路由、杜邦三/五因子分解、ROIC vs WACC、Piotroski F-Score、Beneish…

    140 GitHub stars~3.3k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Yahoo Finance

    24mlight/StockClaw

    Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance.

    101 GitHub starsUsed in 2 repos~1.1k tokens
    Business, Finance & HRAuto-check: notes
  • Stock Analysis

    liusai0820/Stock-Analysis-Skill

    股票智能分析技能。输入股票代码(A股/港股/美股),自动完成: 1. An agent skill from liusai0820/Stock-Analysis-Skill.

    141 GitHub stars~904 tokensUpdated 7 mo ago
    Business, Finance & HRAuto-check: notes
  • B3 Analysis

    guhcostan/b3analysis

    Load this skill when analyzing Brazilian stocks listed on B3, building investment portfolios with Brazilian equities, or interpreting data from yfinance, BCB API, and Google News PT-BR.

    128 GitHub stars~1.5k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed

More from SilvioBaratto/optimizer

All 10 skills in this repo
  • DB Context

    SilvioBaratto/optimizer

    Complete knowledge of the optimizer PostgreSQL database: 57 ingestion tables, schema, relationships, live row counts, query patterns, and conventions.

    176 GitHub stars~6.4k tokensUpdated yesterday
    Auto-check: notes
  • Fund Orchestration

    SilvioBaratto/optimizer

    Sequence the fund pipeline and delegate to the four subagents (economist, allocator, risk, executor).

    176 GitHub stars~635 tokensUpdated yesterday
    Auto-check passed
  • Optimization Objective Map

    SilvioBaratto/optimizer

    Map a chosen ConstraintSet.objective to the correct optimizer cone / risk-measure and factory config.

    176 GitHub stars~510 tokensUpdated yesterday
    Auto-check passed
  • Macro Regime Read

    SilvioBaratto/optimizer

    Read macro/FRED series from the DB and label the current market regime for the economist.

    176 GitHub stars~403 tokensUpdated yesterday
    Auto-check passed
  • Rebalancing Execution

    SilvioBaratto/optimizer

    Translate approved target weights into paper orders under a no-trade band and an L1 turnover penalty, then place them behind human approval.

    176 GitHub stars~425 tokensUpdated yesterday
    Auto-check passed
  • Risk Limits Check

    SilvioBaratto/optimizer

    Validate a proposed weight vector against the ConstraintSet — drawdown ceilings nu1/nu2/nu3, ESG hard gate, robust uncertainty, and a walk-forward backtest — and BLOCK on any breach.

    176 GitHub stars~468 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Yfinance

What does Yfinance do?

Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time…. Yfinance is an agent skill from SilvioBaratto/optimizer. Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time quotes, or inspecting sector, industry, or fund rollups.

When should I use Yfinance?

Yfinance fits situations like: works with yfinance; yahoo Finance data — pulling price history; fetching financials; screening stocks / funds / ETFs.

How do I install Yfinance in Claude Code?

Run `npx skills add SilvioBaratto/optimizer --skill yfinance -a claude-code`. Or copy the skill folder (.claude/skills/yfinance in SilvioBaratto/optimizer) into .claude/skills/yfinance in your project. Claude Code loads it when a task matches its description.

How do I install Yfinance in Codex?

Run `npx skills add SilvioBaratto/optimizer --skill yfinance -a codex`. Or copy the skill folder (.claude/skills/yfinance in SilvioBaratto/optimizer) into .agents/skills/yfinance in your project. Codex loads it when a task matches its description.

Can I use Yfinance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SilvioBaratto/optimizer --skill yfinance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yfinance, .gemini/skills/yfinance, .github/skills/yfinance and .opencode/skills/yfinance in your project.

What does Yfinance need to run?

SKILL.md names no scripts, command-line tools or credentials: Yfinance is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch, WebSearch, mcp__ide__getDiagnostics.

Does Yfinance access the network?

SKILL.md names 2 domains. As links in the text: ranaroussi.github.io and github.com. This is read from the text; nothing was executed.

Is Yfinance safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Yfinance use?

Yfinance has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Yfinance use?

About 4k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Yfinance?

Skills that share tags, products or a category with Yfinance: Stock Analysis (24mlight/StockClaw, 101 stars), Regime (jackson-video-resources/markov-hedge-fund-method, 483 stars), Stock Value Analyzer (FunnyKun/stock-value-analyzer, 140 stars) and Yahoo Finance (24mlight/StockClaw, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yfinance?

SilvioBaratto (a GitHub user) maintains it in SilvioBaratto/optimizer, which has 176 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

Source: SilvioBaratto/optimizer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.