Agent skill

Yahoo Finance2

by gadicc in gadicc/yahoo-finance2

A skill your agent uses when building with the yahoo-finance2 TypeScript/Deno/npm library, using its Yahoo Finance data modules, CLI, or MCP server, or contributing to the yahoo-finance2 repository…

MITAuto-check passedAgent Workflows

Install Yahoo Finance2

skills CLI
$ npx skills add gadicc/yahoo-finance2 --skill yahoo-finance2 -a claude-code

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

GitHub CLI
$ gh skill install gadicc/yahoo-finance2 yahoo-finance2 --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/gadicc/yahoo-finance2.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/yahoo-finance2 .claude/skills/yahoo-finance2 && 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
yahoo-finance2
GitHub stars
801
Token cost
~1.8k tokens
SKILL.md length
773 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building with the yahoo-finance2 TypeScript/Deno/npm library, using its Yahoo Finance data modules, CLI, or MCP server, or contributing to the yahoo-finance2 repository…

  • Building with the yahoo-finance2 TypeScript/Deno/npm library
  • SKILL.md covers What this skill is for, Using the package, Module selection and Reliability, validation, and…, plus 5 more sections
  • Calls deno and npx
  • Using its Yahoo Finance data modules

What it does

Yahoo Finance2 is an agent skill from gadicc/yahoo-finance2. Use when building with the yahoo-finance2 TypeScript/Deno/npm library, using its Yahoo Finance data modules, CLI, or MCP server, or contributing to the yahoo-finance2 repository including modules, validation schemas, cached fixtures, and npm/JSR build output.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol, yfinance, npm and Deno. The repository describes itself as: Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill. The licence is MIT.

When your agent uses it

  • Building with the yahoo-finance2 TypeScript/Deno/npm library
  • Using its Yahoo Finance data modules
  • Contributing to the yahoo-finance2 repository including modules
  • Validation schemas

Example prompts

  • “/yahoo-finance2”

Requirements

  • Node.js

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • deno
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    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

Yahoo Finance2 loads about 1.8k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 773 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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 passed

The automated check found no risky patterns in SKILL.md.

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

The full file from gadicc/yahoo-finance2 at commit 300b62e, republished under its MIT licence (© gadicc). 773 words, ~1,831 tokens.

