home / skills / patharanordev / stock-analysis / stock-metrics

stock-metrics skill

/skills/stock-metrics

This skill extracts current price, market cap, company name, PE ratio, EPS, and dividend data from website data for quick stock insights.

npx playbooks add skill patharanordev/stock-analysis --skill stock-metrics

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
688 B
---
name: stock-metrics
description: Extract specific stock metrics from website data.
---

# Stock Metrics Extraction Skill

You are a data extraction specialist.

## Input Data
You will act on the following data:
- **Website Data**: `{extract_results}`

## Output Format
Extract the following metrics from the provided data:

-   **Current Price** (or price)
-   **Market Cap**
-   **Company Name**
-   **Price to Earnings Ratio** (or PE Ratio)
-   **EPS** (Earnings Per Share)
-   **Dividend** (or Dividend Yield percentage)

**Instructions**:
-   Return the data in a structured format (JSON or Key-Value pairs) as implied by the context, or simply list the extracted values clearly.

Overview

This skill extracts key stock metrics from raw website data and returns them in a concise structured format. It focuses on reliable identification of current price, market cap, company name, PE ratio, EPS, and dividend or yield. The output is presented as clear JSON or simple key-value pairs for downstream processing.

How this skill works

The skill scans provided Website Data for common labels and patterns (e.g., "Current Price", "Market Cap", "PE Ratio", "% Yield", "EPS") and pulls the nearest numeric or textual values. It normalizes numeric formats (commas, currency symbols, units like B/M/K) and returns consistent field names. If a metric is missing or ambiguous, the skill flags it as null and includes a short note.

When to use it

  • Automating extraction of stock fundamentals from scraped HTML or API responses.
  • Populating a financial database with standardized metrics from varied sources.
  • Validating or reconciling values found on different investor pages.
  • Preparing inputs for modeling, screening, or alert rules that require core metrics.

Best practices

  • Provide the full Website Data block (HTML or text) so the skill can search context and labels.
  • Supply multiple source snippets when a single page omits some metrics.
  • Prefer raw text or minimally processed HTML to preserve labels near values.
  • Specify desired currency or assume the source currency and document it.
  • Review flagged nulls or ambiguous matches and provide clarifying snippets if needed.

Example use cases

  • Extracting current price, market cap, PE, EPS, and dividend yield from a company's quote page.
  • Converting investor relations page tables into JSON records for nightly ETL jobs.
  • Cross-checking scraped values against a reference feed to find mismatches.
  • Feeding standardized metrics into a stock screener or backtesting pipeline.

FAQ

What format does the skill return?

JSON with fields: company_name, current_price, market_cap, pe_ratio, eps, dividend_yield (null if not found).

How are units handled for market cap?

Units like B (billion), M (million), and K (thousand) are normalized into a consistent suffix; numeric conversion can be applied on request.