Download SKILL.mdSave it as .claude/skills/yahoo-finance2/SKILL.md (or your agent's skills folder).
name
yahoo-finance2
description
Use when building with the yahoo-finance2 TypeScript/Deno/npm library, using its Yahoo Finance data modules, CLI, or MCP server, or contributing to the yahoo-finance2 repository including modules, validation schemas, cached fixtures, and npm/JSR build output.

yahoo-finance2

What this skill is for

Use this skill when a task involves yahoo-finance2, including:

  • Adding Yahoo Finance market data to a server-side JavaScript/TypeScript app.
  • Choosing between quote, chart, historical, quoteSummary, fundamentalsTimeSeries, screener, options, or other modules.
  • Using the package CLI or bundled MCP server.
  • Modifying this repository's Deno source, tests, generated schemas, docs, or npm output build.

This is an unofficial Yahoo Finance client. Do not describe it as a supported Yahoo API, and do not assume Yahoo data availability, freshness, or shape is guaranteed.

Using the package

Prefer the v3 class API:

ts
import YahooFinance from "yahoo-finance2";

const yahooFinance = new YahooFinance();
const quote = await yahooFinance.quote("AAPL");
console.log(quote?.regularMarketPrice, quote?.currency);

Do not use old v1/v2 singleton patterns such as yahooFinance.setGlobalConfig(). In v3, instantiate with new YahooFinance(options).

This package is for server-side runtimes. Do not put direct Yahoo Finance calls in browser/client bundles; Yahoo's CORS and cookie behavior require a server, serverless, edge, Deno, Bun, or Node context.

Module selection

  • Use search(query) first when a symbol is uncertain.
  • Use quote(symbolOrSymbols) for current or near real-time quote fields. It accepts one symbol or an array. Use fields to limit payloads; for keyed access, request object or map returns.
  • Use quoteCombine(symbol) when many independent code paths need quote data; it debounces many single-symbol calls into fewer quote() requests.
  • Use chart(symbol, { period1, period2, interval }) for chart-ready historical data with events such as dividends and splits. return: "array" is easier to iterate; return: "object" mirrors Yahoo's native shape.
  • Use historical() for a simpler OHLCV history interface.
  • Use quoteSummary(symbol, { modules }) for profile, price, summary detail, filings, ownership, recommendations, and other quote-summary modules. Request only the modules needed.
  • Use fundamentalsTimeSeries() for financial statements. Since late 2024, quote-summary financial-statement modules such as incomeStatementHistory, balanceSheetHistory, and cashflowStatementHistory provide little data.
  • Use options(symbol) for options chains.
  • Use screener() instead of removed/deprecated daily gainers or losers modules. Common predefined screeners include day_gainers, day_losers, and most_actives.
  • Use trendingSymbols(region), recommendationsBySymbol(), and insights() for their specialized Yahoo Finance endpoints.

Reliability, validation, and errors

Wrap module calls in try/catch. Network errors, Yahoo API errors, delisted symbols, missing data, and validation failures are expected operating conditions.

By default, returned data is validated and coerced so known dates become Date objects and known result shapes are safe to consume. If validation fails, fixing the typed interface and regenerated schema is usually better than turning validation off.

Only use { validateResult: false } when the caller accepts unknown output and performs its own checks. Use { validateOptions: false } only when experimenting with Yahoo query parameters that the library does not yet model.

The default client queue limits concurrent Yahoo requests. Use constructor or per-call queue options when you need stricter rate behavior:

ts
const yahooFinance = new YahooFinance({
  queue: { concurrency: 2, interval: 250 },
});

CLI and MCP

For quick shell use:

bash
npx yahoo-finance2 search AMZN
npx yahoo-finance2 quote AAPL
npx yahoo-finance2 quoteSummary NVDA '{"modules":["assetProfile","secFilings"]}'

JSON-looking positional arguments are parsed as JSON. Successful piped output is JSON-safe.

For MCP clients, the package includes a read-only Yahoo Finance MCP server:

bash
npx -y -p yahoo-finance2 yahoo-finance-mcp

See docs/mcp.md for stdio, HTTP, embedded handler, and client registration details.

Show full SKILL.md (306 more words)Show less

Contributing in this repository

Read AGENTS.md and CONTRIBUTING.md first. This repo is Deno-first TypeScript; npm output is generated.

Edit source files under src/, not generated files under npm/, unless the task explicitly asks for generated output. Preserve local .ts import extensions.

Public module files usually follow this pattern:

  • Typed query/result interfaces are the source of truth.
  • Files with @yf-schema import their generated .schema.json.
  • Module functions call this._moduleExec() with query defaults, runtime params, optional transforms, result transforms, schema keys, and module options.
  • Overloads distinguish validated results from { validateResult: false }, which returns unknown.

When changing an exported interface in a file marked @yf-schema, run:

bash
deno task schema

If adding a module, wire it through src/modules/index.ts, deno.json exports, docs/README links, README module lists when relevant, tests, and any CLI/MCP exposure only when the module should be user-facing there.

Tests and fixtures

Run all tests with:

bash
deno task test

Run focused tests with:

bash
deno task test src/modules/quote.test.ts

Use deno task test:serial src/modules/quote.test.ts when debugging or limiting live Yahoo request concurrency.

Tests that touch Yahoo HTTP responses should call setupCache() from tests/common.ts. Prefer the existing pattern:

ts
const YahooFinance = createTestYahooFinance({ modules: { quote } });
const yf = new YahooFinance();

describe("quote", () => {
  setupCache();

  it("passes validation", async (t, onFinish) => {
    await yf.quote("AAPL", {}, {
      devel: { id: "quote-AAPL", t, onFinish },
    });
  });
});

Use fixture ids that match the module and scenario. FETCH_DEVEL=nocache forces live network calls. FETCH_DEVEL=recache refreshes cache files for failing tests. Do not recache fixtures ending in .static.json or .fake.json; they are intentionally stable or synthetic.

When fixing validation failures, inspect the validation error path and cached Yahoo response, update the TypeScript interface first, run schema generation, then run the focused test.

Build, lint, and release surface

Use these checks as appropriate:

bash
deno fmt
deno lint
deno task test
deno task build:npm

scripts/build_npm.ts controls the generated npm package metadata, binaries, dependencies, copied files, and package keywords. Keep npm-package changes there unless explicitly regenerating npm/.

Commit messages should use Conventional Commits with a scope, such as fix(quote): handle missing extended market fields.

Agent skill installation

The canonical skill lives at skills/yahoo-finance2/SKILL.md. To install it through the Skills CLI and make it visible to skills.sh telemetry, use:

bash
npx skills add gadicc/yahoo-finance2

© gadicc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/yahoo-finance2 of gadicc/yahoo-finance2.

Open the folder on GitHubat commit 300b62e

Compare with similar skills

Yahoo Finance2 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.

Yahoo Finance2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yahoo Finance2 this skillgadicc/yahoo-finance2801—~1.8kAutomated safety check: PassMIT
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
Project Releaseswimmwatch/cloakbrowser-mcp164—~1.9kAutomated safety check: PassMIT
Typescript MCP Server Generatorgithub/awesome-copilot40k—~1.7kAutomated safety check: PassMIT
Project Pull Requestswimmwatch/cloakbrowser-mcp164—~1kAutomated safety check: PassMIT
Zizkadb ReleaseZIZKA-AI-SL/ZizkaDB125—~399Automated safety check: PassCustom licence

Similar skills

  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Project Release

    swimmwatch/cloakbrowser-mcp

    Prepare, publish, verify, or recover a cloakbrowser-mcp release only when the user explicitly requests release work.

    164 GitHub stars~1.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Typescript MCP Server Generator

    github/awesome-copilot

    Official

    Generate a complete MCP server project in TypeScript using the MCP TypeScript SDK v2 (@modelcontextprotocol/server) with tools, resources, and proper configuration

    40k GitHub stars~1.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Project Pull Request

    swimmwatch/cloakbrowser-mcp

    Create, update, prepare, or review a cloakbrowser-mcp GitHub Pull Request only when the user explicitly requests PR work.

    164 GitHub stars~1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Zizkadb Release

    ZIZKA-AI-SL/ZizkaDB

    Bumps versions, runs pre-push verification, and publishes ZizkaDB SDK and MCP packages.

    125 GitHub stars~399 tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Project Docs Maintainer

    swimmwatch/cloakbrowser-mcp

    Maintain, organize, consolidate, or audit the cloakbrowser-mcp documentation set only when the user explicitly requests project documentation maintenance or an authorized public change requires it.

    164 GitHub stars~569 tokensUpdated yesterday
    DevelopmentAuto-check passed

Categories

Questions about Yahoo Finance2

What does Yahoo Finance2 do?

A skill your agent uses when building with the yahoo-finance2 TypeScript/Deno/npm library, using its Yahoo Finance data modules, CLI, or MCP server, or contributing to the yahoo-finance2 repository…. Yahoo Finance2 is an agent skill from gadicc/yahoo-finance2. Use when building with the yahoo-finance2 TypeScript/Deno/npm library, using its Yahoo Finance data modules, CLI, or MCP server, or contributing to the yahoo-finance2 repository including modules, validation schemas, cached fixtures, and npm/JSR build output.

When should I use Yahoo Finance2?

Yahoo Finance2 fits situations like: building with the yahoo-finance2 TypeScript/Deno/npm library; using its Yahoo Finance data modules; contributing to the yahoo-finance2 repository including modules; validation schemas.

How do I install Yahoo Finance2 in Claude Code?

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

How do I install Yahoo Finance2 in Codex?

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

Can I use Yahoo Finance2 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 gadicc/yahoo-finance2 --skill yahoo-finance2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yahoo-finance2, .gemini/skills/yahoo-finance2, .github/skills/yahoo-finance2 and .opencode/skills/yahoo-finance2 in your project.

What does Yahoo Finance2 need to run?

Going by SKILL.md and its folder, Yahoo Finance2 needs the command-line tools its instructions call (deno and npx). Our summary lists: Node.js.

Does Yahoo Finance2 access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Yahoo Finance2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Yahoo Finance2 use?

Yahoo Finance2 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yahoo Finance2 use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Yahoo Finance2?

Skills that share tags, products or a category with Yahoo Finance2: MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), Project Release (swimmwatch/cloakbrowser-mcp, 164 stars), Typescript MCP Server Generator (github/awesome-copilot, 40k stars) and Project Pull Request (swimmwatch/cloakbrowser-mcp, 164 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yahoo Finance2?

gadicc (a GitHub user) maintains it in gadicc/yahoo-finance2, which has 801 GitHub stars. The repository was last updated on October 4, 2026.

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